Prediction method, training method, device, electronic device and readable storage medium
By combining the word order translation model and the memory network model, and using time characteristics and heterogeneous characteristics to predict parking lot traffic, the problem of poor prediction accuracy in the prior art is solved, and more efficient vehicle traffic prediction and resource scheduling are achieved.
Patent Information
- Application Number
- CN202011291767.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-18
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2040-11-18
AI Technical Summary
The existing parking lot flow prediction scheme is based on characteristics such as inflow, outflow and parking saturation, which leads to poor prediction accuracy, which cannot effectively improve the efficiency of parking lot resource scheduling and reduce operational difficulties.
Using the combination method of word order translation model and memory network model, the description vector and prediction vector are generated by inputting time features and traffic features into the first layer model, and combining heterogeneous features such as region types and personality features, through memory matrix and attention mechanism Match and integrate to generate more accurate traffic prediction results.
It improves the accuracy of parking lot traffic prediction, enhances the consideration of parking lot type characteristics, improves the reusability and adaptability of the prediction model, and can more accurately reflect the traffic trends of different parking lots.
Smart Images

Figure CN113822458B_ABST
Abstract
Description
Background Art
[0002] In the construction of smart cities, parking lots are an indispensable building block. Therefore, maintaining a high service level in parking lots is the key to ensuring the operational efficiency of transportation and surrounding businesses and facilitating residents' travel. Among them, by predicting parking lot traffic, it can not only help drivers quickly find parking spaces to ease or solve traffic congestion in the area around the parking lot, but also improve the efficiency of scheduling parking lot resources to reduce the difficulty of parking lot operations.
[0003] The existing parking lot flow prediction scheme predicts the flow of parking lots based on the historical flow records of the parking lot, which has the following problems:
[0004] Since the existing parking lot flow prediction solutions are mainly based on features such as inflow, outflow and parking saturation, the prediction accuracy is poor.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the present disclosure is to provide a method for predicting parking lot flow, a method for training a flow prediction model, a device, an electronic device and a computer-readable storage medium, which at least to a certain extent overcome the problem of poor accuracy in parking lot flow prediction in related technologies.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0008] According to one aspect of the present disclosure, a method for predicting parking lot flow is provided, comprising: inputting time characteristics and corresponding flow characteristics of a target parking lot into a first-layer model to output a description vector and a first prediction vector describing the flow trend, wherein the first-layer model is a word order translation model; inputting the description vector, the first prediction vector and heterogeneous features of the target parking lot into a second-layer model to obtain a second prediction vector based on the description vector and the heterogeneous features; and obtaining the predicted flow of the target parking lot based on the first prediction vector and the second prediction vector, wherein the second-layer model is a memory network model.
[0009] In one embodiment, the memory network model includes an attention mechanism structure and a memory matrix, wherein the memory matrix is constructed based on different heterogeneous features; the description vector, the first prediction vector and the heterogeneous features of the target parking lot are input into the second layer model, and a second prediction vector is obtained based on the description vector and the heterogeneous features. The method includes: inputting the description vector and the heterogeneous features into the attention mechanism structure, and performing a matching operation with the memory matrix; integrating the results of the matching operation to generate an integrated vector, which describes the traffic trend under the different heterogeneous features; and obtaining the second prediction vector based on the integrated vector and the heterogeneous features of the target parking lot.
[0010] In one embodiment, it also includes: configuring the heterogeneous characteristics of the target parking lot based on the area type and / or business type of the area where the target parking lot is located, wherein the area type includes at least one of a transportation hub area, a business district area, an office area and a residential area.
[0011] In one embodiment, obtaining the predicted traffic of the target parking lot based on the first prediction vector and the second prediction vector includes: fusing the first prediction vector and the second prediction vector to obtain a fused vector; inputting the fused vector and the individual characteristics of the target parking lot into a third-layer model to perform full-connection processing on the fused vector and the individual characteristics, the third-layer model being a fully-connected network model; generating the predicted traffic based on the processing result of the full-connection processing, and causing the third-layer model to output the predicted traffic.
[0012] In one embodiment, obtaining the predicted traffic of the target parking lot based on the first prediction vector and the second prediction vector includes: performing full-connection processing on the first prediction vector and the second prediction vector; generating the predicted traffic based on the processing result of the full-connection processing, and allowing the second layer model to output the predicted traffic.
[0013] In one embodiment, the word order translation model includes a Seq2Seq network, and the inputting of isomorphic features of the target parking lot into the first layer model to output a description vector and a first prediction vector describing the traffic trend includes: the isomorphic features include time features and corresponding traffic features, and the time features and the traffic features are preprocessed to generate corresponding preprocessing vectors; the preprocessing vector is input into the encoder of the Seq2Seq network for encoding to obtain the description vector; the description vector and the prediction features related to the prediction time are input into the decoder of the Seq2Seq network for decoding to obtain the first prediction vector.
[0014] In one embodiment, the step of inputting the time characteristics and flow characteristics of the target parking lot into the first layer model to output a description vector and a first prediction vector describing the flow trend includes: preprocessing the time characteristics and the flow characteristics to generate corresponding preprocessing vectors; inputting the preprocessing vectors into the encoder of the Seq2Seq network for encoding to obtain the description vector; and inputting the description vector and the prediction characteristics related to the prediction time into the decoder of the Seq2Seq network for decoding to obtain the first prediction vector.
[0015] In one embodiment, the step of inputting the description vector and the prediction features related to the prediction time into the decoder in the Seq2Seq network for decoding to obtain the first prediction vector also includes: determining the time features of the prediction time and the prediction results of the previous moment as the prediction features; and collaboratively decoding the description vector and the prediction features to obtain the first prediction vector.
[0016] According to another aspect of the present disclosure, a method for training a traffic prediction model is provided, comprising: performing model training of a word order translation model based on historical data of a plurality of parking lots to generate a first-layer model, the plurality of parking lots including a target parking lot, the historical data including isomorphic features of the plurality of parking lots; performing model training of a memory network on the output data of the first-layer model and the heterogeneous features of the target parking lot using a transfer learning method to obtain a second-layer model; and generating a traffic prediction model for the target parking lot based on the first-layer model and the second-layer model.
[0017] In one embodiment, the word order translation model includes a Seq2Seq network, and the model training of the word order translation model based on historical data of multiple parking lots to generate a first-layer model includes: the isomorphic features of the parking lot include a first isomorphic feature of the target parking lot and a second isomorphic feature of other parking lots, and the model training of the Seq2Seq network is performed through the second isomorphic feature to obtain a basic model; the training result of the basic model is transferred to the first-layer model to be trained, and the first-layer model to be trained is model trained through the first isomorphic feature to obtain the trained first-layer model.
[0018] In one embodiment, the word order translation model includes a Seq2Seq network, and the model training of the word order translation model based on historical data of multiple parking lots to generate a first-layer model includes: the isomorphic features of the parking lot include a first isomorphic feature of the target parking lot and a second isomorphic feature of other parking lots, and multiple training task sets are generated according to the second isomorphic features; a meta-learning model of the Seq2Seq network is generated according to the multiple training task sets; and model learning is performed on the meta-learning model based on the first isomorphic features to obtain the first-layer model.
[0019] In one embodiment, the transfer learning method is used to perform model training of a memory network on the output data of the first layer model and the heterogeneous features of the target parking lot to obtain the second layer model, including: performing model training of the memory network through the training parameters of the first layer model to obtain structural parameters and a memory matrix of the attention structure in the memory network; migrating the structural parameters and the memory matrix to the second layer model to be trained, and performing model training on the second layer model to be trained through the heterogeneous features of the target parking lot to obtain the trained second layer model.
[0020] In one embodiment, the generation of the traffic prediction model of the target parking lot based on the first layer model and the second layer model includes: performing model training of a fully connected network on the output data of the first layer model, the output data of the second layer model, and the individual characteristics of the target parking lot to obtain a third layer model; and generating the traffic prediction model based on the first layer model, the second layer model, and the third layer model.
[0021] According to another aspect of the present disclosure, a device for predicting parking lot flow is provided, including: a first prediction module, used to input homogeneous features of a target parking lot into a first layer model to output a description vector describing flow trends and a first prediction vector, wherein the first layer model is a word order translation model; an input module, used to input the description vector, the first prediction vector and heterogeneous features of the target parking lot into a second layer model, and obtain a second prediction vector based on the description vector and the heterogeneous features, wherein the second layer model is a memory network model; a second prediction module, used to input the first prediction vector into the second layer model, and obtain the predicted flow of the target parking lot based on the first prediction vector and the second prediction vector.
[0022] According to another aspect of the present disclosure, a training device for a traffic prediction model is provided, including: a first training module, used to perform model training of a word order translation model based on historical data of multiple parking lots to generate a first layer model, the multiple parking lots include a target parking lot, and the historical data include isomorphic features of the multiple parking lots; a second training module, used to perform model training of a memory network on the output data of the first layer model and the heterogeneous features of the target parking lot by adopting a transfer learning method to obtain a second layer model; and a generation module, used to generate a traffic prediction model for the target parking lot based on the first layer model and the second layer model.
[0023] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any of the above-mentioned parking lot flow prediction methods and / or flow prediction model training methods by executing the executable instructions.
[0024] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned methods for predicting parking lot flow and / or methods for training a flow prediction model is implemented.
[0025] The parking lot flow prediction scheme provided by the embodiment of the present disclosure sets a flow prediction model including a first layer model and a second layer model, so as to obtain a description vector and a first prediction vector through a word order translation model in the first layer model, wherein the description vector is used to reflect the flow trend of the target parking lot to be predicted, and the first prediction vector is used to express the preliminary prediction result based on the isomorphic features, and further, the description vector and the first prediction vector are input into the second layer model, so as to obtain a description of the flow trend based on the type of the target parking lot through the heterogeneous features specific to the acquired target parking lot, and then obtain the second prediction vector according to the description, and the second prediction vector is used to express the further prediction result based on the heterogeneous features.
[0026] Furthermore, the predicted traffic flow of the target parking lot is obtained according to the first prediction vector and the second prediction vector, and the collaborative processing of homogeneous features and heterogeneous features is realized to predict the traffic flow of the target parking lot. That is, on the basis of the prediction based on the general performance of the parking lot, heterogeneous features that describe the special performance of the parking lot are further added as input parameters to predict the traffic flow based on the target parking lot type, which can improve the accuracy of the parking lot traffic flow prediction.
[0027] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0029] Figure 1 A schematic diagram showing a parking lot flow prediction system structure in an embodiment of the present disclosure;
[0030] Figure 2 A flow chart showing a method for predicting parking lot flow in an embodiment of the present disclosure;
[0031] Figure 3 A schematic diagram showing the structure of the second layer model in the parking lot flow prediction solution of the embodiment of the present disclosure;
[0032] Figure 4 A flow chart showing another method for predicting parking lot flow in an embodiment of the present disclosure;
[0033] Figure 5 A flowchart showing another method for predicting parking lot flow in an embodiment of the present disclosure;
[0034] Figure 6 A schematic diagram showing the structure of a prediction model for parking lot flow according to an embodiment of the present disclosure;
[0035] Figure 7 A flowchart showing another method for predicting parking lot flow in an embodiment of the present disclosure;
[0036] Figure 8 A flowchart showing another method for predicting parking lot flow in an embodiment of the present disclosure;
[0037] Fig. 9 A schematic diagram showing the structure of the first layer model in the parking lot flow prediction solution of the embodiment of the present disclosure;
[0038] Fig.10 A flow chart showing a method for training a traffic prediction model in an embodiment of the present disclosure;
[0039] Fig.11 A schematic diagram showing the training of a traffic prediction model in an embodiment of the present disclosure is shown;
[0040] Fig.12 A flow chart showing another method for training a traffic prediction model in an embodiment of the present disclosure;
[0041] Fig.13A flow chart showing a method for training a flow prediction model according to another embodiment of the present disclosure;
[0042] Fig.14 A flow chart showing a method for training a traffic prediction model according to another embodiment of the present disclosure;
[0043] Fig.15 A flow chart showing a method for training a traffic prediction model according to another embodiment of the present disclosure;
[0044] Fig.16 A schematic diagram showing a parking lot flow prediction device according to an embodiment of the present disclosure;
[0045] Fig.17 A schematic diagram showing a training device for a traffic prediction model in an embodiment of the present disclosure;
[0046] Fig.18 A schematic diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0047] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0048] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0049] The solution provided in the present application obtains the predicted traffic flow of the target parking lot based on the first prediction vector and the second prediction vector, thereby realizing the collaborative processing of homogeneous features and heterogeneous features to predict the traffic flow of the target parking lot. That is, on the basis of the prediction based on the general performance of the parking lot, heterogeneous features that describe the specific performance of the parking lot are further added as input parameters to predict the traffic flow based on the type of the target parking lot, which can improve the accuracy of the parking lot traffic flow prediction.
[0050] To facilitate understanding, several terms involved in this application are first explained below.
[0051] Artificial Neural Networks (ANNs), also known as Neural Networks (NNs) or Connection Model, is an algorithmic mathematical model that imitates the behavioral characteristics of animal neural networks and performs distributed parallel information processing. This network relies on the complexity of the system and adjusts the interconnected relationships between a large number of internal nodes to achieve the purpose of processing information.
[0052] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.
[0053] The solution provided in the embodiments of the present application involves technologies based on neural network modeling and machine learning, which are specifically illustrated by the following embodiments.
[0054] Figure 1 A schematic structural diagram of a parking lot flow system in an embodiment of the present disclosure is shown, including multiple terminals 120 and a server cluster 140 .
[0055] The terminal 120 may be a mobile terminal such as a mobile phone, a game console, a tablet computer, an e-book reader, smart glasses, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a smart home device, an AR (Augmented Reality) device, a VR (Virtual Reality) device, or the terminal 120 may also be a personal computer (PC), such as a laptop computer and a desktop computer.
[0056] The terminal 120 may be installed with an application for providing parking lot traffic.
[0057] The terminal 120 is connected to the server cluster 140 via a communication network. Optionally, the communication network is a wired network or a wireless network.
[0058] The server cluster 140 is a server, or is composed of several servers, or is a virtualization platform, or is a cloud computing service center. The server cluster 140 is used to provide background services for providing a prediction application for parking lot traffic and a training application for a traffic prediction model. Optionally, the server cluster 140 undertakes the main computing work and the terminal 120 undertakes the secondary computing work; or, the server cluster 140 undertakes the secondary computing work and the terminal 120 undertakes the main computing work; or, a distributed computing architecture is used between the terminal 120 and the server cluster 140 for collaborative computing.
[0059] In some optional embodiments, the server cluster 140 is used to store prediction models and prediction methods of parking lot traffic, etc.
[0060] Optionally, the client of the application installed in different terminals 120 is the same, or the client of the application installed on the two terminals 120 is the client of the same type of application of different control system platforms. Based on the different terminal platforms, the specific form of the client of the application may also be different, for example, the application client may be a mobile client, a PC client or a World Wide Web (Web) client.
[0061] Those skilled in the art will appreciate that the number of the terminals 120 may be more or less. For example, there may be only one terminal, or there may be dozens or hundreds of terminals, or a greater number. The embodiment of the present application does not limit the number and device type of the terminals.
[0062] Optionally, the system may also include a management device ( Figure 1 (not shown), the management device is connected to the server cluster 140 via a communication network. Optionally, the communication network is a wired network or a wireless network.
[0063] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or any combination of a virtual private network). In some embodiments, the data exchanged through the network is represented by technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies.
[0064] Below, each step in the method for predicting parking lot flow and the method for training a flow prediction model in this example implementation will be described in more detail with reference to the accompanying drawings and embodiments.
[0065] Figure 2 The method provided by the embodiment of the present disclosure can be executed by any electronic device with computing and processing capabilities, such as Figure 1 The terminal 120 and / or the server cluster 140 in the embodiment. In the following examples, the terminal 120 is used as the execution subject for example description.
[0066] like Figure 2 As shown, the terminal 120 performs a method for predicting parking lot flow, including the following steps:
[0067] Step S202, inputting the isomorphic features of the target parking lot into the first layer model to output a description vector describing the traffic trend and a first prediction vector, the first layer model is a word order translation model.
[0068] Among them, the word order translation model is a model that translates one word order into another word order. Through word order translation, a description vector that can describe the parking lot traffic trend can be obtained by extracting isomorphic features in the target parking lot, as well as a prediction result based on the word order translation model, namely, a first prediction vector.
[0069] Isomorphic features include but are not limited to time features of different time periods, flow features in the time period, parking space saturation of the parking lot, etc. Time features include long-term features and short-term features. Flow features include inflow and outflow of the parking lot. Isomorphic features can also include weather features, etc.
[0070] For example, the word order translation model is a Seq2Seq network model.
[0071] Step S204, input the description vector, the first prediction vector and the heterogeneous features of the target parking lot into the second layer model, and obtain the second prediction vector according to the description vector and the heterogeneous features. The second layer model is a memory network model.
[0072] Among them, heterogeneous features include but are not limited to type features of parking lots. Type features may include location type, business type, etc. Taking type features as an example, the second-layer model is a prediction model obtained by model training based on a memory network model. The memory network model is trained using type features of different types of parking lots to obtain a second-layer model. Combined with the description vector output by the first-layer model, a description of the traffic flow status under the parking lot type is obtained, and then the corresponding second prediction vector is obtained.
[0073] Step S206, obtaining the predicted flow rate of the target parking lot based on the first prediction vector and the second prediction vector.
[0074] In this embodiment, a traffic prediction model including a first layer model and a second layer model is set up, and a description vector and a first prediction vector are obtained through a word order translation model in the first layer model. The description vector is used to reflect the traffic trend of the target parking lot to be predicted, and the first prediction vector is used to express the preliminary prediction results based on the isomorphic features. Further, the description vector and the first prediction vector are input into the second layer model to obtain the description of the traffic trend based on the type of the target parking lot through the heterogeneous features specific to the acquired target parking lot, and then the second prediction vector is obtained according to the description, and the second prediction vector is used to express further prediction results based on the heterogeneous features.
[0075] Furthermore, the predicted traffic flow of the target parking lot is obtained according to the first prediction vector and the second prediction vector, and the collaborative processing of homogeneous features and heterogeneous features is realized to predict the traffic flow of the target parking lot. That is, on the basis of the prediction based on the general performance of the parking lot, heterogeneous features that describe the special performance of the parking lot are further added as input parameters to predict the traffic flow based on the target parking lot type, which can improve the accuracy of the parking lot traffic flow prediction.
[0076] like Figure 3 As shown, in one embodiment, the memory network model includes an attention mechanism structure and a memory matrix, wherein the memory matrix is constructed based on different heterogeneous features.
[0077] The memory network model is mainly composed of an attention structure, i.e., an attention mechanism structure 302, and a MemoryMatrix, i.e., a memory matrix 304. The dimension of the Memory Matrix is a hyperparameter. The larger the parameter, the higher the complexity of the pattern that can be recorded.
[0078] The memory matrix can be understood as consisting of multiple vectors describing traffic trends, and each vector is used to describe the traffic trend under a heterogeneous feature.
[0079] In addition, the memory network model can also be replaced by structures such as fully connected networks and neural recurrent networks (RNN).
[0080] like Figure 4 As shown, step 204, inputting the description vector, the first prediction vector and the heterogeneous features of the target parking lot into the second layer model, and obtaining the second prediction vector according to the description vector and the heterogeneous features includes:
[0081] Step S402, input the description vector and the heterogeneous features into the attention mechanism structure, and perform a matching operation with the memory matrix.
[0082] Among them, Figure 3 As shown, the input of this layer is mainly the encoding feature C generated by the encoder Encoder in the first layer model, that is, the description vector 306.
[0083] The heterogeneous features 308 of the target parking lot include location type features and / or business type features of the target parking lot. Specifically, the attention mechanism structure reads the data in the memory matrix Memory Matrix through the input description vector 306 and the heterogeneous features 308 according to the correlation with the description vector and the heterogeneous features to perform a matching operation.
[0084] Step S404 , integrating the results of the matching operation to generate an integrated vector, where the integrated vector describes the traffic trend under different heterogeneous features.
[0085] The description vector is matched with the matrix to obtain the trend of the traffic flow of the parking lot with the heterogeneous characteristics, and the trend is expressed in the form of an integrated vector.
[0086] Step S406: obtaining a second prediction vector based on the integrated vector and the heterogeneous features of the target parking lot.
[0087] Among them, Figure 3 As shown, the second prediction vector output based on the attention mechanism structure is output through the output module 310 and can have the greatest correlation with the heterogeneous features of the input, that is, the prediction result based on the second prediction vector can have a higher prediction accuracy.
[0088] In this embodiment, by inputting the description vector and heterogeneous features output by the first layer model into the second layer model, the output second prediction vector can take into account the impact of both homogeneous features and heterogeneous features on traffic prediction. Compared with the method of only considering homogeneous features for prediction, a more accurate prediction result can be obtained.
[0089] In one embodiment, the prediction method further includes: configuring the heterogeneous characteristics of the target parking lot based on the area type and / or business type of the area where the target parking lot is located, wherein the area type includes at least one of a transportation hub area, a business district area, an office area and a residential area.
[0090] Among them, the business type includes parameters such as the location of the parking lot, the size of the parking lot, the shape of the parking lot, and the pricing policy of the parking lot.
[0091] For example, the heterogeneous characteristics of parking lots in transportation hub areas may include dimensional characteristics of arrival and departure timetables of trains, buses, airplanes, etc. These characteristics will have a significant impact on the current parking lot flow.
[0092] In addition, parking lots in office areas have obvious tidal characteristics, and parking lots in transportation hub areas have shorter average parking times. These characteristics will also affect parking lot flow.
[0093] In this embodiment, by introducing the above-mentioned heterogeneous features and specifically defining the heterogeneous features, combined with the homogeneous features in the first layer model, the description of the traffic prediction model is made more accurate.
[0094] like Figure 5 As shown, in one embodiment, the traffic prediction model further adds a third layer model on the basis of the first layer model and the second layer model to perform traffic prediction operations based on the three-layer model. Step S206, obtaining the predicted traffic of the target parking lot based on the first prediction vector and the second prediction vector includes:
[0095] Step S502: Fusing the first prediction vector and the second prediction vector to obtain a fused vector.
[0096] Among them, the fusion vector obtained based on the first prediction vector and the second prediction vector can fully consider the impact of the homogeneous features and heterogeneous features of the parking lot on the prediction result, so as to achieve the coordinated prediction of the homogeneous features and heterogeneous features through the fusion operation.
[0097] Step S504, input the fusion vector and the individual characteristics of the target parking lot into the third layer model to perform full connection processing on the fusion vector and the individual characteristics, and the third layer model is a fully connected network model.
[0098] Among them, due to differences in location, environment, users and other factors, for parking lots with the same heterogeneous characteristics, different parking lots still have individual behaviors that are different from other parking lots, that is, personal characteristics. By fully connecting the fusion vector and the personal characteristics, the full connection processing is equivalent to weighting the isomorphic features, heterogeneous features and personal characteristics to obtain a weighted feature. Since this feature takes into account the isomorphic features, heterogeneous features and personal characteristics, it can further improve the prediction accuracy of traffic prediction.
[0099] Step S506, generating predicted traffic based on the processing result of the full connection processing, and making the third layer model output the predicted traffic.
[0100] like Figure 6 As shown, the traffic prediction model includes a first layer model 20, a second layer model 30 and a third layer model 30. In the first layer model 20, the encoder 602 outputs a description vector 306, the description vector 306 is input to the decoder 604 to obtain a first prediction vector, the description vector 306 is input to the attention mechanism 302 in the second layer model 30, combined with the memory matrix 304, to obtain a second prediction vector, the first prediction vector and the second prediction vector are output to the fully connected module 606 of the third layer model 40 through the output module 310 to obtain the output prediction result.
[0101] like Figure 7 As shown, in one embodiment, the traffic prediction model may only include the first layer model and the second layer model, so as to perform the traffic prediction operation based on the first layer model and the second layer model. In step S206, the predicted traffic of the target parking lot is obtained based on the first prediction vector and the second prediction vector, including:
[0102] Step S702: Perform full connection processing on the first prediction vector and the second prediction vector.
[0103] Step S704, generating predicted traffic based on the processing result of the full connection processing, and making the second layer model output the predicted traffic.
[0104] In this embodiment, by fully connecting the first prediction vector and the second prediction vector, a processing value describing the predicted traffic is obtained, and the traffic prediction with high accuracy is achieved without the need to train the third layer model.
[0105] like Figure 8 As shown, in one embodiment, the word order translation model includes a Seq2Seq network model, and the isomorphic features of the target parking lot are input into the first layer model to output a description vector and a first prediction vector describing the traffic trend. The first layer model is a word order translation model including:
[0106] Step S802: The isomorphic features include time features and corresponding flow features. The time features and flow features are preprocessed to generate corresponding preprocessing vectors.
[0107] Among them, seq2seq is a type of word order translation model, including an encoder-decoder structure, and the encoder and decoder each have a recurrent neural network model structure RNN.
[0108] In addition, the encoding structure and decoding structure in the Encoder and Decoder can also use the long short-term memory network LSTM network structure, the gated recurrent unit GRU network structure, the convolutional recurrent neural network CRNN network structure, etc. instead of the RNN network structure.
[0109] Specifically, Fig. 9 As shown, the parking lot flow and time characteristics 902 include holidays, weekdays, weeks, hours, seasons, etc. The corresponding flow characteristics include: long-term inflow, long-term outflow, short-term inflow, short-term outflow, etc. Other isomorphic features can also include schedule information and weather information.
[0110] like Fig. 9 As shown, the above-mentioned time features and traffic features are preprocessed by embedding / full connection 904. Specifically, for discrete features, an embedding operation is performed, and for continuous features, a normalized FC (full connection) operation is performed. Finally, they are concatenated to form a corresponding preprocessing vector to be input into the Encoder or Decoder.
[0111] Step S804: input the preprocessed vector into the encoder of the Seq2Seq network for encoding to obtain a description vector.
[0112] Among them, encoder 602encoder is responsible for compressing the input sequence into a vector of specified length. This vector can be regarded as the semantics of the sequence. This process is called encoding. The methods of obtaining the semantic vector include: directly taking the hidden state of the last input as the semantic vector C, transforming the last hidden state to obtain the semantic vector C, and transforming all the hidden states of the input sequence to obtain the semantic variable C. The semantic variable C is the description vector used in the present disclosure.
[0113] Step S806: Input the description vector and the prediction features related to the prediction time into the decoder in the Seq2Seq network for decoding to obtain a first prediction vector.
[0114] Furthermore, based on the prediction features of the description vector and the prediction time vector, a decoding operation is performed to obtain a corresponding specified sequence to generate a first prediction vector.
[0115] In this embodiment, the first-layer model obtained based on the Seq2Seq network model has the reusability of the model. Combined with the isomorphic features of the target parking lot, a description vector describing the traffic flow trend of the target parking lot is obtained. Based on the description vector, on the one hand, the traffic flow trend of the target parking lot can be described more accurately. On the other hand, the description vector is input into the second-layer model, and traffic flow prediction can be performed based on the performance difference between isomorphic features and heterogeneous features. The obtained traffic flow prediction structure can adapt to the characteristics of the target parking lot.
[0116] In one embodiment, in step S804, the encoder includes a first encoder, a second encoder, and a third encoder, and the preprocessed vector is input into the encoder of the Seq2Seq network for encoding, and the description vector obtained includes:
[0117] The preprocessing vector is input into the first encoder to encode the time features of multiple timestamps before the prediction time and the corresponding traffic features to generate a first sequence.
[0118] The preprocessed vector is input into the second encoder to encode the time features and corresponding traffic features at the same time of each day in multiple days before the prediction time to generate a second sequence.
[0119] The preprocessed vector is input into the third encoder to encode the time features and corresponding traffic features at the same time of each week in multiple weeks before the prediction time to generate a third sequence.
[0120] Among them, Fig. 9 As shown, the encoder 602Encoder mines effective information from the parking lot flow and time characteristics 902, and encodes it to form a description vector 306, which is input into the decoder 604Decoder as the initial state of the Decoder.
[0121] Encoder 602Encoder is composed of three encoders, namely the first encoder 6022, the second encoder 6024 and the third encoder 6026, which respectively extract the sequence of the similar moments of the prediction time, namely the first sequence, the sequence of the same moment of the same day, namely the second sequence and the sequence of the same moment of the same week of the same week, namely the third sequence, as well as future correlation features.
[0122] Specifically, for example, if the prediction time is 10:00 am this Thursday, the first sequence is a vector formed by the corresponding traffic features at multiple times such as 9:00 am, 8:00 am, 7:00 am and 6:00 am before 10:00 am on the predicted day.
[0123] The second sequence is a vector formed by the corresponding traffic features at ten o'clock the day before the prediction, ten o'clock the day before the prediction, and so on.
[0124] The third sequence is the vector formed by the forty points last week, the forty points last week, etc. and the corresponding traffic features.
[0125] A description vector is obtained based on the first sequence, the second sequence and the third sequence.
[0126] In this embodiment, the description vector formed based on the first sequence, the second sequence and the third sequence can accurately describe the flow trend of the target parking lot that changes with time, and realize basic flow prediction based on the flow trend.
[0127] In one embodiment, step S806, inputting the description vector and the prediction features related to the prediction time into a decoder in a Seq2Seq network for decoding to obtain a first prediction vector, further comprising:
[0128] like Fig. 9 As shown, the time feature of the prediction time 908 is processed by the isomorphic fully connected 906 module with the prediction result of the previous moment to be determined as the prediction feature.
[0129] The description vector and the prediction feature are decoded collaboratively to obtain a first prediction vector.
[0130] In this embodiment, a description vector is used as the initial state of the decoder. At the same time, the time characteristics of the prediction period and the prediction result of the previous moment are used as the input of the next prediction moment and the input of the current prediction period to the Decoder, thereby supplementing and strengthening the Decoder input information.
[0131] The existing parking lot flow prediction scheme can realize the flow prediction of a certain parking lot or a certain type of parking lot. However, since it does not fully consider the heterogeneous information between parking lots, there are still the following problems:
[0132] (1) Different parking lot data have different distributions and patterns. When predicting traffic flow for different parking lots, it is necessary to combine expert experience and the parking lot data of the parking lot to conduct separate experimental debugging, resulting in low reusability of data and models.
[0133] (2) Some parking lots have only a small amount of historical data or even no historical data, which results in the inability of existing parking lot flow prediction solutions to timely train models for such small sample scenarios.
[0134] Based on the above technical problems, the present disclosure also provides a method for training a traffic prediction model to train the traffic prediction model in the above embodiments.
[0135] like Fig.10 As shown, the terminal 120 executes the training method of the traffic prediction model, including the following steps:
[0136] Step S1002 , performing model training of a word order translation model based on historical data of a plurality of parking lots to generate a first layer model, the plurality of parking lots including a target parking lot, and the historical data including isomorphic features of the plurality of parking lots.
[0137] Step S1004, using transfer learning to perform model training of a memory network on the output data of the first layer model and the heterogeneous features of the target parking lot, to obtain a second layer model.
[0138] The output data of the first-layer model and the heterogeneous features of the target parking lot are input into the memory network model to train the model of this layer together with the first-layer model. The parameters of the first-layer model are fixed or a small learning rate is fine-tuned. This layer is trained using transfer learning. The data used by transfer learning is a large-volume and high-quality data set under the target business format as training data.
[0139] Step S1006, generating a traffic prediction model for the target parking lot based on the first layer model and the second layer model.
[0140] The training scheme for the traffic prediction model provided in the embodiments of the present invention uses the historical data of the parking lot to train the word order translation model to construct a first-layer model commonly used in the traffic prediction model, thereby improving the reusability of the first-layer model. On the one hand, it can reduce the customization cost of the traffic prediction model. On the other hand, for parking lots with less historical data, it can make up for the deficiency of small sample training data by reusing the historical data of other parking lots, thereby realizing the training of the traffic model for the parking lot with less historical data.
[0141] Furthermore, the memory network model is trained based on the first-layer model and the heterogeneous features of the target parking lot, so that the common features and characteristic features of the parking lot can coexist in the traffic prediction model, so as to improve the accuracy of the obtained prediction model in predicting the parking lot traffic, wherein the common features include time features and corresponding traffic features, etc., and the characteristic features can be heterogeneous features.
[0142] like Fig.12 As shown, in one embodiment, the model training of the second layer model is performed by transfer learning. Specifically, the word order translation model includes a Seq2Seq network. Step S1002, the model training of the word order translation model is performed based on the historical data of multiple parking lots to generate the first layer model including:
[0143] Step S1202: The isomorphic features of the parking lot include the first isomorphic features of the target parking lot and the second isomorphic features of other parking lots. The Seq2Seq network model is trained through the second isomorphic features to obtain a basic model.
[0144] Step S1204, migrating the training results of the basic model to the first layer model to be trained;
[0145] Step S1206: Perform model training on the first layer model to be trained using the first isomorphic feature to obtain a trained first layer model.
[0146] In this embodiment, the first-layer model is trained by transfer learning, which can ensure the reusability of the model and training data. When the target parking lot is a small sample parking lot, the above training data is reused to obtain a first-layer model with better generalization performance.
[0147] like Fig.13 As shown, in one embodiment, the model training of the second layer model is performed by meta-learning, the word order translation model includes a Seq2Seq network, and the model training of the word order translation model is performed based on the historical data of multiple parking lots to generate the first layer model of the traffic prediction model including:
[0148] Step S1302: The isomorphic features of the parking lot include a first isomorphic feature of the target parking lot and a second isomorphic feature of other parking lots, and a plurality of training task sets are generated according to the second isomorphic feature.
[0149] Step S1304: Generate a meta-learning model of the Seq2Seq network according to multiple training task sets.
[0150] Step S1306: Perform model learning on the meta-learning model based on the first isomorphic feature to obtain a first-layer model.
[0151] In this embodiment, the data of the parking lot used can be used to train the meta-learning model. This learning method does not require excessive screening of the historical data of the parking lot, and has fewer restrictions on the amount of data. The meta-learning model is used to train the basic model of this layer, and parking lots of all business types can share a basic model. The training data can be trained using all available data. After the training is completed, several rounds of adjustments can be made according to the business type or a certain parking lot, and it can be applied to the new parking lot prediction business. Compared with the transfer learning method, the meta-learning method is more generalizable, has lower requirements on the quality and quantity of training data, and consumes fewer resources.
[0152] like Fig.14 As shown, in one embodiment, step S1004 uses transfer learning to perform model training of a memory network on the output data of the first layer model and the heterogeneous features of the target parking lot, and obtains a second layer model including:
[0153] Step S1402, performing model training of the memory network using the training parameters of the first layer model to obtain the structural parameters and memory matrix of the attention structure in the memory network.
[0154] Step S1404, migrating the structural parameters and the memory matrix to the second-layer model to be trained, and performing model training on the second-layer model to be trained using the heterogeneous features of the target parking lot to obtain a trained second-layer model.
[0155] In this embodiment, the parameters that need to be trained in this layer are mainly the attention structure and the Memory Matrix. The memory module is added homogeneously to learn the heterogeneous characteristics of different parking lots, which can solve the contradiction between the general model and heterogeneous data.
[0156] like Fig.15 As shown, in one embodiment, step S1006, generating a traffic prediction model for a target parking lot based on the first layer model and the second layer model includes:
[0157] Step S1502, performing model training of a fully connected network on the output data of the first layer model, the output data of the second layer model and the individual characteristics of the target parking lot to obtain a third layer model.
[0158] Step S1504, generating a traffic prediction model based on the first layer model, the second layer model and the third layer model.
[0159] like Fig.11As shown, the first-layer model 20 is trained using multiple parking lot data, i.e., all parking lot data 1102 and external features 1104; the second-layer model 30 is trained using the output of the first-layer model 20, a type of parking lot data 1106, and external features 1108; the third-layer model 40 is trained using the output of the second-layer model 30, a parking lot data 1110, and external feature data 1112, thereby completing the training of the traffic prediction model and obtaining the traffic prediction model 50.
[0160] In this embodiment, the main goal of this layer model is individual training. Each parking lot is different due to different locations, environments and users. Therefore, this layer is mainly to explore the behavior pattern of the current parking lot and fuse the outputs of the first two layers of models. This layer is mainly composed of multiple fully connected layers.
[0161] Specifically, the input of this layer is mainly the output data of the first two layers of models and the unique features of the target parking lot. The output of this layer is the predicted flow of the target parking lot.
[0162] The third layer model training should be coordinated with the first two layers, and the parameters of the first two layers should be fixed or fine-tuned with a small learning rate. The training modules of this layer are mainly fully connected. The data used is the historical behavior data of the target parking lot.
[0163] In addition, the model uses mean square loss as the loss function for training. The true value is the true sequence of future traffic at the current node. The calculation formula is:
[0164]
[0165] Where m is the number of samples and n is the length of the predicted sequence. ij is a real value vector, is the predicted value vector.
[0166] This model can be used to predict the flow of different parking lots, especially renovated parking lots and newly added parking lots, while ensuring the accuracy of predictions, improving the reusability of data and models, and reducing customization costs. It can be further used to calculate parking lot revenue prediction curves, parking space saturation prediction curves, parking indexes, etc., to provide drivers with estimated parking information to improve travel convenience, and to provide managers with future parking passenger flow changes and parking space resource information to reduce operational difficulties.
[0167] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0168] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".
[0169] Refer to the following Fig.16 The parking lot flow prediction device 1600 according to this embodiment of the present invention is described. Fig.16 The parking lot flow control device 1600 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0170] The parking lot flow prediction device 1600 is presented in the form of a hardware module. The components of the parking lot flow prediction device 1600 may include but are not limited to: a first prediction module 1602, which is used to input the homogeneous features of the target parking lot into the first layer model to output a description vector and a first prediction vector describing the flow trend, and the first layer model is a word order translation model; an input module 1604, which is used to input the description vector, the first prediction vector and the heterogeneous features of the target parking lot into the second layer model, and obtain the second prediction vector according to the description vector and the heterogeneous features, and the second layer model is a memory network model; a second prediction module 1606, which is used to obtain the predicted flow of the target parking lot based on the first prediction vector and the second prediction vector.
[0171] In one embodiment, the input module 1604 is also used to: input the description vector and the heterogeneous features into the attention mechanism structure, and perform a matching operation with the memory matrix; integrate the results of the matching operation to generate an integrated vector, which describes the traffic trend under different heterogeneous features; and obtain a second prediction vector based on the integrated vector and the heterogeneous features of the target parking lot.
[0172] In one embodiment, the parking lot flow prediction device 1600 also includes: a configuration module 1608, which is used to configure the heterogeneous characteristics of the target parking lot based on the area type and / or business type of the area where the target parking lot is located, wherein the area type includes at least one of a transportation hub area, a business district area, an office area and a residential area.
[0173] In one embodiment, the second prediction module 1606 is also used to: fuse the first prediction vector and the second prediction vector to obtain a fused vector; the parking lot flow prediction device 1600 also includes: a third prediction module 1610, which is used to input the fused vector and the individual characteristics of the target parking lot into the third layer model to perform full connection processing on the fused vector and the individual characteristics, and the third layer model is a fully connected network model; generate predicted flow based on the processing result of the fully connected processing, and enable the third layer model to output predicted flow.
[0174] In one embodiment, the second prediction module 1606 is further used to: perform full connection processing on the first prediction vector and the second prediction vector; generate predicted traffic based on the processing result of the full connection processing, and enable the second layer model to output the predicted traffic.
[0175] In one embodiment, the first prediction module 1602 is also used for: isomorphic features include time features and corresponding traffic features, preprocessing the time features and traffic features to generate corresponding preprocessing vectors; inputting the preprocessing vector into the encoder of the Seq2Seq network for encoding to obtain a description vector; inputting the description vector and the prediction features related to the prediction time into the decoder in the Seq2Seq network for decoding to obtain a first prediction vector.
[0176] In one embodiment, the first prediction module 1602 is also used to: input the preprocessing vector into the first encoder to encode the time features and corresponding traffic features of multiple timestamps before the prediction time to generate a first sequence; input the preprocessing vector into the second encoder to encode the time features and corresponding traffic features at the same time of each day in multiple days before the prediction time to generate a second sequence; input the preprocessing vector into the third encoder to encode the time features and corresponding traffic features at the same time of each week in multiple weeks before the prediction time to generate a third sequence; obtain a description vector based on the first sequence, the second sequence and the third sequence.
[0177] In one embodiment, the first prediction module 1602 is further used to: determine the time feature of the prediction time and the prediction result of the previous moment as the prediction feature; and collaboratively decode the description vector and the prediction feature to obtain the first prediction vector.
[0178] Refer to the following Fig.17 To describe the training device 1700 of the traffic prediction model according to this embodiment of the present invention. Fig.17 The traffic prediction model training device 1700 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0179] The training device 1700 of the traffic prediction model is presented in the form of a hardware module. The components of the training device 1700 of the traffic prediction model may include but are not limited to: a first training module 1702, used to perform model training of a word order translation model based on historical data of multiple parking lots to generate a first-layer model, the multiple parking lots include a target parking lot, and the historical data include isomorphic features of the multiple parking lots; a second training module 1704, used to perform model training of a memory network on the output data of the first-layer model and the heterogeneous features of the target parking lot using a transfer learning method to obtain a second-layer model; a generation module 1706, used to generate a traffic prediction model of the target parking lot based on the first-layer model and the second-layer model.
[0180] In one embodiment, the word order translation model includes a Seq2Seq network, and the first training module 1702 is also used for: the historical data of multiple parking lots include a first isomorphic feature of the target parking lot and a second isomorphic feature of other parking lots, and the model training of the Seq2Seq network is performed through the second isomorphic feature to obtain a basic model; the training result of the basic model is transferred to the first-layer model to be trained, and the first-layer model to be trained is trained through the first isomorphic feature to obtain a trained first-layer model.
[0181] In one embodiment, the word order translation model includes a Seq2Seq network, and the first training module 1702 is also used for: the historical data of multiple parking lots include a first isomorphic feature of the target parking lot and a second isomorphic feature of other parking lots, and multiple training task sets are generated according to the second isomorphic feature; a meta-learning model of the Seq2Seq network is generated according to the multiple training task sets; and model learning is performed on the meta-learning model based on the first isomorphic feature to obtain a first-layer model.
[0182] In one embodiment, the second training module 1704 is also used to: perform model training of the memory network through the training parameters of the first layer model to obtain the structural parameters and memory matrix of the attention structure in the memory network; migrate the structural parameters and the memory matrix to the second layer model to be trained, and perform model training on the second layer model to be trained through the heterogeneous features of the target parking lot to obtain the trained second layer model.
[0183] In one embodiment, the training device 1700 for the traffic prediction model also includes: a third training module 1708, which is used to perform model training of a fully connected network on the output data of the first layer model, the output data of the second layer model and the individual characteristics of the target parking lot to obtain a third layer model; the generation module 1706 is also used to: generate a traffic prediction model based on the first layer model, the second layer model and the third layer model.
[0184] Refer to the following Fig.18 18. An electronic device 1800 according to this embodiment of the present invention is described below. Fig.18 The electronic device 1800 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0185] like Fig.18 As shown, the electronic device 1800 is in the form of a general computing device. The components of the electronic device 1800 may include but are not limited to: at least one processing unit 1810, at least one storage unit 1820, and a bus 1830 connecting different system components (including the storage unit 1820 and the processing unit 1810).
[0186] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 performs the steps of various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 1010 can perform the following steps: Figure 2 Steps S202, S204 and S206 shown in, and other steps defined in the parking lot flow prediction method and / or flow prediction model training method of the present disclosure.
[0187] The storage unit 1820 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 18201 and / or a cache storage unit 18202 , and may further include a read-only storage unit (ROM) 18203 .
[0188] The storage unit 1820 may also include a program / utility 18204 having a set (at least one) of program modules 18205, such program modules 18205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0189] Bus 1830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0190] The electronic device 1800 may also communicate with one or more external devices 1860 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device, and / or communicate with any device that enables the electronic device 1800 to communicate with one or more other computing devices (e.g., routers, modems, etc.). This communication may be performed through an input / output (I / O) interface. In addition, the electronic device 1800 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter 1850. As shown, the network adapter 1850 communicates with other modules of the electronic device 1800 through a bus 1830. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0191] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0192] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0193] The program product for implementing the above method according to an embodiment of the present invention may adopt a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0194] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0195] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0196] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0197] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0198] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0199] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0200] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A method for predicting parking lot flow, characterized in that: include: Inputting the isomorphic features of the target parking lot into the first layer model to output a description vector describing the traffic trend and a first prediction vector, wherein the first layer model is a word order translation model, and the word order translation model includes a Seq2Seq network, wherein the description vector and the prediction features related to the prediction time are input into a decoder in the Seq2Seq network for decoding to obtain the first prediction vector; Inputting the description vector, the first prediction vector, and heterogeneous features of the target parking lot into a second layer model, and obtaining a second prediction vector according to the description vector and the heterogeneous features, wherein the heterogeneous features include type features of the target parking lot; and The predicted traffic flow of the target parking lot is obtained based on the first prediction vector and the second prediction vector, and the second layer model is a memory network model.
2. The method for predicting parking lot flow according to claim 1, characterized in that: The memory network model includes an attention mechanism structure and a memory matrix, wherein the memory matrix is constructed based on different heterogeneous features; The obtaining a second prediction vector according to the description vector and the heterogeneous features comprises: Input the description vector and the heterogeneous features into the attention mechanism structure, and perform a matching operation with the memory matrix; Integrating the results of the matching operation to generate an integrated vector, wherein the integrated vector describes the traffic trend under the different heterogeneous features; The second prediction vector is obtained based on the integrated vector and the heterogeneous features of the target parking lot.
3. The method for predicting parking lot flow according to claim 1, characterized in that: Also includes: Based on the area type and / or business type of the area where the target parking lot is located, the heterogeneous features of the target parking lot are configured; The area type includes at least one of a transportation hub area, a business district area, an office area and a residential area.
4. The method for predicting parking lot flow according to claim 1, characterized in that: The step of obtaining the predicted flow of the target parking lot based on the first prediction vector and the second prediction vector includes: fusing the first prediction vector and the second prediction vector to obtain a fused vector; Inputting the fusion vector and the individual characteristics of the target parking lot into a third layer model to perform full connection processing on the fusion vector and the individual characteristics, wherein the third layer model is a fully connected network model; The predicted traffic is generated based on the processing result of the full connection processing, and the third layer model outputs the predicted traffic.
5. The method for predicting parking lot flow according to claim 1, characterized in that: The step of obtaining the predicted flow of the target parking lot based on the first prediction vector and the second prediction vector includes: Performing full connection processing on the first prediction vector and the second prediction vector; The predicted traffic is generated based on the processing result of the full connection processing, and the second layer model outputs the predicted traffic.
6. The method for predicting parking lot flow according to any one of claims 1 to 5, characterized in that: The word order translation model includes a Seq2Seq network; The step of inputting the homogeneous features of the target parking lot into the first layer model to output a description vector describing the traffic trend and a first prediction vector includes: The isomorphic features include a time feature and a corresponding flow feature, and the time feature and the flow feature are preprocessed to generate a corresponding preprocessing vector; The preprocessing vector is input into the encoder of the Seq2Seq network for encoding to obtain the description vector.
7. The method for predicting parking lot flow according to claim 6, characterized in that: The encoder includes a first encoder, a second encoder and a third encoder; The step of inputting the preprocessing vector into the encoder of the Seq2Seq network for encoding to obtain the description vector comprises: Inputting the preprocessing vector into the first encoder to encode the time features of a plurality of time stamps before the prediction time and the corresponding traffic features to generate a first sequence; Inputting the preprocessing vector into the second encoder to encode the time features and corresponding traffic features at the same time of each day in multiple days before the prediction time to generate a second sequence; Inputting the preprocessing vector into the third encoder to encode the time features and corresponding traffic features at the same time of each week in multiple weeks before the prediction time to generate a third sequence; The description vector is obtained based on the first sequence, the second sequence and the third sequence.
8. The method for predicting parking lot flow according to claim 6, characterized in that: The step of inputting the description vector and the prediction features related to the prediction time into a decoder in the Seq2Seq network for decoding to obtain the first prediction vector comprises: Determining the time feature of the prediction time and the prediction result of the previous moment as the prediction feature; The description vector and the prediction feature are decoded collaboratively to obtain the first prediction vector.
9. A method for training a traffic prediction model, characterized in that: include: Model training of a word order translation model is performed based on historical data of a plurality of parking lots to generate a first layer model, wherein the word order translation model includes a Seq2Seq network, the plurality of parking lots includes a target parking lot, the historical data includes isomorphic features of the plurality of parking lots, the isomorphic features are used to train the first layer model to output a description vector and a first prediction vector describing a traffic trend, wherein the description vector and the prediction features related to the prediction time are input into a decoder in the Seq2Seq network for decoding to obtain the first prediction vector, and the isomorphic features of the plurality of parking lots include a first isomorphic feature of the target parking lot and a second isomorphic feature of other parking lots; Using transfer learning, a memory network model is trained on the output data of the first-layer model and the type features of the target parking lot to obtain a second-layer model, wherein the second-layer model is used to obtain a second prediction vector according to the description vector and the heterogeneous features of the target parking lot, wherein the heterogeneous features include the type features of the target parking lot; A flow prediction model of the target parking lot is generated based on the first layer model and the second layer model, and the flow prediction model is used to obtain the predicted flow of the target parking lot based on the first prediction vector and the second prediction vector.
10. The method for training a traffic prediction model according to claim 9, characterized in that: The model training of the word order translation model based on the historical data of multiple parking lots to generate the first layer model includes: Performing model training of the Seq2Seq network using the second isomorphic features to obtain a basic model; The training result of the basic model is transferred to the first-layer model to be trained, and the first-layer model to be trained is trained by using the first isomorphic features to obtain the trained first-layer model.
11. The method for training a traffic prediction model according to claim 9, characterized in that: The word order translation model includes a Seq2Seq network; The model training of the word order translation model based on the historical data of multiple parking lots to generate the first layer model includes: generating a plurality of training task sets according to the second isomorphic features; Generate a meta-learning model of the Seq2Seq network according to the multiple training task sets; Model learning is performed on the meta-learning model based on the first isomorphic features to obtain the first layer model.
12. The method for training a traffic prediction model according to claim 9, characterized in that: The method of using transfer learning to perform model training of a memory network on the output data of the first-layer model and the heterogeneous features of the target parking lot to obtain a second-layer model includes: Performing model training of the memory network using the training parameters of the first layer model to obtain structural parameters and a memory matrix of the attention structure in the memory network; The structural parameters and the memory matrix are transferred to the second-layer model to be trained, and the second-layer model to be trained is trained by using the heterogeneous features of the target parking lot to obtain the trained second-layer model.
13. The method for training a traffic prediction model according to any one of claims 9 to 12, characterized in that: The generating of the traffic prediction model of the target parking lot based on the first layer model and the second layer model includes: Performing model training of a fully connected network on the output data of the first layer model, the output data of the second layer model, and the individual characteristics of the target parking lot to obtain a third layer model; The traffic prediction model is generated based on the first layer model, the second layer model and the third layer model.
14. A parking lot flow prediction device, characterized in that: include: A first prediction module is used to input the isomorphic features of the target parking lot into a first layer model to output a description vector describing the traffic trend and a first prediction vector, wherein the first layer model is a word order translation model, and the word order translation model includes a Seq2Seq network, wherein the description vector and the prediction features related to the prediction time are input into a decoder in the Seq2Seq network for decoding to obtain the first prediction vector; An input module, configured to input the description vector, the first prediction vector, and the heterogeneous features of the target parking lot into a second layer model, so as to obtain a second prediction vector according to the description vector and the heterogeneous features, wherein the heterogeneous features include type features of the target parking lot; The second prediction module is used to obtain the predicted traffic flow of the target parking lot based on the first prediction vector and the second prediction vector, and the second layer model is a memory network model.
15. A training device for a traffic prediction model, characterized in that: include: A first training module is used to perform model training of a word order translation model based on historical data of a plurality of parking lots to generate a first layer model, wherein the word order translation model includes a Seq2Seq network, the plurality of parking lots includes a target parking lot, the historical data includes isomorphic features of the plurality of parking lots, the isomorphic features are used to train the first layer model to output a description vector and a first prediction vector describing a traffic trend, wherein the description vector and the prediction features related to the prediction time are input into a decoder in the Seq2Seq network for decoding to obtain the first prediction vector, and the isomorphic features of the plurality of parking lots include a first isomorphic feature of the target parking lot and a second isomorphic feature of other parking lots; a second training module, configured to perform model training of a memory network on the output data of the first-layer model and the heterogeneous features of the target parking lot by adopting a transfer learning method, so as to obtain a second-layer model, wherein the second-layer model is configured to obtain a second prediction vector according to the description vector and the heterogeneous features of the target parking lot, wherein the heterogeneous features include type features of the target parking lot; A generation module is used to generate a traffic prediction model of the target parking lot based on the first layer model and the second layer model, and the traffic prediction model is used to obtain the predicted traffic of the target parking lot based on the first prediction vector and the second prediction vector.
16. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the parking lot flow prediction method described in any one of claims 1 to 8 and / or the flow prediction model training method described in any one of claims 9 to 13 by executing the executable instructions.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the parking lot flow prediction method described in any one of claims 1 to 8 and / or the flow prediction model training method described in any one of claims 9 to 13 are implemented.
