CN115759383A - Destination prediction method and system with branch network and electronic equipment - Google Patents

Destination prediction method and system with branch network and electronic equipment Download PDF

Info

Publication number
CN115759383A
CN115759383A CN202211414015.3A CN202211414015A CN115759383A CN 115759383 A CN115759383 A CN 115759383A CN 202211414015 A CN202211414015 A CN 202211414015A CN 115759383 A CN115759383 A CN 115759383A
Authority
CN
China
Prior art keywords
vector
current
prediction
matrix
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211414015.3A
Other languages
Chinese (zh)
Other versions
CN115759383B (en
Inventor
蔡晓东
蒋鹏
杨靖康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guilin University of Electronic Technology
Original Assignee
Guilin University of Electronic Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guilin University of Electronic Technology filed Critical Guilin University of Electronic Technology
Priority to CN202211414015.3A priority Critical patent/CN115759383B/en
Publication of CN115759383A publication Critical patent/CN115759383A/en
Application granted granted Critical
Publication of CN115759383B publication Critical patent/CN115759383B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to a destination prediction method with a branch network, a system and electronic equipment, comprising the following steps: acquiring first track data, wherein the first track data represents driving track data generated in the current driving process of a vehicle; the first trajectory data is input into a predictive model, and a first predicted destination of the vehicle is determined by the predictive model. By the scheme, the problem that when the destination to which the vehicle wants to arrive does not belong to the historical track set, the probability of arriving at the destination cannot be accurately predicted by a traditional prediction method is solved.

Description

Destination prediction method and system with branch network and electronic equipment
Technical Field
The invention relates to the technical field of deep learning, in particular to a destination prediction method with a branch network, a system and electronic equipment.
Background
The 5G network greatly improves the data transmission efficiency and greatly promotes the development of the Internet of vehicles. The vehicle networking can acquire the information of each vehicle in real time, and the traffic condition and the driving experience are improved. The target prediction is an important task of the car networking system and is helpful for solving the problem of traffic congestion. By predicting the destination of the vehicle, the place where the traffic flow increases can be known in advance, and the diversion measure can be taken as soon as possible to prevent traffic jam.
Conventional predictive methods typically measure the probability of the vehicle reaching each destination based on a set of historical trajectories, and thus second predict the destination. However, in reality it is not possible to obtain a historical set of trajectories that covers all locations. Existing trajectory data sets are typically only a small fraction of them, and when there are no historical trajectories in the database that match the trajectory of the query, the probability of reaching the historical destination cannot be calculated, and thus the second predicted destination cannot be calculated.
Disclosure of Invention
The invention provides a destination prediction method and system with a branch network and electronic equipment, and aims to solve the problem that when a destination to be reached by a vehicle does not belong to a historical track set, the probability of reaching the destination cannot be accurately predicted by a traditional prediction method.
In a first aspect, to solve the above technical problem, the present invention provides a destination prediction method with a branch network, including the following steps:
acquiring first track data, wherein the first track data represents driving track data generated in the current driving process of a vehicle;
inputting the first trajectory data into a prediction model, and determining a first predicted destination of the vehicle through the prediction model, wherein the prediction model is obtained by training in the following way:
s11, obtaining a training sample, wherein the training sample comprises a plurality of second track data and a real destination corresponding to each second track data, and for each second track data, the second track data represents historical driving track data generated by the vehicle in a preset time period;
s12, training the initial model according to the second track data to obtain a second predicted destination corresponding to each second track data;
s13, determining a total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations, wherein the total loss value represents a difference value between the second predicted destinations and the real destinations;
and S14, if the total loss value meets the preset ending condition, taking the initial model meeting the preset ending condition as a prediction model, if the total loss value does not meet the preset ending condition, adjusting the network parameters of the initial network, and training the initial model again according to the adjusted network parameters until the total loss value of the initial model meets the preset ending condition.
The destination prediction method with the branch network has the advantages that: the first predicted destination which the vehicle reaches can be predicted according to the first track data through the prediction model, and in the training process of the prediction model, the probability that the vehicle reaches any destination is not calculated from the historical track set, but the predicted destination corresponding to the second track data is predicted according to the second track data, so that the problem that the probability of the second predicted destination cannot be predicted because no corresponding destination exists in the historical track set is solved.
On the basis of the technical scheme, the destination prediction method with the branch network can be further improved as follows.
Further, the initial model comprises an input layer, a first decoder, a second decoder and an output layer;
training the initial model according to each second trajectory data to obtain a second predicted destination corresponding to each second trajectory data, including:
s21, inputting the second track data into an input layer, and determining a track vector corresponding to each second track data through the input layer;
s22, inputting the track vector into a first decoder for each track vector, extracting the characteristics of the track vector through the first decoder, and determining the characteristic vector corresponding to the track vector;
s23, inputting the feature vector into a second decoder for each feature vector, and determining a prediction vector corresponding to the feature vector through the second decoder, wherein the prediction vector represents a predicted trajectory vector of the vehicle in the next time period of the current preset time period;
and S24, inputting the prediction vector into an output layer for each prediction vector, and determining a second prediction destination corresponding to the prediction vector through the output layer.
The beneficial effect of adopting the further scheme is that: in the training process of the prediction model, a prediction vector is obtained, and the prediction vector is a prediction track vector of a time period next to a current preset time period, so that the prediction model can predict the track condition (prediction vector) of the vehicle in the time period next to the current time period, and finally a second prediction destination is obtained according to the prediction vector.
Further, in the method, for each second trajectory data, the second trajectory data includes a plurality of position coordinates, each second trajectory data is input into the input layer, and the trajectory vector corresponding to each second trajectory data is determined through the input layer, including:
s31, for each second track data, determining a track sequence corresponding to the second track data through a first formula of an input layer according to each position coordinate contained in the second track data, wherein the first formula is as follows:
X=[loc 1 ,loc 2 ,...,loc n ];
wherein X represents a sequence of tracks, loc i Representing a bit in the second track dataSetting coordinates, wherein n represents the total number of the position coordinates in the second track data, i is more than or equal to 1 and less than or equal to n, and i is an integer;
s32, determining a track vector corresponding to each track sequence through a second formula of the input layer according to the track sequence, wherein the second formula is as follows:
E=Relu(W e X+b);
wherein E represents a trajectory vector, W e Representing a preset first weight matrix which is subjected to random initialization in a standard normal distribution, b representing a first bias matrix corresponding to the preset first weight matrix, and Relu (x) representing an activation function, wherein x represents an input value of the activation function, and the activation function is defined as Relu (x) = max (x, 0).
The beneficial effect of adopting the further scheme is that: and converting the second track data into a track vector, so that the features of the second track data can be extracted in the subsequent process.
Further, in the above method, for each trajectory vector, inputting the trajectory vector into a first decoder, extracting features of the trajectory vector through the first decoder, and determining a feature vector corresponding to the trajectory vector, includes:
inputting the track vector into a first decoder for each track vector, and determining a feature vector corresponding to the track vector through a first step, wherein the first step comprises the following steps:
s41, acquiring a first initialized cell state and a first initialized hidden state of a first decoder, wherein the first initialized cell state and the first initialized hidden state are zero matrixes;
s42, randomly initializing a second weight matrix, a third weight matrix, a fourth weight matrix and a fifth weight matrix from the standard positive-Taiwan distribution, and a second bias matrix corresponding to the second weight matrix, a third bias matrix corresponding to the third weight matrix, a fourth bias matrix corresponding to the fourth weight matrix and a fifth bias matrix corresponding to the fifth weight matrix;
s43, taking the first initialized hidden state as a first current hidden state, and taking the first initialized cell state as a first current cell state;
s44, determining a first forgetting weight and a first updating weight according to the second weight matrix, the second bias matrix, the third weight matrix, the third bias matrix, the first current hidden state and the track vector through a third formula, wherein the third formula is as follows:
Figure BDA0003939072480000041
wherein ,f0 1 Representing a first forgetting weight, sigma representing a sigmoid function, wherein the sigmoid function is defined as
Figure BDA0003939072480000051
A second weight matrix is represented that represents a second weight matrix,
Figure BDA0003939072480000052
a second bias matrix is represented that is,
Figure BDA0003939072480000053
indicating the first current hidden state of the network,
Figure BDA0003939072480000054
represents a first update weight, W i 1 A third weight matrix is represented that represents a third weight matrix,
Figure BDA0003939072480000055
denotes a third bias matrix, e t Representing the t-th track vector;
s45, determining a first updating amount of the cell state at the current moment through a fourth formula according to the first current hidden state, a fourth weight matrix, a fourth bias matrix and a track vector, wherein the fourth formula is as follows:
Figure BDA0003939072480000056
wherein ,
Figure BDA0003939072480000057
represents the first update amount, and tanh represents a tanh function, wherein the tanh function is defined as
Figure BDA0003939072480000058
A fourth weight matrix is represented which is,
Figure BDA0003939072480000059
representing a fourth bias matrix;
s46, determining a second current cell state at the next moment of the current moment according to the first forgetting weight, the first updating weight, the first current cell state and the first updating amount by a fifth formula, wherein the fifth formula is as follows:
Figure BDA00039390724800000510
wherein ,
Figure BDA00039390724800000511
indicating the second current state of the cell or cells,
Figure BDA00039390724800000512
representing a first current cell state;
s47, determining a second current hidden state at the next moment of the current moment according to a sixth formula according to the fifth weight matrix, the fifth bias matrix, the first current hidden state, the cell state and the track vector at the next moment of the current moment, wherein the sixth formula is as follows:
Figure BDA00039390724800000513
wherein ,
Figure BDA00039390724800000514
indicating the second current hidden state and,
Figure BDA00039390724800000515
a fifth weight matrix is represented which is,
Figure BDA00039390724800000516
a fifth bias matrix is represented that is,
Figure BDA00039390724800000517
representing a second update weight;
and S48, taking the second current hidden state as a new first current hidden state, taking the second current cell state as a new first current cell state, repeating the steps S44-S48 for a first preset time, and taking the last obtained second current hidden state as a feature vector corresponding to the track vector.
The beneficial effect of adopting the further scheme is that: and extracting the characteristics of the track vector through a first decoder so as to obtain a characteristic vector.
Further, in the method, for each feature vector, inputting the feature vector into a second decoder, and determining a predicted vector corresponding to the feature vector by the second decoder, where the predicted vector represents a predicted trajectory vector of the vehicle in a time period next to the current preset time period, the method includes:
for each feature vector, inputting the feature vector into a second decoder, and determining a prediction vector corresponding to the feature vector through a second step, wherein the second step comprises:
s51, acquiring a second initialized hidden state and a second initialized cell state of a second decoder, wherein the second initialized hidden state and the second initialized cell state are zero matrixes;
s52, randomly initializing a sixth weight matrix, a seventh weight matrix, an eighth weight matrix and a ninth weight matrix from the standard positive-Taiwan distribution, and a sixth bias matrix corresponding to the sixth weight matrix, a seventh bias matrix corresponding to the seventh weight matrix, an eighth bias matrix corresponding to the eighth weight matrix and a ninth bias matrix corresponding to the ninth weight matrix;
s53, taking the feature vector as a third current hidden state, and taking the second initialized cell state as a third current cell state;
s54, determining a second forgetting weight and a third updating weight according to a sixth weight matrix, a sixth bias matrix, a seventh weight matrix, a seventh bias matrix, a third current hidden state and a second initialized hidden state through a seventh formula, wherein the seventh formula is as follows:
Figure BDA0003939072480000061
wherein ,ft 2 Represents a second forgetting weight, and σ represents a sigmoid function, wherein the sigmoid function is defined as
Figure BDA0003939072480000062
A sixth weight matrix is represented by a sixth weight matrix,
Figure BDA0003939072480000063
a sixth bias matrix is represented that is,
Figure BDA0003939072480000064
a third current hidden state is represented which,
Figure BDA0003939072480000065
represents a third update weight, W i 2 A seventh weight matrix is represented which is,
Figure BDA0003939072480000066
denotes a seventh bias matrix, d t Representing a second initialized hidden state corresponding to the t-th feature vector;
s55, determining a second updated quantity of the cell state at the current time according to the third current hidden state, the second initialized hidden state, the eighth weight matrix and the eighth bias matrix by using an eighth formula, where the eighth formula is:
Figure BDA0003939072480000071
wherein ,
Figure BDA0003939072480000072
represents the second update amount, and tanh represents a tanh function, wherein the tanh function is defined as
Figure BDA0003939072480000073
An eighth weight matrix is represented that is,
Figure BDA0003939072480000074
representing an eighth bias matrix;
and S56, determining a fourth current cell state at the next moment of the current moment through a ninth formula according to the second forgetting weight, the second updating weight, the third current cell state and the second updating amount, wherein the ninth formula is as follows:
Figure BDA0003939072480000075
wherein ,
Figure BDA0003939072480000076
indicating the fourth current state of the cell,
Figure BDA0003939072480000077
representing a third current cell state;
s57, determining a fourth current hidden state at a next time next to the current time according to the ninth weight matrix, the ninth bias matrix, the third current hidden state, the second initialized hidden state, and the fourth current cell state by using a tenth formula, where the tenth formula is:
Figure BDA0003939072480000078
wherein ,
Figure BDA0003939072480000079
a fourth current hidden state is indicated,
Figure BDA00039390724800000710
a ninth weight matrix is represented that is,
Figure BDA00039390724800000711
a ninth bias matrix is shown that is,
Figure BDA00039390724800000712
represents a fourth update weight;
and S58, taking the fourth current hidden state as a new third current hidden state, taking the fourth current cell state as a new third current cell state, repeating S54-S58 for a second preset number of times, and taking the last obtained fourth current hidden state as a prediction vector.
The beneficial effect of adopting the above further scheme is: and predicting the track of the prediction vector by a second decoder to obtain a prediction track vector (prediction vector) of a time period next to the current time period, so that the prediction model can obtain a second prediction destination according to the prediction vector.
Further, the method for inputting the prediction vector into an output layer and determining a second prediction destination corresponding to the prediction vector through the output layer for each prediction vector includes:
for each prediction vector, determining a second prediction destination corresponding to the prediction vector by an eleventh formula, wherein the eleventh formula is as follows:
Figure BDA0003939072480000081
wherein ,
Figure BDA0003939072480000082
a second predicted destination is indicated and,
Figure BDA0003939072480000083
denotes a prediction vector, W d A tenth weight matrix representing a preset, b d A tenth deviation corresponding to a tenth weight matrix representing the presettingAnd (5) setting a matrix.
The beneficial effect of adopting the further scheme is that: through the eleventh formula, the predicted vector can be converted into a second predicted destination, so that the second predicted destination predicted from the second trajectory data is obtained.
Further, the method also includes:
determining a score value corresponding to each prediction vector according to each prediction vector;
for each prediction vector, if the score value is larger than the threshold value, the prediction vector is used as a target prediction vector, and if the score value is smaller than the threshold value, S23-S24 are repeated until the score value is larger than the threshold value;
determining a score value corresponding to each second predicted destination according to each second predicted destination, comprising:
according to each prediction vector, determining a score value corresponding to each prediction vector through a thirteenth formula, wherein the thirteenth formula is as follows:
Figure BDA0003939072480000084
wherein, the S-score value represents Relu activation function, represents sigmoid activation function,
Figure BDA0003939072480000085
which represents the t-th prediction vector,
Figure BDA0003939072480000086
represents a preset eleventh weight matrix,
Figure BDA0003939072480000087
an eleventh bias matrix corresponding to the preset eleventh weight matrix is represented;
for each prediction vector, determining a second predicted destination to which the prediction vector corresponds, comprising:
for each target prediction vector, a second prediction destination corresponding to the target prediction vector is determined.
The beneficial effect of adopting the above further scheme is: in the training process of the prediction model, because the prediction vector obtained according to the feature vector cannot really reflect the track situation of the next time period of the current preset time period, the prediction vector needs to be evaluated, and the prediction vector with the score value larger than the threshold value is taken as the target prediction vector, so that the accuracy of the prediction model is improved.
Further, the determining a total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations in the method includes:
determining a total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations by a twelfth formula, wherein the twelfth formula is as follows:
Figure BDA0003939072480000091
where Loss represents the total Loss value, Y represents the true destination,
Figure BDA0003939072480000092
a second predicted destination is indicated and,
Figure BDA0003939072480000095
coordinate values indicating a second predicted destination, (x, y) coordinate values indicating a real destination,
Figure BDA0003939072480000094
representing the distance between the second predicted destination and the actual destination.
The beneficial effect of adopting the above further scheme is: by constructing the total loss value, the initial model learns the difference between the second predicted destination and the real destination, so that the accuracy of the prediction model for predicting the first predicted destination is improved.
In a second aspect, the present invention provides a destination prediction system with a branch network, comprising:
the first track data acquisition module is used for acquiring first track data, and the first track data represents driving track data generated in the current driving process of the vehicle;
the prediction module is used for inputting the first track data into a prediction model and determining a first predicted destination of the vehicle through the prediction model;
the prediction module determines a first predicted destination of the vehicle through a prediction model, wherein the prediction model is obtained through training by a first unit, and the first unit is specifically used for:
acquiring a training sample, wherein the training sample comprises a plurality of second track data and a real destination corresponding to each track data, and for each second track data, the second track data represents the driving track data generated by the vehicle in a preset time period;
training the initial model according to the second track data to obtain a second predicted destination corresponding to each second cabinet machine data;
determining a total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations, wherein the total loss value represents a difference value between the second predicted destinations and the real destinations;
if the total loss value meets the preset ending condition, the initial model meeting the preset ending condition is used as a prediction model, if the total loss value does not meet the preset ending condition, the network parameters of the initial network are adjusted, and the initial model is trained again according to the adjusted network parameters until the total loss value of the initial model meets the preset ending condition.
In a third aspect, the present invention also provides an electronic device, which includes a memory, a processor, and a program stored in the memory and running on the processor, and when the processor executes the program, the steps of the destination prediction method with a branch network are implemented.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention is further described below with reference to the accompanying drawings and embodiments.
Fig. 1 is a flowchart illustrating a destination prediction method with a branch network according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a destination prediction system with a branch network according to an embodiment of the present invention.
Detailed Description
The following examples are further illustrative and supplementary to the present invention and do not limit the present invention in any way.
The following describes a destination prediction method, a destination prediction system, and an electronic device with a branch network according to embodiments of the present invention with reference to the accompanying drawings.
As shown in fig. 1, a method for predicting a destination with a branch network according to an embodiment of the present invention includes the following steps:
s110, acquiring first track data, wherein the first track data represents driving track data generated in the current driving process of the vehicle;
and S120, inputting the first trajectory data into a prediction model, and determining a first predicted destination of the vehicle through the prediction model.
In this embodiment, the first trajectory data is a real-time position coordinate of the vehicle in the current driving process, and the position coordinate of the first predicted destination of the vehicle in the driving process can be determined by inputting each real-time position coordinate into the prediction model.
Optionally, the prediction model is obtained by training in the following way:
s11, a training sample is obtained, the training sample comprises a plurality of second track data and a real destination corresponding to each second track data, and for each second track data, the second track data represent historical driving track data generated by the vehicle in a preset time period.
In this embodiment, the second trajectory data is each real-time position coordinate generated by any one of the historical driving trajectories of the vehicle, and the real destination is a position coordinate of a destination corresponding to any one of the second trajectory data.
And S12, training the initial model according to the second track data to obtain a second predicted destination corresponding to each second track data.
Optionally, the initial model includes an input layer, a first decoder, a second decoder, and an output layer;
training the initial model according to each second trajectory data to obtain a second predicted destination corresponding to each second trajectory data, including:
and S21, inputting the second track data into an input layer, and determining the track vector corresponding to each second track data through the input layer.
Optionally, the input layer is a full-connection layer, the second track data is input into the full-connection layer, and the track vector of each second track data is determined through the full-connection layer, which specifically includes:
s31, for each second track data, determining a track sequence corresponding to the second track data through a first formula of the full connection layer according to each position coordinate contained in the second track data, wherein the first formula is as follows:
X=[loc 1 ,loc 2 ,...,loc n ];
wherein X represents a sequence of tracks, loc i Representing a position coordinate in the second track data, wherein n represents the total number of the position coordinates in the second track data, i is more than or equal to 1 and less than or equal to n, and i is an integer;
s32, determining a track vector corresponding to each track sequence through a second formula of the full connection layer according to the track sequence, wherein the second formula is as follows:
E=Relu(W e X+b);
wherein E represents a trajectory vector, W e Representing a preset first weight matrix which is subjected to random initialization in a standard normal distribution, b representing a first bias matrix corresponding to the preset first weight matrix, and Relu (x) representing an activation function, wherein x represents an input value of the activation function, and the activation function is defined as Relu (x) = max (x, 0).
And S22, inputting the track vector into a first decoder for each track vector, extracting the characteristics of the track vector through the first decoder, and determining the characteristic vector corresponding to the track vector.
Optionally, the first decoder is a bidirectional multi-pair LSTM, where for each track vector, the track vector is input into the first decoder, and a feature of the track vector is obtained through a first step, and a feature vector corresponding to the track vector is determined, where the first step includes:
s41, acquiring a first initialized cell state and a first initialized hidden state of a first decoder, wherein the first initialized cell state and the first initialized hidden state are zero matrixes;
s42, randomly initializing a second weight matrix, a third weight matrix, a fourth weight matrix and a fifth weight matrix from the standard positive-Taiwan distribution, and a second bias matrix corresponding to the second weight matrix, a third bias matrix corresponding to the third weight matrix, a fourth bias matrix corresponding to the fourth weight matrix and a fifth bias matrix corresponding to the fifth weight matrix;
s43, taking the first initialized hidden state as a first current hidden state, and taking the first initialized cell state as a first current cell state;
s44, determining a first forgetting weight and a first updating weight according to the second weight matrix, the second bias matrix, the third weight matrix, the third bias matrix, the first current hidden state and the track vector through a third formula, wherein the third formula is as follows:
Figure BDA0003939072480000131
wherein ,ft 1 Representing a first forgetting weight, sigma representing a sigmoid function, wherein the sigmoid function is defined as
Figure BDA0003939072480000132
A second weight matrix is represented that is,
Figure BDA0003939072480000133
a second bias matrix is represented that is,
Figure BDA0003939072480000134
representing a first current privacyIn the stored state, the first and second containers are in the stored state,
Figure BDA0003939072480000135
represents a first update weight, W i 1 A third weight matrix is represented that represents a third weight matrix,
Figure BDA0003939072480000136
denotes a third bias matrix, e t Representing the t-th track vector;
s45, determining a first updating amount of the cell state at the current moment through a fourth formula according to the first current hidden state, a fourth weight matrix, a fourth bias matrix and a track vector, wherein the fourth formula is as follows:
Figure BDA0003939072480000137
wherein ,
Figure BDA0003939072480000138
represents the first update amount, and tanh represents a tanh function, wherein the tanh function is defined as
Figure BDA0003939072480000139
A fourth weight matrix is represented which is,
Figure BDA00039390724800001310
representing a fourth bias matrix;
s46, determining a second current cell state at the next moment of the current moment according to the first forgetting weight, the first updating weight, the first current cell state and the first updating amount by a fifth formula, wherein the fifth formula is as follows:
Figure BDA00039390724800001311
wherein ,
Figure BDA00039390724800001312
indicating the second current cellThe status of the mobile station is,
Figure BDA00039390724800001313
representing a first current cell state;
s47, determining a second current hidden state at the next moment of the current moment according to a sixth formula according to the fifth weight matrix, the fifth bias matrix, the first current hidden state, the cell state and the track vector at the next moment of the current moment, wherein the sixth formula is as follows:
Figure BDA00039390724800001314
wherein ,
Figure BDA00039390724800001315
indicating the second current hidden state and,
Figure BDA00039390724800001316
a fifth weight matrix is represented which is,
Figure BDA00039390724800001317
a fifth bias matrix is represented by a second bias matrix,
Figure BDA00039390724800001318
representing a second update weight;
and S48, taking the second current hidden state as a new first current hidden state, taking the second current cell state as a new first current cell state, repeating the steps from S44 to S48 for a first preset number of times, and taking the second current hidden state obtained at the last time as a feature vector corresponding to the track vector.
Optionally, the first preset number of times is set according to an actual situation.
And S23, inputting the feature vector into a second decoder for each feature vector, and determining a prediction vector corresponding to the feature vector through the second decoder, wherein the prediction vector represents a predicted track vector of the vehicle in the next time period of the current preset time period.
Optionally, the second decoder is a bidirectional pair LSTM, and for each eigenvector, the eigenvector is input into the second decoder, and a predicted vector corresponding to the eigenvector is determined by the second decoder, where the predicted vector represents a predicted trajectory vector of the vehicle in a time period next to the current preset time period, and the method includes:
and for each feature vector, inputting the feature vector into a second decoder, and determining a prediction vector corresponding to the feature vector through a second step, wherein the second step comprises the following steps:
s51, acquiring a second initialized hidden state and a second initialized cell state of a second decoder, wherein the second initialized hidden state and the second initialized cell state are both zero matrixes;
s52, randomly initializing a sixth weight matrix, a seventh weight matrix, an eighth weight matrix and a ninth weight matrix from the standard positive-Taiwan distribution, and a sixth bias matrix corresponding to the sixth weight matrix, a seventh bias matrix corresponding to the seventh weight matrix, an eighth bias matrix corresponding to the eighth weight matrix and a ninth bias matrix corresponding to the ninth weight matrix;
s53, taking the feature vector as a third current hidden state, and taking the second initialized cell state as a third current cell state;
s54, determining a second forgetting weight and a third updating weight according to a sixth weight matrix, a sixth bias matrix, a seventh weight matrix, a seventh bias matrix, a third current hidden state and a second initialized hidden state through a seventh formula, wherein the seventh formula is as follows:
Figure BDA0003939072480000141
wherein ,ft 2 Represents a second forgetting weight, and σ represents a sigmoid function, wherein the sigmoid function is defined as
Figure BDA0003939072480000151
A sixth weight matrix is represented which is,
Figure BDA0003939072480000152
a sixth bias matrix is represented that is,
Figure BDA0003939072480000153
a third current hidden state is represented which,
Figure BDA0003939072480000154
represents a third update weight, W i 2 A seventh weight matrix is represented which is,
Figure BDA0003939072480000155
denotes a seventh bias matrix, d t Representing a second initialized hidden state corresponding to the t-th feature vector;
s55, determining a second updated quantity of the cell state at the current time according to the third current hidden state, the second initialized hidden state, the eighth weight matrix and the eighth bias matrix by using an eighth formula, where the eighth formula is:
Figure BDA0003939072480000156
wherein ,
Figure BDA0003939072480000157
represents the second update amount, and tanh represents a tanh function, wherein the tanh function is defined as
Figure BDA0003939072480000158
An eighth weight matrix is represented that is,
Figure BDA0003939072480000159
representing an eighth bias matrix;
and S56, determining a fourth current cell state at the next moment of the current moment according to the second forgetting weight, the second updating weight, the third current cell state and the second updating amount by a ninth formula, wherein the ninth formula is as follows:
Figure BDA00039390724800001510
wherein ,
Figure BDA00039390724800001511
indicating the fourth current state of the cell or cells,
Figure BDA00039390724800001512
representing a third current cell state;
s57, determining a fourth current hidden state at a next time next to the current time according to the ninth weight matrix, the ninth bias matrix, the third current hidden state, the second initialized hidden state, and the fourth current cell state by using a tenth formula, where the tenth formula is:
Figure BDA00039390724800001513
wherein ,
Figure BDA00039390724800001514
a fourth current hidden state is indicated,
Figure BDA00039390724800001515
a ninth weight matrix is represented that is,
Figure BDA00039390724800001516
a ninth bias matrix is shown that is,
Figure BDA00039390724800001517
represents a fourth update weight;
and S58, taking the fourth current hidden state as a new third current hidden state, taking the fourth current cell state as a new third current cell state, repeating S54-S58 for a second preset number of times, and taking the last obtained fourth current hidden state as a prediction vector.
Optionally, the second preset number of times is set according to an actual situation.
And S24, inputting the prediction vector into an output layer for each prediction vector, and determining a second prediction destination corresponding to the prediction vector through the output layer.
Optionally, for each prediction vector, inputting the prediction vector into an output layer, and determining a second predicted destination corresponding to the prediction vector through the output layer, where the method includes:
for each prediction vector, determining a second prediction destination corresponding to the prediction vector by an eleventh formula, wherein the eleventh formula is as follows:
Figure BDA0003939072480000161
wherein ,
Figure BDA0003939072480000162
a second predicted destination is indicated and,
Figure BDA0003939072480000163
denotes a prediction vector, W d A tenth weight matrix representing presets, b d And a tenth bias matrix corresponding to the preset tenth weight matrix is shown.
Optionally, the prediction vector is the travel track data of the next time period predicted by each feature vector of the current preset time period, so that the difference between the position coordinate of the prediction vector and the position coordinate of the real destination is too large, or even has no correlation, even if the initial model learns the difference between the prediction vector and the real destination through the total loss value, the accuracy of the final prediction model is reduced due to the too large difference, and therefore, the obtained prediction vector needs to be evaluated to improve the accuracy of the prediction vector.
Optionally, the method further includes:
determining a score value corresponding to each prediction vector according to each prediction vector;
for each prediction vector, if the score value is larger than the threshold value, the prediction vector is used as a target prediction vector, and if the score value is smaller than the threshold value, S23-S24 are repeated until the score value is larger than the threshold value;
determining a score value corresponding to each second predicted destination according to each second predicted destination, wherein the score value comprises the following steps:
according to each prediction vector, determining a score value corresponding to each prediction vector through a thirteenth formula, wherein the thirteenth formula is as follows:
Figure BDA0003939072480000171
wherein, the S-score value represents Relu activation function, represents sigmoid activation function,
Figure BDA0003939072480000172
which represents the t-th prediction vector,
Figure BDA0003939072480000173
represents a preset eleventh weight matrix,
Figure BDA0003939072480000174
an eleventh bias matrix corresponding to the preset eleventh weight matrix is represented;
for each prediction vector, determining a second prediction destination to which the prediction vector corresponds, comprising:
for each target predictive vector, a second predicted destination corresponding to the target predictive vector is determined.
Optionally, the score value represents a similarity between a position coordinate of the prediction vector obtained according to the second trajectory data and the real destination, and when the similarity reaches a threshold, the similarity indicates that the prediction vector has a certain accuracy, so that the target prediction vector is screened out, and the second prediction destination is obtained according to the target prediction vector, so as to reduce a difference between the second prediction destination and the real destination, avoid an overlarge difference, and improve accuracy of the prediction model.
Optionally, the threshold is set according to actual conditions.
And S13, determining a total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations, wherein the total loss value represents a difference value between the second predicted destinations and the real destinations.
Optionally, determining a total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations includes:
determining a total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations by a twelfth formula, wherein the twelfth formula is as follows:
Figure BDA0003939072480000175
where Loss represents the total Loss value, Y represents the real destination,
Figure BDA0003939072480000176
a second predicted destination is indicated and,
Figure BDA0003939072480000179
coordinate values indicating a second predicted destination, (x, y) coordinate values indicating a real destination,
Figure BDA0003939072480000178
representing the distance between the second predicted destination and the actual destination.
And S14, if the total loss value meets the preset ending condition, taking the initial model meeting the preset ending condition as a prediction model, if the total loss value does not meet the preset ending condition, adjusting the network parameters of the initial network, and training the initial model again according to the adjusted network parameters until the total loss value of the initial model meets the preset ending condition.
After the prediction model is obtained through training, a first predicted destination of the vehicle can be predicted according to the prediction model and the driving track data generated in the current driving process of the vehicle.
As shown in fig. 2, a destination prediction system with a branch network according to an embodiment of the present invention includes:
a first track data obtaining module 201, configured to obtain first track data, where the first track data represents travel track data generated in a current travel process of a vehicle;
a prediction module 202 for inputting the first trajectory data into a prediction model, determining a first predicted destination of the vehicle from the prediction model;
the prediction module determines a first predicted destination of the vehicle through a prediction model, wherein the prediction model is obtained through training by a first unit, and the first unit is specifically used for:
acquiring a training sample, wherein the training sample comprises a plurality of second track data and a real destination corresponding to each track data, and for each second track data, the second track data represents the driving track data generated by the vehicle in a preset time period;
training the initial model according to the second track data to obtain a second predicted destination corresponding to each second cabinet machine data;
determining a total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations, wherein the total loss value represents a difference value between the second predicted destinations and the real destinations;
if the total loss value meets the preset ending condition, the initial model meeting the preset ending condition is used as a prediction model, if the total loss value does not meet the preset ending condition, the network parameters of the initial network are adjusted, and the initial model is trained again according to the adjusted network parameters until the total loss value of the initial model meets the preset ending condition.
Optionally, the initial model includes an input layer, a first decoder, a second decoder, and an output layer, and the system further includes a model training module, where the model training module includes:
the track vector acquisition module is used for inputting the second track data into the input layer and determining the track vector corresponding to each second track data through the input layer;
the characteristic vector acquisition module is used for inputting the track vector into the first decoder for each track vector, extracting the characteristics of the track vector through the first decoder and determining the characteristic vector corresponding to the track vector;
the predicted track vector acquisition module is used for inputting the feature vectors into a second decoder for each feature vector, determining the predicted vectors corresponding to the feature vectors through the second decoder, and representing the predicted track vectors of the vehicle in the next time period of the current preset time period;
and the second predicted destination module is used for inputting the predicted vector into the output layer and determining a second predicted destination corresponding to the predicted vector through the output layer.
Optionally, the track vector obtaining module determines, through the second unit, a track vector corresponding to each second track data, where the second unit is specifically configured to:
for each second track data, determining a track sequence corresponding to the second track data through a first formula of an input layer according to each position coordinate contained in the second track data, wherein the first formula is as follows:
X=[loc 1 ,loc 2 ,...,loc n ];
wherein X represents a sequence of tracks, loc i Representing a position coordinate in the second track data, wherein n represents the total number of the position coordinates in the second track data, i is more than or equal to 1 and less than or equal to n, and i is an integer;
and for each track sequence, determining a track vector corresponding to each track sequence through a second formula of the input layer according to the track sequence, wherein the second formula is as follows:
E=Relu(W e X+b);
wherein E represents a trajectory vector, W e Representing a preset first weight matrix which is subjected to random initialization in a standard normal distribution, b representing a first bias matrix corresponding to the preset first weight matrix, and Relu (x) representing an activation function, wherein x represents an input value of the activation function, and the activation function is defined as Relu (x) = max (x, 0).
Optionally, the feature vector obtaining module determines, by using a third unit, a feature vector corresponding to the track vector, where the third unit specifically includes:
the first subunit is used for acquiring a first initialized cell state and a first initialized hidden state of the first decoder, and the first initialized cell state and the first initialized hidden state are zero matrixes;
the second subunit is used for randomly initializing a second weight matrix, a third weight matrix, a fourth weight matrix and a fifth weight matrix from the standard positive-Tailored distribution, and a second bias matrix corresponding to the second weight matrix, a third bias matrix corresponding to the third weight matrix, a fourth bias matrix corresponding to the fourth weight matrix and a fifth bias matrix corresponding to the fifth weight matrix;
a third subunit, configured to use the first initialized hidden state as a first current hidden state, and use the first initialized cell state as a first current cell state;
the fourth subunit is configured to determine, according to the second weight matrix, the second bias matrix, the third weight matrix, the third bias matrix, the first current hidden state, and the trajectory vector, a first forgetting weight and a first updating weight according to a third formula, where the third formula is:
Figure BDA0003939072480000201
wherein ,ft 1 Represents a first forgetting weight, and sigma represents a sigmoid function, wherein the sigmoid function is defined as
Figure BDA0003939072480000202
A second weight matrix is represented that is,
Figure BDA0003939072480000203
a second bias matrix is represented that is,
Figure BDA0003939072480000204
indicating the first current hidden state of the network,
Figure BDA0003939072480000205
is shown asAn update weight, W i 1 A third weight matrix is represented that represents a third weight matrix,
Figure BDA0003939072480000206
denotes a third bias matrix, e t Representing the t-th track vector;
a fifth subunit, configured to determine, according to the first current hidden state, the fourth weight matrix, the fourth bias matrix, and the trajectory vector, a first update amount of the cell state at the current time according to a fourth formula, where the fourth formula is:
Figure BDA0003939072480000207
wherein ,
Figure BDA0003939072480000208
represents the first update amount, and tanh represents a tanh function, wherein the tanh function is defined as
Figure BDA0003939072480000209
A fourth weight matrix is represented which is,
Figure BDA00039390724800002010
representing a fourth bias matrix;
a sixth subunit, configured to determine, according to the first forgetting weight, the first update weight, the first current cell state, and the first update amount, a second current cell state at a time next to the current time by using a fifth formula, where the fifth formula is:
Figure BDA0003939072480000211
wherein ,
Figure BDA0003939072480000212
indicating the second current state of the cell or cells,
Figure BDA0003939072480000213
representing a first current cell state;
a seventh subunit, configured to determine, according to the fifth weight matrix, the fifth bias matrix, the first current hidden state, and the cell state and trajectory vector at the next time of the current time, a second current hidden state at the next time of the current time according to a sixth formula, where the sixth formula is:
Figure BDA0003939072480000214
wherein ,
Figure BDA0003939072480000215
indicating the second current hidden state and,
Figure BDA0003939072480000216
a fifth weight matrix is represented by a fifth weight matrix,
Figure BDA0003939072480000217
a fifth bias matrix is represented that is,
Figure BDA0003939072480000218
representing a second update weight;
and the eighth subunit is configured to use the second current hidden state as a new first current hidden state, use the second current cell state as a new first current cell state, repeat the processing from the fourth subunit to the eighth subunit for a first preset number of times, and use the last obtained second current hidden state as a feature vector corresponding to the trajectory vector.
Optionally, the predicted trajectory vector obtaining module determines the predicted trajectory vector through a fourth unit, where the fourth unit specifically includes:
the ninth subunit is configured to obtain a second initialized hidden state and a second initialized cell state of the second decoder, where the second initialized hidden state and the second initialized cell state are both zero matrices;
a tenth subunit, configured to randomly initialize a sixth weight matrix, a seventh weight matrix, an eighth weight matrix, and a ninth weight matrix from the normal positive distribution, and a sixth bias matrix corresponding to the sixth weight matrix, a seventh bias matrix corresponding to the seventh weight matrix, an eighth bias matrix corresponding to the eighth weight matrix, and a ninth bias matrix corresponding to the ninth weight matrix;
an eleventh subunit, configured to use the feature vector as a third current hidden state, and use the second initialized cell state as a third current cell state;
a twelfth subunit, configured to determine, according to a sixth weight matrix, a sixth bias matrix, a seventh weight matrix, a seventh bias matrix, a third current hidden state, and a second initialized hidden state, a second forgetting weight and a third updating weight according to a seventh formula, where the seventh formula is:
Figure BDA0003939072480000221
wherein ,ft 2 Represents a second forgetting weight, and σ represents a sigmoid function, wherein the sigmoid function is defined as
Figure BDA0003939072480000222
A sixth weight matrix is represented which is,
Figure BDA0003939072480000223
a sixth bias matrix is represented that is,
Figure BDA0003939072480000224
a third current hidden state is represented which,
Figure BDA0003939072480000225
represents a third update weight, W i 2 A seventh weight matrix is represented which is,
Figure BDA0003939072480000226
denotes a seventh bias matrix, d t Representing the second initial point corresponding to the t-th feature vectorInitializing a hidden state;
a thirteenth subunit, configured to determine, according to the third current hidden state, the second initialized hidden state, the eighth weight matrix, and the eighth bias matrix, a second update amount of the cell state at the current time according to an eighth formula, where the eighth formula is:
Figure BDA0003939072480000227
wherein ,
Figure BDA0003939072480000228
represents the second update amount, and tanh represents a tanh function, wherein the tanh function is defined as
Figure BDA0003939072480000229
An eighth weight matrix is represented by a second weight matrix,
Figure BDA00039390724800002210
representing an eighth bias matrix;
a fourteenth subunit, configured to determine, according to the second forgetting weight, the second updating weight, the third current cell state, and the second updating amount, a fourth current cell state at a time next to the current time through a ninth formula, where the ninth formula is:
Figure BDA00039390724800002211
wherein ,
Figure BDA00039390724800002212
indicating the fourth current state of the cell,
Figure BDA00039390724800002213
representing a third current cell state;
a fifteenth subunit, configured to determine, according to the ninth weight matrix, the ninth bias matrix, the third current hidden state, the second initialized hidden state, and the fourth current cell state, a fourth current hidden state at a next time next to the current time by a tenth formula, where the tenth formula is:
Figure BDA0003939072480000231
wherein ,
Figure BDA0003939072480000232
a fourth current hidden state is indicated,
Figure BDA0003939072480000233
a ninth weight matrix is represented by the first weight matrix,
Figure BDA0003939072480000234
a ninth bias matrix is shown that is,
Figure BDA0003939072480000235
represents a fourth update weight;
and a sixteenth subunit, configured to use the fourth current hidden state as a new third current hidden state, use the fourth current cell state as a new third current cell state, repeat the processing from the twelfth subunit to the sixteenth subunit for a second preset number of times, and use the last obtained fourth current hidden state as the prediction vector.
Optionally, the second predicted destination obtaining module determines the second predicted destination through a fifth unit, where the fifth unit is specifically configured to:
for each prediction vector, determining a second prediction destination corresponding to the prediction vector by an eleventh formula, wherein the eleventh formula is as follows:
Figure BDA0003939072480000236
wherein ,
Figure BDA0003939072480000237
a second predicted destination is indicated and,
Figure BDA0003939072480000238
denotes a prediction vector, W d A tenth weight matrix representing presets, b d And a tenth bias matrix corresponding to the preset tenth weight matrix is represented.
Optionally, the system further comprises:
the score value calculation module is configured to determine, according to each prediction vector, a score value corresponding to each prediction vector, where determining, according to each second predicted destination, a score value corresponding to each second predicted destination includes:
according to each prediction vector, determining a score value corresponding to each prediction vector through a thirteenth formula, wherein the thirteenth formula is as follows:
Figure BDA0003939072480000239
wherein, the S-score value represents Relu activation function, represents sigmoid activation function,
Figure BDA00039390724800002310
which represents the t-th prediction vector,
Figure BDA00039390724800002311
represents a preset eleventh weight matrix,
Figure BDA00039390724800002312
an eleventh bias matrix corresponding to the preset eleventh weight matrix is represented;
the score value comparison module is used for taking the prediction vector as a target prediction vector if the score value is larger than a threshold value for each prediction vector, and repeating S23-S24 if the score value is smaller than the threshold value until the score value is larger than the threshold value;
optionally, when determining the total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations, the first unit is specifically configured to:
determining a total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations by a twelfth formula, wherein the twelfth formula is:
Figure BDA0003939072480000241
where Loss represents the total Loss value, Y represents the real destination,
Figure BDA0003939072480000242
a second predicted destination is indicated and,
Figure BDA0003939072480000245
coordinate values indicating a second predicted destination, (x, y) coordinate values indicating a real destination,
Figure BDA0003939072480000244
representing the distance between the second predicted destination and the actual destination.
An electronic device according to an embodiment of the present invention includes a memory, a processor, and a program stored in the memory and running on the processor, where the processor implements part or all of the steps of the above-described destination prediction method with a branch network when executing the program.
The electronic device may be a computer, and correspondingly, the program of the electronic device is computer software, and the above parameters and steps in the electronic device according to the present invention may refer to the parameters and steps in the embodiment of the destination prediction method with a branch network, which are not described herein again.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A destination prediction method with a branch network is characterized by comprising the following steps:
acquiring first track data, wherein the first track data represents driving track data generated in the current driving process of a vehicle;
inputting the first trajectory data into a prediction model, and determining a first predicted destination of the vehicle through the prediction model, wherein the prediction model is trained by:
s11, obtaining a training sample, wherein the training sample comprises a plurality of second track data and a real destination corresponding to each second track data, and for each second track data, the second track data represents historical driving track data generated by the vehicle in a preset time period;
s12, training an initial model according to the second track data to obtain a second predicted destination corresponding to each second track data;
s13, determining a total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations, wherein the total loss value represents a difference value between the second predicted destinations and the real destinations;
and S14, if the total loss value meets a preset ending condition, taking the initial model meeting the preset ending condition as the prediction model, if the total loss value does not meet the preset ending condition, adjusting the network parameters of the initial network, and retraining the initial model according to the adjusted network parameters until the total loss value of the initial model meets the preset ending condition.
2. The method of claim 1, wherein the initial model comprises an input layer, a first decoder, a second decoder, and an output layer;
the training an initial model according to each second trajectory data to obtain a second predicted destination corresponding to each second trajectory data includes:
s21, inputting the second track data into the input layer, and determining a track vector corresponding to each second track data through the input layer;
s22, inputting the track vector into the first decoder for each track vector, extracting the features of the track vector through the first decoder, and determining a feature vector corresponding to the track vector;
s23, inputting the feature vector into the second decoder for each feature vector, and determining a prediction vector corresponding to the feature vector through the second decoder, wherein the prediction vector represents a predicted track vector of the vehicle in a next time period of a current preset time period;
and S24, inputting the prediction vector into the output layer for each prediction vector, and determining a second prediction destination corresponding to the prediction vector through the output layer.
3. The method according to claim 2, wherein for each of the second trace data, the second trace data includes a plurality of position coordinates, the inputting each of the second trace data into the input layer, and determining a trace vector corresponding to each of the second trace data through the input layer includes:
s31, for each second track data, according to each position coordinate included in the second track data, determining a track sequence corresponding to the second track data through a first formula of the input layer, where the first formula is:
X=[loc 1 ,loc 2 ,...,loc n ];
wherein X represents a sequence of tracks, loc i Representing a position coordinate in the second track data, wherein n represents the total number of the position coordinates in the second track data, i is more than or equal to 1 and less than or equal to n, and i is an integer;
s32, determining a track vector corresponding to each track sequence through a second formula of the input layer according to the track sequence, wherein the second formula is as follows:
E=Relu(W e X+b);
wherein E represents a trajectory vector, W e Representing a preset first weight matrix which is subjected to random initialization in a standard normal distribution, b representing a first bias matrix corresponding to the preset first weight matrix, and Relu (x) representing an activation function, wherein x represents an input value of the activation function, and the activation function is defined as Relu (x) = max (x, 0).
4. The method of claim 3, wherein for each of the trajectory vectors, inputting the trajectory vector into the first decoder, extracting features of the trajectory vector through the first decoder, and determining a feature vector corresponding to the trajectory vector comprises:
for each track vector, inputting the track vector into the first decoder, and determining a feature vector corresponding to the track vector through a first step, wherein the first step comprises:
s41, acquiring a first initialized cell state and a first initialized hidden state of the first decoder, wherein the first initialized cell state and the first initialized hidden state are zero matrixes;
s42, randomly initializing a second weight matrix, a third weight matrix, a fourth weight matrix and a fifth weight matrix from standard positive-Taiwan distribution, and a second bias matrix corresponding to the second weight matrix, a third bias matrix corresponding to the third weight matrix, a fourth bias matrix corresponding to the fourth weight matrix and a fifth bias matrix corresponding to the fifth weight matrix;
s43, taking the first initialized hidden state as a first current hidden state, and taking the first initialized cell state as a first current cell state;
s44, determining a first forgetting weight and a first updating weight according to the second weight matrix, the second bias matrix, the third weight matrix, the third bias matrix, the first current hidden state and the track vector through a third formula, wherein the third formula is as follows:
Figure FDA0003939072470000031
wherein ,ft 1 Representing a first forgetting weight, sigma representing a sigmoid function, wherein the sigmoid function is defined as
Figure FDA0003939072470000032
Figure FDA0003939072470000033
A second weight matrix is represented that represents a second weight matrix,
Figure FDA0003939072470000034
a second bias matrix is represented that is,
Figure FDA0003939072470000035
indicating the first current hidden state of the network,
Figure FDA0003939072470000036
represents a first update weight, W i 1 A third weight matrix is represented that is,
Figure FDA0003939072470000037
denotes a third bias matrix, e t Representing the t-th track vector;
s45, determining a first updating amount of the cell state at the current moment through a fourth formula according to the first current hidden state, a fourth weight matrix, a fourth bias matrix and a track vector, wherein the fourth formula is as follows:
Figure FDA0003939072470000041
wherein ,
Figure FDA0003939072470000042
represents the first update amount, and tanh represents a tanh function, wherein the tanh function is defined as
Figure FDA0003939072470000043
Figure FDA0003939072470000044
A fourth weight matrix is represented which is,
Figure FDA0003939072470000045
representing a fourth bias matrix;
s46, determining a second current cell state at the next moment of the current moment according to the first forgetting weight, the first updating weight, the first current cell state and the first updating amount by a fifth formula, wherein the fifth formula is as follows:
Figure FDA0003939072470000046
wherein ,
Figure FDA0003939072470000047
indicating the second current state of the cell,
Figure FDA0003939072470000048
representing a first current cell state;
s47, determining a second current hidden state at the next moment of the current moment according to the fifth weight matrix, the fifth bias matrix, the first current hidden state, the cell state and the track vector at the next moment of the current moment by a sixth formula, wherein the sixth formula is as follows:
Figure FDA0003939072470000049
wherein ,
Figure FDA00039390724700000410
a second current hidden state is represented, which,
Figure FDA00039390724700000411
a fifth weight matrix is represented which is,
Figure FDA00039390724700000412
a fifth bias matrix is represented that is,
Figure FDA00039390724700000413
representing a second update weight;
and S48, taking the second current hidden state as a new first current hidden state, taking the second current cell state as a new first current cell state, repeating the steps S44-S48 for a first preset time, and taking the last obtained second current hidden state as a feature vector corresponding to the track vector.
5. The method of claim 4, wherein for each of the feature vectors, inputting the feature vector into the second decoder, and determining a predicted vector corresponding to the feature vector by the second decoder, the predicted vector characterizing a predicted trajectory vector of the vehicle for a time period next to the current preset time period, comprises:
for each feature vector, inputting the feature vector into the second decoder, and determining a prediction vector corresponding to the feature vector through a second step, wherein the second step comprises:
s51, acquiring a second initialized hidden state and a second initialized cell state of a second decoder, wherein the second initialized hidden state and the second initialized cell state are both zero matrixes;
s52, randomly initializing a sixth weight matrix, a seventh weight matrix, an eighth weight matrix and a ninth weight matrix from the standard positive-Taiwan distribution, and a sixth bias matrix corresponding to the sixth weight matrix, a seventh bias matrix corresponding to the seventh weight matrix, an eighth bias matrix corresponding to the eighth weight matrix and a ninth bias matrix corresponding to the ninth weight matrix;
s53, taking the feature vector as a third current hidden state, and taking the second initialized cell state as a third current cell state;
s54, determining a second forgetting weight and a third updating weight according to the sixth weight matrix, the sixth bias matrix, the seventh weight matrix, the seventh bias matrix, the third current hidden state and the second initialized hidden state by using a seventh formula, wherein the seventh formula is:
Figure FDA0003939072470000051
wherein ,ft 2 Represents a second forgetting weight, and σ represents a sigmoid function, wherein the sigmoid function is defined as
Figure FDA0003939072470000052
Figure FDA0003939072470000053
A sixth weight matrix is represented which is,
Figure FDA0003939072470000054
a sixth bias matrix is represented that is,
Figure FDA0003939072470000055
a third current hidden state is represented which,
Figure FDA0003939072470000056
represents a third update weight, W i 2 A seventh weight matrix is represented which is,
Figure FDA0003939072470000057
denotes a seventh bias matrix, d t To representA second initialized hidden state corresponding to the t-th feature vector;
s55, determining a second updated quantity of the cell state at the current time according to the third current hidden state, the second initialized hidden state, the eighth weight matrix and the eighth bias matrix by using an eighth formula, where the eighth formula is:
Figure FDA0003939072470000058
wherein ,
Figure FDA0003939072470000059
represents the second update amount, and tanh represents a tanh function, wherein the tanh function is defined as
Figure FDA0003939072470000061
W c 2 An eighth weight matrix is represented that is,
Figure FDA0003939072470000062
representing an eighth bias matrix;
s56, determining a fourth current cell state at a next time next to the current time according to the second forgetting weight, the second updating weight, the third current cell state, and the second updating amount by using a ninth formula, where the ninth formula is:
Figure FDA0003939072470000063
wherein ,
Figure FDA0003939072470000064
indicating the fourth current state of the cell,
Figure FDA0003939072470000065
representing a third current cell state;
s57, determining a fourth current hidden state at a next time next to the current time according to the ninth weight matrix, the ninth bias matrix, the third current hidden state, the second initialized hidden state, and the fourth current cell state by a tenth formula, where the tenth formula is:
Figure FDA0003939072470000066
wherein ,
Figure FDA0003939072470000067
a fourth current hidden state is indicated,
Figure FDA0003939072470000068
a ninth weight matrix is represented that is,
Figure FDA0003939072470000069
a ninth bias matrix is shown and described,
Figure FDA00039390724700000610
represents a fourth update weight;
and S58, taking the fourth current hidden state as a new third current hidden state, taking the fourth current cell state as a new third current cell state, repeating S54-S58 for a second preset number of times, and taking the last obtained fourth current hidden state as a prediction vector.
6. The method of claim 5, wherein for each of the predicted vectors, inputting the predicted vector to the output layer, and determining a second predicted destination for the predicted vector by the output layer comprises:
for each prediction vector, determining a second prediction destination corresponding to the prediction vector by an eleventh formula, wherein the eleventh formula is as follows:
Figure FDA00039390724700000611
wherein ,
Figure FDA00039390724700000612
a second predicted destination is indicated and,
Figure FDA00039390724700000613
denotes a prediction vector, W d A tenth weight matrix representing presets, b d And a tenth bias matrix corresponding to the preset tenth weight matrix is represented.
7. The method of claim 6, wherein determining a total loss value for the initial model based on the plurality of second predicted destinations and the plurality of real destinations comprises:
determining a total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations by a twelfth formula, wherein the twelfth formula is:
Figure FDA0003939072470000071
where Loss represents the total Loss value, Y represents the real destination,
Figure FDA0003939072470000072
a second predicted destination is indicated and,
Figure FDA0003939072470000073
coordinate values indicating a second predicted destination, (x, y) coordinate values indicating a real destination,
Figure FDA0003939072470000074
representing the distance between the second predicted destination and the actual destination.
8. The method of any one of claims 1-7, further comprising:
determining a score value corresponding to each prediction vector according to each prediction vector;
for each prediction vector, if the score value is greater than a threshold value, the prediction vector is taken as a target prediction vector, and if the score value is less than the threshold value, S23-S24 are repeated until the score value is greater than the threshold value;
determining a score value corresponding to each second predicted destination according to each second predicted destination, including:
according to each prediction vector, determining a score value corresponding to each prediction vector through a thirteenth formula, wherein the thirteenth formula is as follows:
Figure FDA0003939072470000075
wherein, the S-score value represents Relu activation function, represents sigmoid activation function,
Figure FDA0003939072470000076
denotes the t-th prediction vector, W s 1 、W s 2 Represents a preset eleventh weight matrix,
Figure FDA0003939072470000077
an eleventh bias matrix corresponding to the preset eleventh weight matrix is represented;
for each of the predicted vectors, determining a second predicted destination to which the predicted vector corresponds, including:
and for each target prediction vector, determining a second prediction destination corresponding to the target prediction vector.
9. A destination prediction system with a branch network, comprising:
the first track data acquisition module is used for acquiring first track data, and the first track data represents driving track data generated in the current driving process of a vehicle;
the prediction module is used for inputting the first track data into a prediction model and determining a first predicted destination of the vehicle through the prediction model;
the prediction module determines a first predicted destination of the vehicle through a prediction model, wherein the prediction model is trained through a first unit, and the first unit is specifically configured to:
acquiring a training sample, wherein the training sample comprises a plurality of second track data and a real destination corresponding to each track data, and for each second track data, the second track data represents driving track data generated by the vehicle in a preset time period;
training an initial model according to the second track data to obtain a second predicted destination corresponding to each second cabinet machine data;
determining a total loss value of the initial model according to the plurality of second predicted destinations and the plurality of real destinations, wherein the total loss value represents a difference value between the second predicted destinations and the real destinations;
if the total loss value meets a preset ending condition, taking the initial model meeting the preset ending condition as the prediction model, if the total loss value does not meet the preset ending condition, adjusting the network parameters of the initial network, and re-training the initial model according to the adjusted network parameters until the total loss value of the initial model meets the preset ending condition.
10. An electronic device comprising a memory, a processor and a program stored on the memory and running on the processor, wherein the processor when executing the program implements the steps of a method of destination prediction with a branch network according to any of claims 1 to 7.
CN202211414015.3A 2022-11-11 2022-11-11 Destination prediction method and system with branch network and electronic equipment Active CN115759383B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211414015.3A CN115759383B (en) 2022-11-11 2022-11-11 Destination prediction method and system with branch network and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211414015.3A CN115759383B (en) 2022-11-11 2022-11-11 Destination prediction method and system with branch network and electronic equipment

Publications (2)

Publication Number Publication Date
CN115759383A true CN115759383A (en) 2023-03-07
CN115759383B CN115759383B (en) 2023-09-15

Family

ID=85369790

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211414015.3A Active CN115759383B (en) 2022-11-11 2022-11-11 Destination prediction method and system with branch network and electronic equipment

Country Status (1)

Country Link
CN (1) CN115759383B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112257850A (en) * 2020-10-26 2021-01-22 河南大学 Vehicle track prediction method based on generation countermeasure network
CN112749825A (en) * 2019-10-31 2021-05-04 华为技术有限公司 Method and device for predicting destination of vehicle

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749825A (en) * 2019-10-31 2021-05-04 华为技术有限公司 Method and device for predicting destination of vehicle
CN112257850A (en) * 2020-10-26 2021-01-22 河南大学 Vehicle track prediction method based on generation countermeasure network

Also Published As

Publication number Publication date
CN115759383B (en) 2023-09-15

Similar Documents

Publication Publication Date Title
CN113326731B (en) Cross-domain pedestrian re-identification method based on momentum network guidance
CN111629380B (en) Dynamic resource allocation method for high concurrency multi-service industrial 5G network
CN108346293B (en) Real-time traffic flow short-time prediction method
CN113852432B (en) Spectrum Prediction Sensing Method Based on RCS-GRU Model
CN112651374B (en) Future trajectory prediction method based on social information and automatic driving system
CN109919302B (en) Training method and device for neural network of image
CN113993172A (en) Ultra-dense network switching method based on user movement behavior prediction
CN111884854B (en) Virtual network traffic migration method based on multi-mode hybrid prediction
CN115759383A (en) Destination prediction method and system with branch network and electronic equipment
CN116259057A (en) Method for solving data heterogeneity problem in federal learning based on alliance game
CN115640852B (en) Federal learning participation node selection optimization method, federal learning method and federal learning system
CN115015908A (en) Radar target data association method based on graph neural network
CN114972429A (en) Target tracking method and system for cloud edge collaborative self-adaptive inference path planning
CN115331460A (en) Large-scale traffic signal control method and device based on deep reinforcement learning
CN114724245A (en) CSI-based incremental learning human body action identification method
CN115102868A (en) Web service QoS prediction method based on SOM clustering and depth self-encoder
CN115086992A (en) Distributed semantic communication system and bandwidth resource allocation method and device
US11475255B2 (en) Method for adaptive context length control for on-line edge learning
CN113313249B (en) Dynamic integrated training method based on reinforcement learning system
CN113420706A (en) Vehicle detection method based on multi-layer feature fusion
CN113572732B (en) Multi-step attack modeling and prediction method based on VAE and aggregated HMM
CN113793604B (en) Speech recognition system optimization method and device
CN115424429B (en) ECO-CACC control method and system based on deep reinforcement learning
CN114157544B (en) Frame synchronization method, device and medium based on convolutional neural network
CN112734030B (en) Unmanned platform decision learning method for empirical playback sampling by using state similarity

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant