An electric vehicle charging scheduling method, device, equipment and medium
By constructing a decision tree model and a preset elastic charging model, and combining historical charging data and real-time information of electric vehicles, the charging scheduling scheme is optimized, which solves the problem that existing technologies fail to effectively utilize users' subsequent vehicle usage plans, thereby improving charging efficiency and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2026-07-14
AI Technical Summary
Existing technologies typically only consider charging for a single electric vehicle trip, and the electric vehicle optimization charging solutions used only consider maximizing convenience for users' single charging, failing to effectively utilize users' subsequent usage plans and flexible time, resulting in users losing unnecessary charging time.
By acquiring multiple initial charging history data of electric vehicles, a decision tree model is constructed. Combining real-time battery data and charging station location information, a preset elastic charging model is used to calculate the charging amount and generate an optimized charging scheduling scheme. The C4.5 algorithm and the preset decision tree model are used to process missing attribute values, thereby improving the classification accuracy of the decision tree model.
It enables optimized charging planning based on users' available time, avoiding unnecessary charging time losses, improving the charging efficiency of electric vehicles, and alleviating users' charging anxiety.
Smart Images

Figure CN117382442B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy technology, and in particular to a method, apparatus, equipment and medium for electric vehicle charging scheduling. Background Technology
[0002] Electric vehicles (EVs) offer advantages such as improved energy efficiency, reduced greenhouse gas emissions, and energy diversification, making their development crucial for addressing climate change challenges and achieving sustainable transportation. Furthermore, compared to traditional gasoline-powered vehicles, EVs use rechargeable and dischargeable batteries as their power system, reducing environmental pollution from fuel consumption. The development level of electric vehicle charging stations (EVCS) is a vital guarantee for the development of EVs, directly impacting the speed and quality of the EV industry's growth.
[0003] Currently, the charging capacity of electric vehicles in China is relatively insufficient. Many users are often worried about running out of power on their electric vehicles during long-distance trips, and there is also the possibility of not being able to find a charging station nearby. This will greatly affect the user experience.
[0004] Existing technologies typically only consider charging for a single electric vehicle trip, and the optimized charging solutions used only aim to maximize convenience for users during a single charge, without taking into account users' subsequent usage plans, charging schedules, and related flexible time. This results in users losing unnecessary charging time when presented with the final charging scheduling decision. Summary of the Invention
[0005] This invention provides an electric vehicle charging scheduling method, device, equipment, and medium, which solves the technical problem that the existing technology usually only considers the charging of a single segment of the electric vehicle's journey, and the electric vehicle optimized charging scheme used only considers maximizing the convenience of a single user's charging, without taking into account the user's subsequent vehicle use plan, charging plan, and related flexible time. As a result, the charging scheduling decision presented to the user in the end will cause the user to lose unnecessary charging time.
[0006] The first aspect of this invention provides an electric vehicle charging scheduling method, comprising:
[0007] Acquire multiple initial electric vehicle charging history data corresponding to the electric vehicle, wherein the initial electric vehicle charging history data includes initial electric vehicle charging amount and initial driving mileage data;
[0008] All initial trolley charging history data were filtered to identify multiple target trolley charging history data.
[0009] Based on the preset decision tree model height, a decision tree model corresponding to the electric vehicle is constructed using the target electric vehicle's charging history data.
[0010] The electric vehicle's real-time battery data, real-time charging station location information, and trip data are used to calculate the amount of electricity needed to generate the corresponding charging amount for the electric vehicle by using a preset flexible charging model.
[0011] Based on the decision tree model and the charging amount, a charging scheduling scheme corresponding to the electric vehicle is determined.
[0012] Optionally, the preset elastic charging model is specifically:
[0013]
[0014] In the formula, q1 is the first charging amount in the charging amount; s is the first trip mileage in the trip data; j is the mileage of additional power consumption caused by unexpected situations; y is the real-time charging station location information; m is the power consumption per unit mileage; soc is the state of charge in the real-time electric vehicle battery data; c is the battery capacity in the real-time electric vehicle battery data; q2 is the second charging amount in the charging amount; and r is the second trip mileage in the trip data.
[0015] Optionally, the step of constructing a decision tree model corresponding to the electric vehicle based on the target electric vehicle's charging history data, using a preset decision tree model height, includes:
[0016] Based on the target electric vehicle's historical charging data, multiple initial information gain rates are determined;
[0017] The average initial information gain rate is determined by averaging all the initial information gain rates.
[0018] An initial information gain rate greater than the average initial information gain rate is taken as the target information gain rate;
[0019] The decision tree model corresponding to the electric vehicle is constructed based on the preset decision tree model height and the target information gain ratio.
[0020] Optionally, the step of determining multiple initial information gain rates based on the target electric vehicle's charging history data includes:
[0021] A sample dataset was constructed using the target electric vehicle's historical charging data;
[0022] Substitute the number of samples corresponding to the sample dataset and the historical charging data of each target electric vehicle into a preset first formula to perform calculations and determine the sample information entropy.
[0023] Obtain multiple sample attributes corresponding to the sample dataset, and use the multiple sample attribute values and the number of sample attribute values corresponding to each sample attribute to calculate the attribute information entropy corresponding to each sample attribute respectively;
[0024] Calculate the difference between the sample information entropy and the information entropy of each attribute, and determine the sample attribute information gain corresponding to each sample attribute.
[0025] Calculate the ratio of the information gain of each sample attribute to the corresponding information entropy to determine the initial information gain rate for each sample attribute.
[0026] Optionally, the step of constructing the decision tree model corresponding to the electric vehicle based on the preset decision tree model height and the target information gain ratio includes:
[0027] The sample attributes corresponding to each of the target information gain rates are used as the initial decision sample attributes;
[0028] The attribute of the initial decision sample corresponding to the largest target information gain ratio is selected as the root node of the decision tree model corresponding to the electric vehicle.
[0029] The target decision sample attributes corresponding to the electric vehicle are selected from high to low according to the target information gain ratio corresponding to the initial decision sample attributes.
[0030] The target decision sample attributes are used as the tree nodes corresponding to the electric vehicle;
[0031] Based on the root node and branch nodes of the decision tree model, the decision attributes are determined;
[0032] Based on the preset decision tree model height, the decision tree model corresponding to the electric vehicle is constructed using the root node, the branch nodes, and the decision attributes of the decision tree model.
[0033] Optionally, the preset first formula is specifically:
[0034]
[0035] In the formula, L(m) is the sample information entropy; ai is the charging history data of the i-th target trolley; m is the number of samples;
[0036] The formula for calculating the attribute information entropy is:
[0037]
[0038] In the formula, L(S) i S represents the attribute information entropy; i Let be the attribute of the i-th sample; q be the number of sample attribute values; s iLet be the attribute value of the i-th sample.
[0039] A second aspect of the present invention provides an electric vehicle charging scheduling device, comprising:
[0040] The acquisition module is used to acquire multiple initial electric vehicle charging history data corresponding to the electric vehicle, wherein the initial electric vehicle charging history data includes initial electric vehicle charging amount and initial driving mileage data;
[0041] The determination module is used to filter all the initial trolley charging history data and determine multiple target trolley charging history data.
[0042] The construction module is used to construct a decision tree model corresponding to the electric vehicle based on the target electric vehicle's charging history data, using a preset decision tree model height.
[0043] The calculation module is used to calculate the power consumption of the electric vehicle based on the real-time battery data, real-time charging station location information and trip data of the electric vehicle through a preset flexible charging model, and generate the corresponding charging amount of the electric vehicle.
[0044] The scheduling module is used to determine the charging scheduling scheme corresponding to the electric vehicle based on the decision tree model and the charging amount.
[0045] Optionally, the preset elastic charging model is specifically:
[0046]
[0047] In the formula, q1 is the first charging amount in the charging amount; s is the first trip mileage in the trip data; j is the mileage of additional power consumption caused by unexpected situations; y is the real-time charging station location information; m is the power consumption per unit mileage; soc is the state of charge in the real-time electric vehicle battery data; c is the battery capacity in the real-time electric vehicle battery data; q2 is the second charging amount in the charging amount; and r is the second trip mileage in the trip data.
[0048] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the electric vehicle charging scheduling method as described in any of the preceding claims.
[0049] The fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the electric vehicle charging scheduling method as described in any of the preceding claims.
[0050] As can be seen from the above technical solutions, the present invention has the following advantages:
[0051] The technical solution of this invention provides an electric vehicle charging scheduling method. When a user applies for electric vehicle charging scheduling, the method first obtains a dataset consisting of multiple charging information samples of the user's electric vehicle within a preset time or a preset number of times, i.e., multiple initial electric vehicle charging history data, including initial electric vehicle charging amount and initial mileage data. Multiple target electric vehicle charging history data are selected from all initial electric vehicle charging history data. Then, based on a preset decision tree model height, a decision tree model is constructed using all target electric vehicle charging history data. Finally, the constructed decision tree model, combined with a preset elastic charging model, calculates the charging amount based on real-time electric vehicle battery data, the user's daily travel plan (travel data), and real-time charging station location information along the route, and generates a corresponding charging scheduling plan. This plan can obtain a better electric vehicle charging plan based on the user's spare time, avoiding unnecessary charging time. Simultaneously, the decision tree model constructed using this application can quickly help users make decisions on the required electric vehicle charging amount, improving electric vehicle charging efficiency and alleviating user charging anxiety. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 A flowchart illustrating the steps of an electric vehicle charging scheduling method provided in an embodiment of the present invention;
[0054] Figure 2 A schematic diagram of an electric vehicle trip plan provided in an embodiment of the present invention;
[0055] Figure 3 A flowchart illustrating the steps of another electric vehicle charging scheduling method provided in an embodiment of the present invention;
[0056] Figure 4 This is a schematic diagram of the structure of the decision tree model provided in an embodiment of the present invention;
[0057] Figure 5 This is a structural block diagram of an electric vehicle charging scheduling device provided in an embodiment of the present invention. Detailed Implementation
[0058] This invention provides an electric vehicle charging scheduling method, apparatus, device, and medium to address the technical problem that existing technologies typically only consider charging for a single segment of the electric vehicle's journey, and the electric vehicle optimized charging schemes used only consider maximizing convenience for users' single charging, without taking into account users' subsequent vehicle usage plans, charging plans, and related flexible time. This results in users losing unnecessary charging time when the final charging scheduling decision presented to them.
[0059] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0060] Existing solutions for street parking and charging scenarios treat electric vehicle batteries as energy storage devices, enabling vehicle-to-grid (V2G) power transmission. To meet the grid's reactive power requirements and user parking and charging service needs, a Pareto optimal solution is obtained through a normalized phase constraint method, achieving multi-objective optimization. For V2G parking lots, an improved particle swarm optimization algorithm is used to find the optimal charging strategy for electric vehicles.
[0061] Based on the technical solution of this invention, those skilled in the art can imagine applying this method to various urban scenarios, charging station capacities, and traffic systems with complex road conditions without changing the essential method. Therefore, the specific methods and accompanying drawings described above are merely illustrative examples of flexible charging for a particular trolleybus and should not be considered as the entirety or limitation of this invention.
[0062] Please see Figure 1 , Figure 1 A flowchart illustrating the steps of an electric vehicle charging scheduling method provided in an embodiment of the present invention.
[0063] The present invention provides an electric vehicle charging scheduling method, comprising:
[0064] Step 101: Obtain multiple initial electric vehicle charging history data corresponding to the electric vehicle. The initial electric vehicle charging history data includes the initial electric vehicle charging amount and the initial driving mileage data.
[0065] The initial trolley charging history data includes the initial trolley charging amount and the initial mileage data, with the initial mileage data being the vehicle's mileage.
[0066] In this embodiment, by extracting the electric vehicle charging data of a user in the city within a preset time period from the charging station, multiple initial electric vehicle charging history data corresponding to the electric vehicle are obtained. In this solution, the preset time period is one month, and the electric vehicle charging data includes the electric vehicle charging amount and driving mileage data.
[0067] It is worth mentioning that in this step, the usage data of the electric vehicle corresponding to the current user is given priority. When the number of times the user charges within the preset time is insufficient, the charging data of a longer historical period is further considered. For example, the charging history data of the electric vehicle for a preset number of times can be directly obtained.
[0068] Furthermore, charging data of users within the city can be extracted through charging stations to obtain historical charging data of electric vehicles that are charging at the charging station and whose current path is relatively consistent with the user's current path.
[0069] In this embodiment, multiple initial electric vehicle charging history data corresponding to the electric vehicle are obtained.
[0070] Step 102: Filter all initial trolley charging history data to determine multiple target trolley charging history data.
[0071] The target electric vehicle's historical charging data includes the target electric vehicle's charging amount and target mileage data.
[0072] It is worth mentioning that, since all the initial trolley charging history data contains erroneous decision information, such as choosing to charge when the battery is sufficient to support the current journey and there is a charging station at the end of the current journey, in order to improve the classification accuracy of the decision tree, based on preset performance index conditions, erroneous and unusable sample information is removed from all the initial trolley charging history data, thereby obtaining high-precision multiple target trolley charging history data.
[0073] Furthermore, the preset performance index conditions refer to the process by which professionals, using their expertise and experience, delete data from the charging data that exhibits unreasonable scheduling patterns. When the initial electric vehicle charging history data is determined to contain data with unreasonable scheduling patterns, it is filtered out based on factors such as battery level, availability of a charging station at the destination, daily trip information, and the nearest nearby charging station. For example, failing to select a suitable charging station when charging is needed, or overcharging during the day without having two separate trips.
[0074] In this embodiment, all initial trolley charging history data are filtered to determine multiple target trolley charging history data.
[0075] Step 103: Based on the preset decision tree model height, construct the decision tree model corresponding to the electric vehicle using the historical charging data of the target electric vehicle.
[0076] It is worth mentioning that, based on the preset decision tree model height, the C4.5 algorithm is used to construct the decision tree model corresponding to the electric vehicle using all the historical charging data of the target electric vehicles.
[0077] Furthermore, a pruning method is needed to "prune" the tree by prematurely stopping the construction of the decision tree model. Once stopped, the nodes become leaves, reducing the branch length and preventing overfitting. This allows the constructed decision tree model to overcome the shortcomings of information gain selection, discretizing continuous attributes and handling training data with missing attribute values. Specifically, a height is defined before constructing the decision tree model. When the decision tree model reaches this height, its growth can be stopped—this is the simplest method. The preset height of the decision tree model can be set as needed; a preset height of 5 is acceptable, but no specific limitation is made here.
[0078] In this embodiment, a decision tree model corresponding to the electric vehicle is constructed using the target electric vehicle's historical charging data, based on a preset decision tree model height.
[0079] Step 104: Calculate the power consumption of the electric vehicle based on the real-time battery data, real-time charging station location information, and trip data of the electric vehicle using a preset flexible charging model, and generate the corresponding charging amount for the electric vehicle.
[0080] Trip data represents the distance between a user's origin and destination.
[0081] The charging amount includes the first charging amount and the second charging amount.
[0082] Real-time trolley battery data includes the trolley's state of charge and battery capacity.
[0083] It is worth mentioning that the onboard network management system installed in the electric vehicle can monitor the battery level in real time and connect to the external network to provide real-time feedback on the availability of nearby parking lots and charging stations. When the user selects a travel destination, the system calculates the required amount of electricity by using a preset flexible charging model to analyze the trip data, the onboard network to obtain real-time information on charging piles in the vicinity and near the destination, and the battery level.
[0084] In this embodiment, the electric vehicle's real-time battery data, real-time charging station location information, and trip data are used to calculate the electric vehicle's charging amount by using a preset flexible charging model.
[0085] Step 105: Based on the decision tree model and the charging amount, determine the charging scheduling scheme for the electric vehicle.
[0086] Please see Figure 2 When the daily journey of the tram is divided into c1 and c2, it is... Figure 2 It can be seen that there is a lot of time available each day in addition to the two trips. If the battery is insufficient during the first trip (c1), most users may choose mode (b) to wait at a nearby charging station to fully charge before continuing the trip. This mode greatly prolongs the time of trip (c1) and may even affect the originally planned trip (c2), thus affecting the user experience. Therefore, it is suggested that when the battery is insufficient in c1, only enough power to complete the next part of the trip (c1) should be supplied, and then the battery should be fully charged. This can reduce the time spent in the middle without affecting the user's trip plan.
[0087] Furthermore, by using a preset flexible charging model to calculate the charge based on trip data, real-time information on charging stations in the vicinity and near the destination obtained from the vehicle network, and battery charge, and then scheduling electric vehicle charging according to the decision tree model constructed based on the C4.5 algorithm and all target electric vehicle charging history data, it can quickly help users make decisions on the amount of electric vehicle charging they need, making full use of users' spare time to charge their electric vehicles.
[0088] In this embodiment, a charging scheduling scheme for electric vehicles is determined based on a decision tree model and the amount of charging.
[0089] In this embodiment of the invention, when scheduling electric vehicle charging, the application first obtains a sample dataset of a user's electric vehicle charging information for one month. Based on preset performance index conditions, professionals use their expertise and experience to filter out erroneous decision-making information or unreasonable scheduling patterns from the sample dataset, enhancing the accuracy of the sample dataset and thus improving the classification accuracy of the decision tree model. Next, based on the C4.5 algorithm and a preset decision tree model height, a decision tree model is constructed using preprocessed historical charging data of multiple target electric vehicles. This overcomes the shortcomings of information gain selection and can handle training data with missing attribute values. Finally, the constructed decision tree model, combined with a preset elastic charging model, calculates the charging amount using real-time electric vehicle battery data, the user's daily travel plan, and charging station location information along the route. This generates a corresponding charging scheduling plan, fully utilizing the user's spare time for charging and avoiding unnecessary charging time loss. Furthermore, the decision tree model constructed using the C4.5 algorithm quickly helps users make decisions about the required charging amount, improving electric vehicle charging efficiency and alleviating user charging anxiety.
[0090] Please see Figure 3 , Figure 3 A flowchart illustrating the steps of another electric vehicle charging scheduling method provided in an embodiment of the present invention.
[0091] Another electric vehicle charging scheduling method provided by the present invention includes:
[0092] Step 301: Obtain multiple initial electric vehicle charging history data corresponding to the electric vehicle. The initial electric vehicle charging history data includes the initial electric vehicle charging amount and the initial driving mileage data.
[0093] In this embodiment, multiple initial electric vehicle charging history data corresponding to the electric vehicle are obtained. The initial electric vehicle charging history data includes the initial electric vehicle charging amount and the initial driving mileage data.
[0094] Step 302: Filter all initial trolley charging history data to determine multiple target trolley charging history data.
[0095] It is worth mentioning that the initial electric vehicle charging history data is judged in turn to see if it meets the preset performance index conditions. The initial electric vehicle charging history data that meets the preset performance index conditions is used as the target electric vehicle charging history data, and the initial electric vehicle charging history data that does not meet the preset performance index conditions is filtered out.
[0096] In this embodiment, all initial trolley charging history data are filtered to determine multiple target trolley charging history data.
[0097] Step 303: Determine multiple initial information gain rates based on the target trolley's historical charging data.
[0098] Further, step 303 may include the following sub-steps S31-S35:
[0099] S31. Construct a sample dataset using historical charging data of the target electric vehicle;
[0100] S32. Substitute the number of samples corresponding to the sample dataset and the historical charging data of each target electric vehicle into the preset first formula to perform calculations and determine the sample information entropy.
[0101] S33. Obtain multiple sample attributes corresponding to the sample dataset, and use the multiple sample attribute values and the number of sample attribute values corresponding to each sample attribute to calculate the attribute information entropy corresponding to each sample attribute respectively.
[0102] S34. Calculate the difference between the sample information entropy and the information entropy of each attribute, and determine the sample attribute information gain corresponding to each sample attribute.
[0103] S35. Calculate the ratio of the information gain of each sample attribute to the corresponding information entropy, and determine the initial information gain rate for each sample attribute.
[0104] It is worth mentioning that, firstly, a sample dataset A is constructed using historical charging data of multiple target electric vehicles. This sample dataset can be the charging information of a user for one month as the original dataset. Assuming the number of samples is m, the sample dataset A can be represented as A{a1,a2,a3,...,am}. Then, the sample number corresponding to the sample dataset and all historical charging data of the target electric vehicles are substituted into a preset first formula to calculate the sample information entropy corresponding to the sample dataset A. The preset first formula is as follows:
[0105]
[0106] In the formula, L(m) is the sample information entropy; ai is the charging history data of the i-th target trolley; and m is the number of samples.
[0107] Furthermore, let S be the sample attribute corresponding to the sample dataset A. A sample dataset A can correspond to multiple sample attributes, such as sample attributes S1, S2, S3, etc. Each sample attribute contains multiple sample attribute values. Assume that S1 has q sample attribute values {s1,s2,s3,....,sq}, and S2 has b sample attribute values {s1,s2,s3,....,sb}. Then, using all the sample attribute values and the number of sample attribute values corresponding to each sample attribute, the attribute information entropy corresponding to each sample attribute is calculated. The formula for calculating the attribute information entropy is:
[0108]
[0109] In the formula, L(S) i S represents the attribute information entropy; i Let be the attribute of the i-th sample; q be the number of sample attribute values; s i Let be the attribute value of the i-th sample.
[0110] Furthermore, the difference between the sample information entropy and the information entropy of each attribute is calculated separately to determine the sample attribute information gain corresponding to each sample attribute. The formula for calculating the sample attribute information gain is as follows:
[0111] Gain(S i )=L(m)-L(S i );
[0112] In the formula, Gain(S) i L(m) is the sample attribute information gain; L(m) is the sample information entropy; L(S) is the sample information entropy. i ) represents the entropy of the i-th attribute.
[0113] Furthermore, the ratio of the information gain of each sample attribute to the corresponding information entropy is calculated to determine the initial information gain rate for each sample attribute.
[0114]
[0115] In the formula, G(S) i Gain(S) represents the initial information gain ratio; i S represents the information gain of the sample attributes; i For the i-th sample attribute; s i Let be the attribute value of the i-th sample; q is the number of sample attribute values.
[0116] In this embodiment of the invention, multiple initial information gain rates are determined based on the target electric vehicle's historical charging data.
[0117] Step 304: Calculate the mean of all initial information gain rates to determine the average initial information gain rate.
[0118] In this embodiment of the invention, the average initial information gain rate is determined by averaging all initial information gain rates.
[0119] Step 305: Take the initial information gain rate that is greater than the average initial information gain rate as the target information gain rate.
[0120] It is worth mentioning that the information gain criterion favors attributes with a larger number of possible values. To reduce the potential adverse effects of this preference, this application uses the gain ratio to select the optimal splitting sample attribute. The sample information gain ratio of each sample attribute is calculated using the above formula. The gain ratio criterion favors attributes with a smaller number of possible values, while the information gain criterion favors attributes with a larger number of possible values. Then, attributes with information gain higher than the average level are identified from the candidate splitting attributes, and the attribute with the highest gain ratio is selected as the priority decision sample attribute. That is, the average initial information gain ratio is determined by averaging all initial information gain ratios, and then attributes with sample information gain ratios higher than the average initial information gain ratio are selected from the sample attributes. Finally, the attribute with the highest information gain ratio is selected as the priority.
[0121] In this embodiment of the invention, an initial information gain rate greater than the average initial information gain rate is taken as the target information gain rate.
[0122] Step 306: Construct the decision tree model corresponding to the electric vehicle based on the preset decision tree model height and the target information gain ratio.
[0123] Further, step 306 may include the following sub-steps S61-S66:
[0124] S61. Use the sample attributes corresponding to the information gain ratio of each target as the initial decision sample attributes.
[0125] S62. Select the initial decision sample attribute corresponding to the largest target information gain ratio as the root node of the decision tree model for electric vehicles.
[0126] S63. Select the target decision sample attributes corresponding to electric vehicles from high to low according to the target information gain ratio corresponding to the initial decision sample attributes;
[0127] S64. Use the target decision sample attributes as the tree nodes corresponding to electric vehicles;
[0128] S65. Determine decision attributes based on the root node and branch nodes of the decision tree model;
[0129] S66. Based on the preset decision tree model height, construct the decision tree model corresponding to electric vehicles using the root node, branch nodes, and decision attributes of the decision tree model.
[0130] It is worth mentioning that, firstly, the height of the decision tree model is set, i.e., the preset height of the decision tree model, which allows for pruning during the construction of the decision tree model to prevent overfitting. Next, the sample attributes corresponding to each target information gain ratio are used as initial decision sample attributes, and the initial decision sample attribute corresponding to the largest target information gain ratio is selected as the root node of the decision tree model. Then, according to the target information gain ratio from high to low, the corresponding initial decision sample attributes are selected as branch nodes. After determining the root node and branch nodes of the decision tree model, the relevant decision attributes are set by the technical personnel. Finally, the decision tree model is constructed using the decision attributes, branch nodes, and root node of the decision tree model.
[0131] Please see Figure 4 In the decision tree model constructed in this application, the root node s2 is the charging amount q2>0, and the output is {Yes, No}; the branch nodes include the first node s1 and the second node s3. The first node s1 indicates whether there is a charging station at the destination of the first segment of the journey, and the output is {Yes, No}. The second node s3 is the charging amount q1>0, and the output is {Yes, No}. The decision attributes include the first decision attribute h1, the second decision attribute h2, and the third decision attribute h3. The first decision attribute h1 indicates that the electric vehicle does not need to be charged; the second decision attribute h2 indicates that the electric vehicle should be charged at the nearest charging station with a charging amount of q2; and the third decision attribute h3 indicates that the electric vehicle should be charged at the nearest charging station with a charging amount of q1.
[0132] In this embodiment, a decision tree model corresponding to the electric vehicle is constructed based on the preset decision tree model height and the target information gain ratio.
[0133] Step 307: Calculate the power consumption of the electric vehicle based on the real-time battery data, real-time charging station location information, and trip data of the electric vehicle using a preset flexible charging model, and generate the corresponding charging amount for the electric vehicle.
[0134] It's worth mentioning that when a user selects their travel destination, the system first obtains information on nearby charging stations and those close to the final stop via the vehicle network. Based on the planned route and the current battery level of the electric vehicle, it determines whether charging is needed along the way. If charging is required, the system provides the user with the distance to the nearest charging station through network information aggregation. Then, a preset flexible charging model is used to calculate the battery level based on real-time electric vehicle battery data, real-time charging station location information, and trip data. The system then provides a charging scheduling plan for the user through the aforementioned decision tree model, thereby maximizing the user experience. At the same time, the vehicle network system will indicate the number of charging stations along the route from the destination and the charging stations that the electric vehicle can reach based on its current battery level, allowing the user to choose the most reasonable route.
[0135] Furthermore, depending on the different charging needs of electric vehicles, the charging requirement depends on whether the vehicle can be charged at the end of the current journey, resulting in two scenarios. If there is a charging station after the journey, there is no need to consider subsequent travel; otherwise, if there is no charging station, the vehicle cannot be charged, and there is concern about whether the power supply will be sufficient for future travel. Therefore, the required charging amount during the journey differs. The electric vehicle's power demand is calculated based on whether charging is available at the destination and a pre-built, flexible charging model. The following discussion covers these two scenarios:
[0136] (1) Charging availability at the destination: The onboard network management system installed in the electric vehicle can monitor the battery level in real time and connect to the external network to provide real-time feedback on the availability of nearby parking lots and charging stations. When it is determined that the destination is available for charging, the electric vehicle can prioritize charging along the way to meet the necessary power requirements. Assuming a simple positive linear relationship between the electric vehicle's travel distance and the battery level, and also considering unforeseen circumstances, the first charging amount is calculated based on the real-time monitored electric vehicle battery data, the real-time feedback on the availability of nearby parking lots and charging stations, and the user's travel distance data to the destination. The formula for calculating the first charging amount in the preset flexible charging model is as follows:
[0137] q1 = (s + j + y) × m - soc × c;
[0138] In the formula, q1 is the first charge amount; s is the first trip mileage in the trip data; j is the mileage of additional power consumption caused by unexpected situations; y is the real-time charging station location information; m is the power consumption per unit mileage; soc is the state of charge in the real-time electric vehicle battery data, which reflects the remaining capacity of the battery. It is numerically defined as the ratio of the remaining capacity to the battery capacity, usually expressed as a percentage; and c is the battery capacity in the real-time electric vehicle battery data.
[0139] (2) Charging is not available at the destination: In this case, the electric vehicle needs to consider not only the electricity required for the current trip, but also the electricity required for the next trip. A preset flexible charging model is used to calculate the electricity. The formula for calculating the first charge in the preset flexible charging model is as follows:
[0140] q2=(s+j+y+r)×m-soc×c;
[0141] In the formula, q2 is the second charging amount; s is the first trip mileage in the trip data; j is the mileage of additional power consumption caused by unexpected situations; y is the real-time charging station location information; m is the power consumption per unit mileage; soc is the state of charge in the real-time electric vehicle battery data, which reflects the remaining capacity of the battery. It is numerically defined as the ratio of the remaining capacity to the battery capacity, usually expressed as a percentage; c is the battery capacity in the real-time electric vehicle battery data; and r is the second trip mileage in the trip data.
[0142] In this embodiment, the power consumption is calculated based on the real-time electric vehicle battery data, real-time charging station location information, and trip data corresponding to the electric vehicle using a preset flexible charging model, thereby generating the corresponding charging amount for the electric vehicle.
[0143] Step 308: Based on the decision tree model and the charging quantity, determine the charging scheduling scheme corresponding to the electric vehicle.
[0144] It is worth mentioning that, based on the calculated amount of electricity required for electric vehicle charging and the decision tree model constructed in this application, a charging scheduling scheme for electric vehicles is generated.
[0145] In this embodiment, a charging scheduling scheme for electric vehicles is determined based on a decision tree model and the amount of charging.
[0146] In this embodiment of the invention, when scheduling electric vehicle charging, the application first obtains a sample dataset of a user's electric vehicle charging information for one month. Based on preset performance index conditions, professionals use their expertise and experience to filter out erroneous decision-making information or unreasonable scheduling patterns from the sample dataset, enhancing the accuracy of the sample dataset and thus improving the classification accuracy of the decision tree model. Next, based on the C4.5 algorithm and a preset decision tree model height, a decision tree model is constructed using preprocessed historical charging data of multiple target electric vehicles. This overcomes the shortcomings of information gain selection and can handle training data with missing attribute values. Finally, by combining the constructed decision tree model with real-time electric vehicle battery data, the user's daily travel plan, and charging station location information along the route, the output charging scheduling scheme fully utilizes the user's spare time for charging, avoiding unnecessary charging time loss. Simultaneously, the decision tree model constructed using the C4.5 algorithm can quickly help users make decisions about the required charging amount, improving electric vehicle charging efficiency and alleviating user charging anxiety.
[0147] Please see Figure 5 , Figure 5 This is a structural block diagram of an electric vehicle charging scheduling device provided in an embodiment of the present invention.
[0148] This invention provides an electric vehicle charging scheduling device, comprising:
[0149] The acquisition module 501 is used to acquire multiple initial electric vehicle charging history data corresponding to the electric vehicle. The initial electric vehicle charging history data includes the initial electric vehicle charging amount and the initial driving mileage data.
[0150] The determination module 502 is used to filter all initial trolley charging history data and determine multiple target trolley charging history data.
[0151] Module 503 is used to construct a decision tree model for the electric vehicle based on the target electric vehicle's historical charging data, using a preset decision tree model height.
[0152] The calculation module 504 is used to calculate the amount of electricity for electric vehicles based on real-time electric vehicle battery data, real-time charging station location information and trip data through a preset flexible charging model, and generate the corresponding charging amount for electric vehicles.
[0153] The scheduling module 505 is used to determine the charging scheduling scheme for electric vehicles based on the decision tree model and the charging quantity.
[0154] Furthermore, the preset elastic charging model is specifically as follows:
[0155]
[0156] In the formula, q1 is the first charging amount in the charging amount; s is the first trip mileage in the trip data; j is the mileage of additional power consumption caused by unexpected situations; y is the real-time charging station location information; m is the power consumption per unit mileage; soc is the state of charge in the real-time electric vehicle battery data; c is the battery capacity in the real-time electric vehicle battery data; q2 is the second charging amount in the charging amount; and r is the second trip mileage in the trip data.
[0157] Furthermore, module 503 includes:
[0158] The gain rate submodule is used to determine multiple initial information gain rates based on the target trolley's historical charging data;
[0159] The calculation submodule is used to perform an average calculation on all initial information gain rates to determine the average initial information gain rate.
[0160] Select a sub-module to use an initial information gain rate that is greater than the average initial information gain rate as the target information gain rate;
[0161] The model submodule is used to construct a decision tree model for electric vehicles based on a preset decision tree model height and a target information gain ratio.
[0162] Furthermore, the gain rate submodule includes:
[0163] A unit is used to construct a sample dataset using historical charging data of the target electric vehicle;
[0164] The substitution unit is used to substitute the number of samples corresponding to the sample dataset and the historical charging data of each target electric vehicle into the preset first formula for calculation to determine the sample information entropy.
[0165] The attribute unit is used to obtain multiple sample attributes corresponding to the sample dataset, and to calculate the attribute information entropy corresponding to each sample attribute by using the multiple sample attribute values and the number of sample attribute values.
[0166] The difference unit is used to calculate the difference between the sample information entropy and the information entropy of each attribute, and to determine the sample attribute information gain corresponding to each sample attribute.
[0167] The ratio unit is used to calculate the ratio of the information gain of each sample attribute to the corresponding information entropy, and to determine the initial information gain rate for each sample attribute.
[0168] Furthermore, the model submodules include:
[0169] The information unit is used to take the sample attributes corresponding to each target information gain rate as the initial decision sample attributes.
[0170] The root node unit is used to select the initial decision sample attribute corresponding to the largest target information gain ratio as the root node of the decision tree model for electric vehicles.
[0171] According to the unit, it is used to select the target decision sample attributes corresponding to electric vehicles from high to low according to the target information gain ratio corresponding to the initial decision sample attributes;
[0172] Node units are used to treat the attributes of target decision samples as tree nodes corresponding to electric vehicles;
[0173] The decision attribute unit is used to determine the decision attribute based on the root node and branch nodes of the decision tree model;
[0174] The decision tree model unit is used to construct a decision tree model for electric vehicles based on a preset decision tree model height, using the root node, branch nodes, and decision attributes of the decision tree model.
[0175] Furthermore, the first formula is predefined as follows:
[0176]
[0177] In the formula, L(m) is the sample information entropy; ai is the charging history data of the i-th target trolley; m is the number of samples;
[0178] The formula for calculating attribute information entropy is:
[0179]
[0180] In the formula, L(S) i S represents the attribute information entropy; i Let be the attribute of the i-th sample; q be the number of sample attribute values; s i Let be the attribute value of the i-th sample.
[0181] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, modules, sub-modules and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0182] This invention also provides an electronic device, which includes a processor and a memory:
[0183] The memory is used to store program code and transfer the program code to the processor;
[0184] The processor is used to execute the electric vehicle charging scheduling method of the present invention according to the instructions in the program code.
[0185] This invention also provides a computer-readable storage medium for storing program code for executing the electric vehicle charging scheduling method of the above embodiments of this invention.
[0186] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0187] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0188] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0189] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned computer-readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0190] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for scheduling electric vehicle charging, characterized in that, include: Acquire multiple initial electric vehicle charging history data corresponding to the electric vehicle, wherein the initial electric vehicle charging history data includes initial electric vehicle charging amount and initial driving mileage data; All the initial trolley charging history data are filtered to determine multiple target trolley charging history data. Based on the preset decision tree model height, a decision tree model corresponding to the electric vehicle is constructed using the target electric vehicle's charging history data. The electric vehicle's real-time battery data, real-time charging station location information, and trip data are used to calculate the amount of electricity needed to generate the corresponding charging amount for the electric vehicle by using a preset flexible charging model. Based on the decision tree model and the charging amount, a charging scheduling scheme corresponding to the electric vehicle is determined; The preset elastic charging model is specifically as follows: ; In the formula, This is the first charge amount in the total charge amount; s This refers to the first trip mileage in the trip data; j Mileage that incurs additional power consumption due to unforeseen circumstances; y Real-time charging station location information; m Electricity consumed per unit distance; soc This refers to the state of charge in real-time electric vehicle battery data. c This refers to the battery capacity in real-time electric vehicle battery data. This is the second charge amount in the total charge amount; r This is the second trip mileage in the trip data.
2. The electric vehicle charging scheduling method according to claim 1, characterized in that, The step of constructing a decision tree model corresponding to the electric vehicle based on the target electric vehicle's charging history data, using a preset decision tree model height, includes: Based on the target electric vehicle's historical charging data, multiple initial information gain rates are determined; The average initial information gain rate is determined by averaging all the initial information gain rates. An initial information gain rate greater than the average initial information gain rate is taken as the target information gain rate; The decision tree model corresponding to the electric vehicle is constructed based on the preset decision tree model height and the target information gain ratio.
3. The electric vehicle charging scheduling method according to claim 2, characterized in that, The step of determining multiple initial information gain rates based on the target electric vehicle's charging history data includes: A sample dataset was constructed using the target electric vehicle's historical charging data; Substitute the number of samples corresponding to the sample dataset and the historical charging data of each target electric vehicle into a preset first formula to perform calculations and determine the sample information entropy. Obtain multiple sample attributes corresponding to the sample dataset, and use the multiple sample attribute values and the number of sample attribute values corresponding to each sample attribute to calculate the attribute information entropy corresponding to each sample attribute respectively; Calculate the difference between the sample information entropy and the information entropy of each attribute, and determine the sample attribute information gain corresponding to each sample attribute. Calculate the ratio of the information gain of each sample attribute to the corresponding information entropy to determine the initial information gain rate for each sample attribute.
4. The electric vehicle charging scheduling method according to claim 3, characterized in that, The step of constructing the decision tree model corresponding to the electric vehicle based on the preset decision tree model height and the target information gain ratio includes: The sample attributes corresponding to each of the target information gain rates are used as the initial decision sample attributes; The attribute of the initial decision sample corresponding to the largest target information gain ratio is selected as the root node of the decision tree model corresponding to the electric vehicle. The target decision sample attributes corresponding to the electric vehicle are selected from high to low according to the target information gain ratio corresponding to the initial decision sample attributes. The target decision sample attributes are used as the tree nodes corresponding to the electric vehicle; Based on the root node and branch nodes of the decision tree model, the decision attributes are determined; Based on the preset decision tree model height, the decision tree model corresponding to the electric vehicle is constructed using the root node, the branch nodes, and the decision attributes of the decision tree model.
5. The electric vehicle charging scheduling method according to claim 3, characterized in that, The preset first formula is specifically as follows: ; In the formula, The entropy of the sample information; For the first i Historical charging data for each target electric vehicle; The number of samples; The formula for calculating the attribute information entropy is: ; In the formula, Entropy of attribute information; For the first i Individual sample attributes; q This represents the number of attribute values in the sample.
6. An electric vehicle charging scheduling device, characterized in that, include: The acquisition module is used to acquire multiple initial electric vehicle charging history data corresponding to the electric vehicle, wherein the initial electric vehicle charging history data includes initial electric vehicle charging amount and initial driving mileage data; The determination module is used to filter all the initial trolley charging history data and determine multiple target trolley charging history data. The construction module is used to construct a decision tree model corresponding to the electric vehicle based on the target electric vehicle's charging history data, using a preset decision tree model height. The calculation module is used to calculate the power consumption of the electric vehicle based on the real-time battery data, real-time charging station location information and trip data of the electric vehicle through a preset flexible charging model, and generate the corresponding charging amount of the electric vehicle. The scheduling module is used to determine the charging scheduling scheme corresponding to the electric vehicle based on the decision tree model and the charging amount; The preset elastic charging model is specifically as follows: ; In the formula, This is the first charge amount in the total charge amount; s This refers to the first trip mileage in the trip data; j Mileage that incurs additional power consumption due to unforeseen circumstances; y Real-time charging station location information; m Electricity consumed per unit distance; soc This refers to the state of charge in real-time electric vehicle battery data. c This refers to the battery capacity in real-time electric vehicle battery data. This is the second charge amount in the total charge amount; r This is the second trip mileage in the trip data.
7. An electronic device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the electric vehicle charging scheduling method as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the electric vehicle charging scheduling method as described in any one of claims 1-5.
Citation Information
Patent Citations
Electric automobile community charging real-time optimization scheduling method
CN106952004A
Intelligent bus charging system and method and medium
CN111452669A