Charging potential prediction method and device, computer device and readable storage medium
By acquiring historical usage data of charging spots and multi-dimensional environmental data, and using LSTM networks to extract features and perform bidirectional time series processing, the problem of insufficient consideration of factors in traditional prediction methods is solved, and more accurate charging spot prediction and resource optimization are achieved.
Patent Information
- Application Number
- CN202411036439.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-07-31
AI Technical Summary
Traditional charging spot prediction methods rely on historical occupancy data and fail to fully consider dynamic factors, resulting in underutilization of charging resources and a poor user charging experience.
By acquiring historical usage data and multi-dimensional environmental data of charging stations, we use an LSTM (Long Short-Term Memory) network to extract historical usage features and environmental features, and combine this with bidirectional time series processing to predict future charging station usage.
It improved the accuracy of charging location prediction, optimized charging station resource allocation, enhanced user experience, and reduced operating costs.
Smart Images

Figure CN118966438B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a charging potential prediction method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Technology
[0002] With the rapid development of electric vehicles, the rational planning and efficient operation of charging infrastructure have become increasingly important. Charging locations are a key component of this infrastructure, directly impacting not only the charging experience for electric vehicle users but also the overall operational efficiency of the charging infrastructure.
[0003] However, charging station management methods often lack effective forecasting of available charging spots, leading to underutilization of charging resources and a poor charging experience for vehicle owners. Traditional charging spot forecasting methods mainly rely on historical occupancy rates and other statistical data, depending too heavily on the charging station's own operational records, without fully considering the dynamic factors affecting charging demand. These factors result in significant discrepancies between actual charging demand and forecasts, leading to low operational efficiency at charging stations. Summary of the Invention
[0004] Therefore, it is necessary to provide a charging position prediction method, apparatus, computer device, computer-readable storage medium, and computer program product that can accurately predict available charging positions in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a charging potential prediction method, including:
[0006] Obtain historical usage data for each charging station at multiple historical moments within a historical time period;
[0007] For each historical moment within the historical time period, determine the environmental data of the charging station in multiple dimensions corresponding to the historical moment.
[0008] Historical usage features are extracted for each of the historical usage data, and environmental features are extracted for each of the environmental data.
[0009] Based on the historical usage characteristics of each of the multiple historical moments and the environmental characteristics of the multiple dimensions, the predicted usage data of the charging station at the target moment is predicted.
[0010] In one embodiment, the step of extracting historical usage features for each of the historical usage data and extracting environmental features for each of the environmental data; and predicting the predicted usage data of the charging station at the target time based on the historical usage features of each of the multiple historical time points and the environmental features of the multiple dimensions, includes:
[0011] According to the time sequence of each historical moment from the beginning to the end, the historical use data and the environmental data of the plurality of dimensions corresponding to each of the plurality of historical moments are preprocessed to obtain first time sequence data; historical use features are extracted from each of the historical use data in the first time sequence data, and environmental features are extracted from each of the environmental data in the first time sequence data; according to each historical use feature and each environmental feature extracted from the first time sequence data, a first candidate use data corresponding to the target moment of the charging position is predicted; according to the time sequence of each historical moment from the end to the beginning, the historical use data and the environmental data of the plurality of dimensions corresponding to each of the plurality of historical moments are preprocessed to obtain second time sequence data; historical use features are extracted from each of the historical use data in the second time sequence data, and environmental features are extracted from each of the environmental data in the second time sequence data; according to each historical use feature and each environmental feature extracted from the second time sequence data, a second candidate use data corresponding to the target moment of the charging position is predicted; and according to the first candidate use data and the second candidate use data corresponding to the target moment of the charging position, a predicted use data corresponding to the target moment of the charging position is determined.
[0012] In one of the embodiments, the determining, according to the first candidate use data and the second candidate use data corresponding to the target moment of the charging position, the predicted use data corresponding to the target moment of the charging position, comprises:
[0013] The first candidate use data and the second candidate use data corresponding to the target moment of the charging position are spliced to obtain a target vector; and according to the target vector, the predicted use data corresponding to the target moment of the charging position is determined.
[0014] In one of the embodiments, the determining, according to the target vector, the predicted use data corresponding to the target moment of the charging position, comprises:
[0015] A preset occupancy rate weight matrix, an occupancy rate bias vector and an occupancy rate activation function are obtained; the target vector is linearly converted according to the occupancy rate weight matrix and the occupancy rate bias vector to obtain a linear output vector; and the linear output vector is nonlinearly converted according to the occupancy rate activation function to obtain the predicted use data corresponding to the target moment of the charging position.
[0016] In one of the embodiments, the first time sequence data comprises the environmental data and the historical use data corresponding to each historical moment.
[0017] The historical use features are extracted from each of the historical use data in the first time series data, and the environmental features are extracted from each of the environmental data in the first time series data; and the first candidate use data corresponding to the target time of the charging position is predicted according to each of the historical use features and each of the environmental features extracted from the first time series data, including:
[0018] The preset weight matrix, the activation function and the bias vector are obtained, the historical use features and the environmental features corresponding to a historical time in the preset historical time period of the charging position are determined according to the environmental data and the historical use data corresponding to the historical time in the first time series data and the preset weight matrix, the activation function and the bias vector, until the historical use features and the environmental features of the last historical time in the preset historical time period are obtained, and the first candidate use data corresponding to the target time of the charging position is determined according to the historical use features and the environmental features of the last historical time.
[0019] In one of the embodiments, the second time series data includes the environmental data and the historical use data corresponding to each historical time;
[0020] The historical use features are extracted from each of the historical use data in the second time series data, and the environmental features are extracted from each of the environmental data in the second time series data; and the second candidate use data corresponding to the target time of the charging position is predicted according to each of the historical use features and each of the environmental features extracted from the second time series data, including:
[0021] The preset weight matrix, the activation function and the bias vector are obtained, the historical use features and the environmental features corresponding to a historical time in the preset historical time period of the charging position are determined according to the environmental data and the historical use data corresponding to the historical time in the second time series data and the preset weight matrix, the activation function and the bias vector, until the historical use features and the environmental features of the first historical time in the preset historical time period are obtained, and the second candidate use data corresponding to the target time of the charging position is determined according to the historical use features and the environmental features of the last historical time.
[0022] In a second aspect, the application further provides a charging position prediction device, including:
[0023] The acquisition module is configured to acquire historical use data corresponding to each of a plurality of historical times in a historical time period of a charging position;
[0024] The determination module is configured to determine, for each of the historical times in the historical time period, environmental data in a plurality of dimensions corresponding to the historical time of the charging position;
[0025] extracting historical usage features from each of the historical usage data and extracting environment features from each of the environment data;
[0026] predicting, according to the historical usage features of each of the historical time points and the environment features of the multiple dimensions, predicted usage data of the charging position at a target time point.
[0027] In a third aspect, the present application provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0028] obtaining historical usage data of a charging position at multiple historical time points in a historical time period;
[0029] determining, for each of the historical time points in the historical time period, environment data of the charging position corresponding to the historical time point in multiple dimensions;
[0030] extracting historical usage features from each of the historical usage data and extracting environment features from each of the environment data;
[0031] predicting, according to the historical usage features of each of the historical time points and the environment features of the multiple dimensions, predicted usage data of the charging position at a target time point.
[0032] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0033] obtaining historical usage data of a charging position at multiple historical time points in a historical time period;
[0034] determining, for each of the historical time points in the historical time period, environment data of the charging position corresponding to the historical time point in multiple dimensions;
[0035] extracting historical usage features from each of the historical usage data and extracting environment features from each of the environment data;
[0036] predicting, according to the historical usage features of each of the historical time points and the environment features of the multiple dimensions, predicted usage data of the charging position at a target time point.
[0037] In a fifth aspect, the present application provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the following steps:
[0038] obtaining historical usage data of a charging position at multiple historical time points in a historical time period;
[0039] For each historical time point in the historical time period, determine the charging position in the corresponding multiple dimensions of environmental data for the historical time point;
[0040] Extract historical use features for each of the historical use data, and extract environmental features for each of the environmental data;
[0041] According to the historical use features of each of the historical time points and the environmental features of the multiple dimensions, predict the predicted use data of the charging position at the target time point.
[0042] The charging position prediction method, device, computer equipment, computer readable storage medium and computer program product described above, by obtaining the historical use data of the charging position at multiple historical time points in a historical time period, serve as the basic data for charging position prediction, which is the key input for predicting future charging position use. For each historical time point in the historical time period, determine the charging position in the corresponding multiple dimensions of environmental data for the historical time point. By introducing these environmental data, the use of the charging position can be more accurately predicted, and the prediction accuracy can be improved. Extract historical use features for each of the historical use data, and extract environmental features for each of the environmental data. More meaningful data is extracted from the original data. According to the historical use features of each of the historical time points and the environmental features of the multiple dimensions, predict the predicted use data of the charging position at the target time point. By combining historical use features and environmental features for prediction, the accuracy of the prediction can be improved, and the management of the charging position can be improved. The operating cost of the charging station can also be reduced, because more accurate prediction can avoid unnecessary waste of resources. BRIEF DESCRIPTION OF DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the embodiments of the present application or the related art will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other related drawings can also be obtained without creative labor.
[0044] Figure 1 An application environment diagram of the charging position prediction method in an embodiment;
[0045] Figure 2 A flowchart of the charging position prediction method in an embodiment;
[0046] Figure 3 A structure diagram of the LSTM component in the charging position prediction method in an embodiment;
[0047] Figure 4A structural schematic diagram of a charging position prediction model in a charging position prediction method in an embodiment;
[0048] Figure 5 A whole flowchart of a charging position prediction model in a charging position prediction method in another embodiment;
[0049] Figure 6 A flowchart of a charging position prediction method in another embodiment;
[0050] Figure 7 A structural block diagram of a charging position prediction device in an embodiment;
[0051] Figure 8 An internal structural diagram of a computer device in an embodiment. DETAILED DESCRIPTION
[0052] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0053] The charging position prediction method provided by the embodiments of the present application can be applied in an application environment as shown in Figure 1 . The terminal 102 communicates with the server 104 through a network. The data storage system can store data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on a cloud or other network server. The terminal 102 generates a charging position prediction request and sends the charging position prediction request to the server 104, so that the server 104 predicts the prediction use data of the charging position at a target time according to the historical use characteristics of each historical time and the environmental characteristics of multiple dimensions. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, a projection device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be a stand-alone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0054] In an exemplary embodiment, as shown in Figure 2 , a charging position prediction method is provided. The method is applied in Figure 1The server 104 in the charging station 100 is taken as an example for illustration, including the following steps 202 to 208. Among them:
[0055] Step 202, obtaining historical use data corresponding to each historical time point of the charging position in the historical time period.
[0056] The charging position refers to a charging position in the electric vehicle charging station, that is, a parking space that can be used for electric vehicle charging. Each charging position has certain charging facilities, such as chargers, to provide charging services for electric vehicles parked there. It can be understood that the charging position in the present application can be in an idle or available state, or in a working or non-available state, which can be set according to actual needs.
[0057] The historical time period refers to a time period occurring in the past, such as data in the past year, which is usually a continuous time period, used to collect the use of the charging position at different time points and other related information.
[0058] The historical time point refers to a specific time point in the historical time period, which is used to collect the specific time point of the charging position use data and other environmental data. These time points can be selected at certain intervals (such as every hour, every day, etc.) to obtain sufficient time series data for analysis and prediction.
[0059] The historical use data refers to the use data of the charging position at a certain time in the past, such as whether the charging position is occupied, the use rate of the charging position (occupancy rate), etc. These data can help understand the use pattern of the charging position at different time points. For example, at a certain historical time point, the charging position may be completely occupied, while at another time point it may be partially occupied or completely idle.
[0060] Specifically, first, collect the use data of the charging position in the historical time period, which is usually recorded automatically by the management system of the charging station. For example, the occupancy rate data of the charging position may be recorded in the database. Then sort these data to ensure that they are arranged in chronological order and have corresponding use data records for each historical time point. The use data record records the use of the charging position at each historical time point, such as the occupancy rate of the charging position. These data can be the available charging position ratio of the charging position recorded every certain time interval (e.g., every hour or every day).
[0061] In an example, assume that the historical time period is the past year, and the time interval d is recording the occupancy rate of the charging position every hour. This means that every hour, the use of the charging position will be recorded. For example: on January 1, 2023, at 00:00, the occupancy rate of the charging position is 60%. On January 1, 2023, at 01:00, the occupancy rate of the charging position is 80%. Until January 1, 2024, at 00:00, the occupancy rate of the charging position is 70%.
[0062] Step 204, for each historical time in the historical time period, determine the charging position in the corresponding multiple dimensions of environmental data for the historical time.
[0063] Among them, the environmental data of multiple dimensions refers to the external environmental information closely related to the use of charging position. These data provide various external factors that may affect the use of charging position, which helps to improve the accuracy and practicality of the prediction model. Environmental data can be weather conditions: temperature, humidity, wind speed, whether it rains, etc. Traffic conditions: traffic flow and average speed of surrounding roads. Surrounding charging station usage: occupancy rate of charging positions in adjacent charging stations to reflect the spatial distribution of charging demand. Time-related features: date, time, holiday information, etc., which can reflect the changes in charging demand at a specific time. Specific settings can be made according to actual needs.
[0064] Specifically, first, obtain weather information through meteorological stations or other meteorological service providers. Obtain the traffic flow and average speed of the surrounding roads of the charging station through the data of the traffic management department, video analysis of traffic cameras, or third-party traffic information services. Obtain from the charging station operator, or automatically collect charging position usage data of surrounding charging stations through sensors installed at the charging station.
[0065] Then, for each historical time, match the use data of the charging position with the environmental data at the corresponding time point. For example, if the occupancy rate of the charging position at 00:00 on January 1, 2023 is recorded, the weather information, traffic flow / speed information, and charging position occupancy rate of the surrounding charging stations at that time are also collected.
[0066] Finally, organize the collected environmental data in chronological order to ensure the integrity and accuracy of the data. For example, create a data table, with each row corresponding to a historical time, and columns including timestamp, charging position occupancy rate, temperature, wind speed, whether it rains, traffic flow, average speed, and charging position occupancy rate of surrounding charging stations, etc.
[0067] Step 206, extract historical use features for each historical use data, and extract environmental features for each environmental data.
[0068] The historical usage features refer to key information extracted from historical usage data that can reflect the usage of charging positions. These features are usually the trends of charging position occupancy over time obtained by processing historical usage data through machine learning models (such as LSTM long short-term memory networks). The environmental features refer to key information extracted from environmental data that can reflect external environmental conditions. These features are also the trends of temperature, traffic flow, and other environmental data over time obtained by processing environmental data through machine learning models (such as LSTM).
[0069] Specifically, by processing historical usage data through LSTM models, features that can reflect charging position usage patterns are extracted. For example, LSTM can capture the trend of charging position occupancy over time. Similarly, by processing environmental data through LSTM models, features that can reflect how external environmental conditions affect charging position usage are extracted. For example, LSTM can capture the trends of temperature, traffic flow, and other environmental data over time. For example, assume the historical time period is the past year, and the time interval d is recording the occupancy of charging positions every hour. This means that every hour in the year, the usage of charging positions will be recorded. At the same time, at each historical time, weather information (such as temperature, wind speed, whether it is raining, etc.), traffic flow / speed information of surrounding roads, and charging position occupancy data of charging stations around the charging network are also collected. The trend of charging position occupancy is extracted from historical usage data, and LSTM models are used to capture the pattern of charging position occupancy over time. Similarly, the trend of weather conditions, the trend of traffic flow, and other environmental data are extracted from environmental data, and LSTM models are also used to capture these patterns.
[0070] Step 208, according to the historical usage features of each historical time and the environmental features of multiple dimensions, predict the predicted usage data of charging positions at the target time.
[0071] The target time refers to a specific time point in the future when we need to predict the usage of charging positions. This time point is the output target of the prediction model, i.e. we want to know how the usage of charging positions will be at a certain time in the future. The predicted usage data refers to the predicted usage data of charging positions at the target time. This can be the occupancy rate, usage frequency, or other related indicators of charging positions. The predicted usage data is the output result of the prediction model, which is predicted based on historical usage data and environmental data.
[0072] Specifically, by extracting the historical use data and the environmental data of multiple dimensions corresponding to each of the plurality of historical time points in time sequence in the above steps, historical use features and environmental features of multiple dimensions corresponding to each of the plurality of historical time points are obtained. Among the historical use features and the environmental features of multiple dimensions corresponding to each of the plurality of historical time points, the historical use features and the environmental features of multiple dimensions obtained by extracting the historical use data and the environmental data of multiple dimensions corresponding to the last historical time point are taken as the predicted use data of the charging position at the target time point.
[0073] In one of the embodiments, the historical use data and the environmental data of multiple dimensions corresponding to each of the plurality of historical time points are preprocessed in time sequence from the beginning to the end of each historical time point to obtain first time series data; historical use features are extracted from each historical use data in the first time series data, and environmental features are extracted from each environmental data in the first time series data; the first candidate use data corresponding to the target time point of the charging position is predicted according to each historical use feature and each environmental feature extracted from the first time series data; the historical use data and the environmental data of multiple dimensions corresponding to each of the plurality of historical time points are preprocessed in time sequence from the end to the beginning of each historical time point to obtain second time series data; historical use features are extracted from each historical use data in the second time series data, and environmental features are extracted from each environmental data in the second time series data; the second candidate use data corresponding to the target time point of the charging position is predicted according to each historical use feature and each environmental feature extracted from the second time series data; and the predicted use data corresponding to the target time point of the charging position is determined according to the first candidate use data and the second candidate use data corresponding to the target time point of the charging position.
[0074] Specifically, first, the historical use data and the environmental data of multiple dimensions corresponding to each historical time are spliced in chronological order from the beginning to the end, to obtain first time series data, i.e., forward processing sequence data. Then, the historical use data and the environmental data of multiple dimensions corresponding to each historical time are spliced in chronological order from the end to the beginning, to obtain second time series data, i.e., reverse processing sequence data. Then, based on a charging position prediction model, the charging position prediction model includes two LSTM layers, one LSTM layer processes the forward processing sequence data, and the other LSTM layer processes the reverse processing sequence data. Through the prediction of the charging position prediction model on the forward processing sequence data, the prediction data corresponding to the target time of the charging position, i.e., first candidate use data, is obtained. In the same way, through the prediction of the charging position prediction model on the reverse processing sequence data, the prediction data corresponding to the target time of the charging position, i.e., second candidate use data, is obtained. Finally, the first candidate use data and the second candidate use data obtained by prediction are used to determine the prediction use data corresponding to the target time of the charging position.
[0075] Since the bidirectional processing sequence data is used, the charging position prediction model can capture more complex spatiotemporal relationships, thereby improving the prediction accuracy. In addition, the historical use features and the environmental features are comprehensively considered, so that various factors affecting the charging position use rate can be better understood.
[0076] In one embodiment, the first candidate use data and the second candidate use data of the charging position corresponding to the target time are spliced to obtain a target vector; and the prediction use data corresponding to the target time of the charging position is determined according to the target vector.
[0077] The first time series data is data organized in normal chronological order. The second time series data is data organized in reverse chronological order. The first candidate use data is a result predicted according to the first time series data. The second candidate use data is a result predicted according to the second time series data. The target vector is a vector obtained by merging the first candidate use data and the second candidate use data. The prediction use data is a final prediction result determined according to the target vector.
[0078] Specifically, first, the first candidate usage data and the second candidate usage data are merged into a target vector, and the purpose of this step is to combine the forward and reverse prediction results together. Then, based on the target vector, the final predicted usage data is determined. The purpose of this step is to obtain the final prediction result as the predicted usage data of the charging position at the target time. For example, assuming that the historical time period is one year in the past, and the time interval d is the occupancy rate of the charging position recorded every hour. This means that every hour in the year, the usage of the charging position will be recorded. At the same time, at each historical time, weather information (such as temperature, wind speed, whether it is raining, etc.), traffic flow / speed information of the surrounding road, and charging position occupancy rate data of the charging stations around the charging network are also collected.
[0079] Since the usage of the charging position at the target time is predicted, accurate decision support is provided for the charging station operator, helping to optimize charging resource allocation and improve charging service quality such as adjusting charging prices, optimizing charging station layout, etc. It can also enable users to learn in advance and avoid unnecessary waiting time.
[0080] In one embodiment, a preset occupancy rate weight matrix, an occupancy rate bias vector, and an occupancy rate activation function are obtained; the target vector is linearly converted according to the occupancy rate weight matrix and the occupancy rate bias vector to obtain a linear output vector; and the linear output vector is nonlinearly converted according to the occupancy rate activation function to obtain the predicted usage data of the charging position at the target time.
[0081] Specifically, first, a preset occupancy rate weight matrix, an occupancy rate bias vector, and an occupancy rate activation function are obtained. The occupancy rate weight matrix is a preset matrix used to represent the strength of the linear relationship between features. In the training process, this matrix is learned through the backpropagation algorithm. The occupancy rate bias vector is a preset vector used to add an offset when calculating the linear combination, and is also learned through training. The occupancy rate activation function is a nonlinear function used to introduce nonlinear relationships, allowing the model to learn more complex patterns. Then, the target vector is multiplied by the occupancy rate weight matrix and added to the occupancy rate bias vector to obtain a linear output vector. The purpose is to extract the linear relationship between features through linear conversion. Next, the linear output vector is nonlinearly converted through the occupancy rate activation function to obtain the final predicted usage data. The purpose is to capture the complex nonlinear relationship between features through nonlinear conversion to obtain the final prediction result.
[0082] Since the occupancy activation function (such as the Sigmoid function) can map the linear output vector to a reasonable range, for example, between [0, 1], it helps to simplify the prediction result into an easily understandable probability value. In turn, by mapping the prediction result to a clear interval, the prediction result is easier to understand and interpret, which is beneficial for charging station operators to make decisions.
[0083] In one of the embodiments, a preset weight matrix, an activation function, and a bias vector are obtained; according to the environment data and the historical use data of the previous historical time corresponding to the first time sequence data, and the preset weight matrix, the activation function, and the bias vector, the historical use features and the environmental features of the next historical time in the preset historical time period are determined until the historical use features and the environmental features of the last historical time in the preset historical time period are obtained; and according to the historical use features and the environmental features of the last historical time, the first candidate use data corresponding to the target time of the charging position is determined.
[0084] Specifically, the weight matrix is a matrix used for linear combination of input features. The activation function is a function used for introducing nonlinear conversion. The bias vector is a bias term added when linear combination is used.
[0085] Specifically, first, the data of each historical time in the first time sequence data is processed, and the specific steps include multiplying the environment data and the historical use data of the previous historical time in the first time sequence data with the weight matrix, and adding the bias vector. The linear conversion result is nonlinearly converted by the activation function. The above steps are repeated for each historical time until the last historical time is processed. The historical use features and the environmental features of the last historical time are used to predict the first candidate use data of the target time in combination with the preset weight matrix, the activation function, and the bias vector.
[0086] Since the historical use data and the environment data in the first time sequence data are processed by using the preset weight matrix, the activation function, and the bias vector, the historical use features and the environmental features corresponding to each historical time in the first time sequence data can be effectively extracted. Using these features, the change rule of the charging position use can be better understood, thereby improving the prediction accuracy.
[0087] In one of the embodiments, a preset weight matrix, an activation function, and a bias vector are obtained; historical use features and environmental features of a previous historical time in a preset historical time period are determined according to environment data and historical use data of a subsequent historical time in the second time sequence data and the preset weight matrix, the activation function, and the bias vector, until historical use features and environmental features of a first historical time in the preset historical time period are obtained; and the second candidate use data corresponding to the target time of the charging position is determined according to the historical use features and the environmental features of the last historical time.
[0088] Specifically, first, the data of each historical time in the second time sequence data is processed, and the specific steps include multiplying the environment data and the historical use data of the subsequent historical time in the second time sequence data with the weight matrix and adding the bias vector. The linear conversion result is subjected to nonlinear conversion through the activation function. The above steps are repeated for each historical time until the first historical time is processed. The historical use features and the environmental features of the last historical time are used to predict the second candidate use data of the target time in combination with the preset weight matrix, the activation function, and the bias vector.
[0089] Since the time sequence data is processed in reverse, the prediction accuracy can be further improved. This is because reverse processing can capture different patterns from forward processing, so that the model can learn more comprehensive information. Moreover, since reverse processing can start from the end of the sequence and proceed step by step, it can capture information of a distant historical time in the historical use data and the environment data, which is particularly important for predicting the use of the charging position, avoiding the influence of the use of the charging position on the historical data in a long time period.
[0090] In one of the embodiments, reference is made to Figure 3 The historical use data and the environment data corresponding to a historical time are processed by an LSTM component, and the calculation formula is as follows:
[0091] f t =Q(W f ×[h t-1 ,x t ]+b f )
[0092] i t =Q(W i ×[h t-1 ,xt]+b i )
[0093] o t =Q(W o ×[h t-1 ,xt]+b o )
[0094] C` t =Q(W c x t-1 +b c )
[0095] C t =f t xC t-1 +i t xC` t
[0096] h t =o t xtanh(C t )
[0097] where x t is the historical usage data and environmental data corresponding to a historical time t, h t-1 is the hidden state of a historical time t-1, C` t is the internal cell state, C t-1 is the previous cell state, and Ct is the current cell state. W i , W o , W c , and W f correspond to the weight matrix of the input of the activation function, b f , b i , b o , and b c are the corresponding bias terms, Q is the Sigmoid activation function (nonlinear activation function), f t represents the output of the forget gate, which is used to determine how much of the state information h t-1 of the previous time step needs to be retained, i t represents the output of the input gate, which is used to control how much new information x t of the current time step can enter the cell state, o t represents the output of the output gate, which is used to control which part of the cell state is used to update the hidden state, and C`t represents the candidate cell state, which is obtained by weighting and summing the weights and biases through the activation function tanh. C t represents the actual cell state, which is determined by the forget gate f t , the cell state C t-1 of the previous time step, and the input gate i t and the candidate cell state C` t , h t represents the hidden state of a historical time t, which is obtained by the output gate o tand cell state Ct after tanh activation function, used to represent the historical use characteristics and environmental characteristics corresponding to the historical time t after information extraction according to the historical use data and environmental data corresponding to the historical time t.
[0098] In one embodiment, the charging position prediction model includes two LSTM layers, one LSTM layer processes the sequence data in the forward direction, and the other LSTM layer processes the sequence data in the reverse direction. Referring to Figure 4 , the outputs of the two LSTM layers are merged at each time step.
[0099] In one embodiment, referring to Figure 5 , the overall process of the charging position prediction model in the charging position prediction method includes:
[0100] Step 1: Collect historical operation data of charging stations, i.e., historical use data, and related feature data such as weather and traffic, i.e., environmental data.
[0101] Step 2: Form standardized training samples through data cleaning, feature extraction, and other preprocessing, and divide the collected charging station network available charging pile usage rate data in the prediction period after preprocessing into a training set and an evaluation set, and divide the collected charging station network charging pile usage rate data in the prediction period after preprocessing into a test set for evaluating the generalization performance of the model.
[0102] Step 3: Construct a prediction model based on a bidirectional long short-term memory network and input the standardized training samples for training.
[0103] Step 4: Use the grid search method to evaluate the model performance on the training set and the validation set in the preset hyperparameter range using cross-validation, and select the group with the smallest mean square error as the final prediction model parameters.
[0104] Step 5: Use the trained model to predict the charging pile usage rate in the future period of time to provide a basis for charging station optimization. Regularly update the model with newly collected data to adapt to the changing trend of charging pile usage rate.
[0105] In an example, d is used to represent the time interval. The occupancy rate of the charging position is the available charging position occupancy ratio of the charging station recorded every d time. Therefore, the time series data of the charging position occupancy rate in a period of time (such as the past 1 year) can be collected. At the same time, at each time, weather data such as temperature, wind speed, whether it is raining, and other information, traffic flow / speed of the surrounding road, and charging position occupancy rate data of the charging network surrounding charging stations can be collected, and c is used to represent the total number of feature categories. According to these data, the charging position occupancy rate in the future period of time (such as the next 1 day) can be predicted. The specific formula is as follows:
[0106] y` t+1 y` t+2 , ...y` t+24d =f(y t-T+1 , ...y t x t-T+1 , ...x t x t 1, ..., x t c )
[0107] Among them, y` t+1 This is the predicted output at time t+1, where f is the charging potential prediction model, and x is the predicted output at time t+1. t c x is the data of the c-th feature at time t. t-T+1 It is the environmental data corresponding to the historical moment (t-T+1), y t-T+1 It is the historical usage data corresponding to the historical moment (t-T+1).
[0108] In one exemplary embodiment, such as Figure 6 As shown, steps 602 to 308 are included. Wherein:
[0109] Step 602: Obtain historical usage data for each charging station at multiple historical moments within a historical time period;
[0110] Step 604: For each historical moment within the historical time period, determine the environmental data of the charging station in multiple dimensions corresponding to the historical moment.
[0111] Step 606: Preprocess the historical usage data and multi-dimensional environmental data corresponding to each historical moment according to the time sequence from start to end of each historical moment to obtain the first time series data; obtain the preset weight matrix, activation function, and bias vector; based on the environmental data and historical usage data corresponding to the previous historical moment in the first time series data, as well as the preset weight matrix, activation function, and bias vector, determine the historical usage characteristics and environmental characteristics of the charging station corresponding to the next historical moment within the preset historical time period, until the historical usage characteristics and environmental characteristics of the last historical moment within the preset historical time period are obtained; preprocess the historical usage data and multi-dimensional environmental data corresponding to each historical moment according to the time sequence from end to start of each historical moment to obtain the second time series data; based on the environmental data and historical usage data corresponding to the next historical moment in the second time series data, as well as the preset weight matrix, activation function, and bias vector, determine the historical usage characteristics and environmental characteristics of the charging station corresponding to the previous historical moment within the preset historical time period, until the historical usage characteristics and environmental characteristics of the first historical moment within the preset historical time period are obtained;
[0112] At step 608, a first candidate usage data corresponding to the target time is determined according to the historical usage feature and the environmental feature of the last historical time; a second candidate usage data corresponding to the target time is determined according to the historical usage feature and the environmental feature of the last historical time; the first candidate usage data and the second candidate usage data corresponding to the target time are spliced to obtain a target vector; a preset occupancy rate weight matrix, an occupancy rate bias vector and an occupancy rate activation function are obtained; the target vector is linearly converted according to the occupancy rate weight matrix and the occupancy rate bias vector to obtain a linear output vector; the linear output vector is nonlinearly converted according to the occupancy rate activation function to obtain the predicted usage data corresponding to the target time of the charging position.
[0113] It should be understood that, although each step in the flowchart involved in the above embodiments is shown in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least part of other steps or steps or stages in other steps.
[0114] Based on the same inventive concept, the present embodiment also provides a charging position prediction device for implementing the above-mentioned charging position prediction method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more charging position prediction device embodiments provided below can refer to the limitations of the charging position prediction method in the foregoing, which will not be repeated here.
[0115] In one exemplary embodiment, as shown in Figure 7 a charging position prediction device is provided, comprising: an acquisition module 702, a determination module 704, an extraction module 706 and a prediction module 708, wherein:
[0116] The acquisition module 702 is configured to acquire historical usage data corresponding to each of a plurality of historical time points of a charging position in a historical time period.
[0117] The determination module 704 is configured to determine, for each historical time point in the historical time period, environmental data in a plurality of dimensions corresponding to the historical time point.
[0118] The extraction module 706 is configured to extract historical use features from each historical use data and extract environment features from each environment data;
[0119] The prediction module 708 is configured to predict the predicted use data of the charging position at the target time according to the historical use features of each historical time and the environment features of each dimension.
[0120] In one of the embodiments, the prediction module 708 is configured to: in a time sequence from the beginning to the end of each historical time, pre-process the historical use data corresponding to each historical time and the environment data of each dimension to obtain first time sequence data; extract historical use features from each historical use data in the first time sequence data and extract environment features from each environment data in the first time sequence data; predict the first candidate use data corresponding to the target time of the charging position according to each historical use feature and each environment feature extracted from the first time sequence data; in a time sequence from the end to the beginning of each historical time, pre-process the historical use data corresponding to each historical time and the environment data of each dimension to obtain second time sequence data; extract historical use features from each historical use data in the second time sequence data and extract environment features from each environment data in the second time sequence data; predict the second candidate use data corresponding to the target time of the charging position according to each historical use feature and each environment feature extracted from the second time sequence data; and determine the predicted use data corresponding to the target time of the charging position according to the first candidate use data and the second candidate use data corresponding to the target time of the charging position.
[0121] In one of the embodiments, the prediction module 708 is configured to: splice the first candidate use data and the second candidate use data corresponding to the target time of the charging position to obtain a target vector; and determine the predicted use data corresponding to the target time of the charging position according to the target vector.
[0122] In one of the embodiments, the prediction module 708 is configured to: obtain a preset occupancy rate weight matrix, an occupancy rate bias vector and an occupancy rate activation function; perform linear conversion on the target vector according to the occupancy rate weight matrix and the occupancy rate bias vector to obtain a linear output vector; and perform non-linear conversion on the linear output vector according to the occupancy rate activation function to obtain the predicted use data corresponding to the target time of the charging position.
[0123] In one of the embodiments, the prediction module 708 is configured to obtain a preset weight matrix, an activation function and a bias vector; determine historical use features and environmental features corresponding to a previous historical time in a preset historical time period according to the environment data and the historical use data corresponding to the previous historical time in the second time sequence data and the preset weight matrix, the activation function and the bias vector, until the historical use features and the environmental features corresponding to the first historical time in the preset historical time period are obtained; and determine the second candidate use data corresponding to the target time of the charging position according to the historical use features and the environmental features corresponding to the last historical time.
[0124] In one of the embodiments, the prediction module 708 is configured to obtain a preset weight matrix, an activation function and a bias vector; determine historical use features and environmental features corresponding to a previous historical time in a preset historical time period according to the environment data and the historical use data corresponding to the previous historical time in the second time sequence data and the preset weight matrix, the activation function and the bias vector, until the historical use features and the environmental features corresponding to the first historical time in the preset historical time period are obtained; and determine the second candidate use data corresponding to the target time of the charging position according to the historical use features and the environmental features corresponding to the last historical time.
[0125] The above modules in the charging position prediction device can be realized by software, hardware and combinations thereof in whole or in part. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above modules.
[0126] In one exemplary embodiment, a computer device is provided, which can be a server, and an internal structure diagram thereof can be as shown in Figure 8 The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store data related to charging position prediction. The input / output interface of the computer device is configured to exchange information between the processor and external devices. The communication interface of the computer device is configured to communicate with external terminals through network connection. The computer program is executed by the processor to implement a charging position prediction method.
[0127] Those skilled in the art can understand that Figure 8 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0128] In one embodiment, a computer device is also provided, including a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the steps in the above method embodiments.
[0129] In one embodiment, a computer readable storage medium is provided, which stores a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.
[0130] In one embodiment, a computer program product is provided, which includes a computer program. The computer program is executed by a processor to implement the steps in the above method embodiments.
[0131] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.
[0132] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing relevant hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, the processes of the above-mentioned embodiment methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., and is not limited thereto. The processor involved in the embodiments provided in the present application can be a general processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., and is not limited thereto.
[0133] The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combinations of the technical features do not exist contradictory, it should be considered as the scope of the present application.
[0134] The above embodiments only express several implementation ways of the present application, and the description is specific and detailed, but it should not be understood as a limitation to the patent scope of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A charging point prediction method characterized by, The method comprises: obtaining historical use data corresponding to each of a plurality of historical time points in a historical time period; for each historical time point in the historical time period, determining environmental data of the charging site in a plurality of dimensions corresponding to the historical time point; extracting historical use features from each of the historical use data and environmental features from each of the environmental data, comprising: preprocessing the historical use data and the environmental data of the plurality of dimensions corresponding to each of the historical time points in a time sequence from start to end to obtain first time series data; extracting historical use features from each of the historical use data in the first time series data and environmental features from each of the environmental data in the first time series data; preprocessing the historical use data and the environmental data of the plurality of dimensions corresponding to each of the historical time points in a time sequence from end to start to obtain second time series data; extracting historical use features from each of the historical use data in the second time series data and environmental features from each of the environmental data in the second time series data; predicting predicted use data of the charging site at a target time point according to the historical use features of each of the plurality of historical time points and the environmental features of the plurality of dimensions, comprising: predicting first candidate use data corresponding to the target time point of the charging site according to each historical use feature and each environmental feature extracted from the first time series data; predicting second candidate use data corresponding to the target time point of the charging site according to each historical use feature and each environmental feature extracted from the second time series data; performing splicing processing on the first candidate use data and the second candidate use data corresponding to the target time point of the charging site to obtain a target vector; obtaining a preset occupancy rate weight matrix, an occupancy rate bias vector, and an occupancy rate activation function; performing linear conversion on the target vector according to the occupancy rate weight matrix and the occupancy rate bias vector to obtain a linear output vector; performing non-linear conversion on the linear output vector according to the occupancy rate activation function to obtain predicted use data corresponding to the target time point of the charging site.
2. The method of claim 1, wherein, The first time series data comprises environmental data and historical use data corresponding to each historical time point; extracting historical use features from each of the historical use data in the first time series data and environmental features from each of the environmental data in the first time series data, predicting first candidate use data corresponding to the target time point of the charging site according to each historical use feature and each environmental feature extracted from the first time series data, comprises: obtaining a preset weight matrix, an activation function, and a bias vector; determine the historical use feature and the environmental feature corresponding to a last historical time in the preset historical time period according to the historical use feature and the environmental feature of the last historical time; determine the first candidate use data corresponding to the target time of the charging position according to the historical use feature and the environmental feature of the last historical time.
3. The method of claim 1, wherein, The second time sequence data includes environmental data and historical use data corresponding to each historical time; The method for extracting the historical use feature from each historical use data in the second time sequence data and extracting the environmental feature from each environmental data in the second time sequence data, and predicting the second candidate use data corresponding to the target time of the charging position according to each historical use feature and each environmental feature extracted from the second time sequence data, comprises: obtain a preset weight matrix, an activation function and a bias vector; determine the historical use feature and the environmental feature corresponding to a first historical time in the preset historical time period according to the historical use feature and the environmental feature of the first historical time; determine the second candidate use data corresponding to the target time of the charging position according to the historical use feature and the environmental feature of the first historical time.
4. The method of claim 1, wherein, The first time sequence data is data organized in a forward time sequence, and the second time sequence data is data organized in a reverse time sequence.
5. A charging point prediction device characterized by comprising: The device comprises: an obtaining module configured to obtain historical use data corresponding to each of a plurality of historical times in a historical time period of a charging position; a determining module configured to determine, for each of the historical times in the historical time period, environmental data of the charging position in a plurality of dimensions corresponding to the historical time; an extracting module configured to extract a historical use feature from each of the historical use data and extract an environmental feature from each of the environmental data, comprising: pre-processing the historical use data corresponding to each of the plurality of historical times and the environmental data of the plurality of dimensions in a time sequence from the start to the end of each historical time to obtain first time sequence data; extracting a historical use feature from each of the historical use data in the first time sequence data and extracting an environmental feature from each of the environmental data in the first time sequence data; pre-processing the historical use data corresponding to each of the plurality of historical times and the environmental data of the plurality of dimensions in a time sequence from the end to the start of each historical time to obtain second time sequence data; extracting a historical use feature from each of the historical use data in the second time sequence data and extracting an environmental feature from each of the environmental data in the second time sequence data; The prediction module is configured to predict the predicted usage data of the charging position at the target time according to the historical usage features and the environmental features of the multiple dimensions at the respective historical times, including: predicting first candidate usage data corresponding to the charging position at the target time according to each historical usage feature and each environmental feature extracted from the first time series data; predicting second candidate usage data corresponding to the charging position at the target time according to each historical usage feature and each environmental feature extracted from the second time series data; performing splicing processing on the first candidate usage data and the second candidate usage data corresponding to the charging position at the target time to obtain a target vector; obtaining a preset occupancy rate weight matrix, an occupancy rate bias vector and an occupancy rate activation function; performing linear conversion on the target vector according to the occupancy rate weight matrix and the occupancy rate bias vector to obtain a linear output vector; and performing non-linear conversion on the linear output vector according to the occupancy rate activation function to obtain the predicted usage data corresponding to the charging position at the target time.
6. The charging position prediction device according to claim 5, characterized by, The first time series data includes environmental data and historical usage data corresponding to each historical time; The prediction module is further configured to obtain a preset weight matrix, an activation function and a bias vector; determine the historical usage features and the environmental features corresponding to a subsequent historical time within a preset historical time period of the charging position according to the environmental data and the historical usage data corresponding to a previous historical time in the first time series data and the preset weight matrix, the activation function and the bias vector, until the historical usage features and the environmental features of a last historical time within the preset historical time period are obtained; and determine the first candidate usage data corresponding to the target time of the charging position according to the historical usage features and the environmental features of the last historical time.
7. The charge level prediction device according to claim 5, characterized by The second time series data includes environmental data and historical usage data corresponding to each historical time; The prediction module is further configured to obtain a preset weight matrix, an activation function and a bias vector; determine the historical usage features and the environmental features corresponding to a previous historical time within a preset historical time period of the charging position according to the environmental data and the historical usage data corresponding to a subsequent historical time in the second time series data and the preset weight matrix, the activation function and the bias vector, until the historical usage features and the environmental features of a first historical time within the preset historical time period are obtained; and determine the second candidate usage data corresponding to the target time of the charging position according to the historical usage features and the environmental features of the first historical time.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 4.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 4.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Load prediction model training method and device, storage medium and equipment
CN112200373A
Prediction method and device for residual charging time, equipment and storage medium
CN118163665A