Charging pile quantity evaluation method and device and computer readable storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-07-12
- Publication Date
- 2026-05-29
AI Technical Summary
The lack of an effective method for assessing the number of charging stations leads to an unreasonable allocation of charging stations in parking lots, affecting charging efficiency and causing energy waste.
By obtaining assessment data on the number of charging piles in parking lots, clustering is performed using a trained clustering model to obtain the proportion of electricity consumption of charging piles in the electricity quota, and weighted calculation is performed based on weight coefficients to determine the number of charging piles.
It improved the accuracy of charging pile quantity assessment, optimized the allocation of charging piles in parking lots, improved charging efficiency, and avoided energy waste.
Smart Images

Figure CN115375004B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of new energy vehicle technology, specifically to a method, device, and computer-readable storage medium for evaluating the number of charging piles. Background Technology
[0002] In recent years, with increasing public awareness of environmental protection, gasoline-powered vehicles have gradually been phased out, replaced by new energy vehicles that utilize clean energy. As the new energy vehicle industry expands, the use of new energy vehicles is becoming more widespread.
[0003] With the increasing popularity of new energy vehicles, the demand for charging stations for these vehicles is also growing. To facilitate charging for new energy vehicles, parking lots are adding parking spaces equipped with charging stations. Therefore, determining the appropriate number of charging stations has become a pressing issue for parking lots, and currently, there is a lack of effective methods for assessing the required number of charging stations. Summary of the Invention
[0004] This application provides a method, apparatus, and computer-readable storage medium for evaluating the number of charging piles. This method can effectively and accurately evaluate the number of charging piles in parking lots.
[0005] The first aspect of this application provides a method for evaluating the number of charging piles, the method comprising:
[0006] Obtain assessment data on the number of charging piles in the target parking lot. The assessment data includes parking lot information, vehicle information, power distribution information, and charging pile parameters of the target parking lot.
[0007] The parking lot information, vehicle information, power distribution information, and charging pile parameters are input into the trained clustering model for clustering to obtain multiple cluster labels. The cluster labels indicate the proportion of charging pile power consumption in the parking lot power quota.
[0008] Obtain the weight coefficient corresponding to each cluster label, and perform a weighted calculation on the multiple cluster labels based on the weight coefficient to obtain the target cluster label;
[0009] The target percentage of electricity consumption by charging piles in the target parking lot within the target parking lot's electricity quota is determined based on the target clustering label.
[0010] The number of charging piles in the target parking lot is evaluated based on the target percentage.
[0011] Accordingly, a second aspect of this application provides a charging pile quantity assessment device, the device comprising:
[0012] The first acquisition unit is used to acquire the number of charging piles in the target parking lot as an assessment data. The number of charging piles as an assessment data includes the parking lot information, vehicle information, power distribution information and charging pile parameters of the target parking lot.
[0013] The clustering unit is used to input the parking lot information, the vehicle information, the power distribution information and the charging pile parameters into the trained clustering model to perform clustering and obtain multiple cluster labels. The cluster labels indicate the proportion of the charging pile's power consumption in the parking lot's power quota.
[0014] The calculation unit is used to obtain the weight coefficient corresponding to each cluster label, and to perform a weighted calculation on the multiple cluster labels based on the weight coefficient to obtain the target cluster label;
[0015] The determining unit is used to determine the target proportion of the electricity consumption of the charging piles in the target parking lot in the electricity quota of the target parking lot based on the target clustering label;
[0016] An evaluation unit is used to evaluate the number of charging piles in the target parking lot based on the target percentage.
[0017] In some embodiments, the charging pile quantity assessment device provided in this application further includes:
[0018] The acquisition subunit is used to acquire training sample data, which includes the evaluation data of the number of sample charging piles in multiple parking lots and the clustering label of each parking lot. The evaluation data of the number of sample charging piles includes sample parking lot information, sample vehicle information, sample power distribution information and sample charging pile parameters.
[0019] The training subunit is used to train a preset clustering model with the sample charging pile quantity evaluation data as input and the corresponding clustering label as output, so as to obtain the trained clustering model.
[0020] In some embodiments, the training subunit includes:
[0021] The partitioning module is used to divide the sample charging pile quantity evaluation data into training sample charging pile quantity evaluation data and test sample charging pile quantity evaluation data.
[0022] The training module is used to train a preset clustering model with the evaluation data of the number of charging piles in the training sample as input and the corresponding clustering labels as output, so as to obtain a transitional clustering model.
[0023] The clustering module is used to input the evaluation data of the number of charging piles in the test sample into the transition clustering model for clustering processing, and to obtain the output test clustering data.
[0024] The adjustment module is used to adjust the parameters of the transition clustering model based on the difference between the test clustering data and the corresponding clustering labels, so as to obtain the trained clustering model.
[0025] In some embodiments, the preset clustering model includes a first sub-clustering model corresponding to parking lot information, a second sub-clustering model corresponding to vehicle information, a third sub-clustering model corresponding to power distribution information, and a fourth sub-clustering model corresponding to charging pile parameters. The training module is further configured to:
[0026] Using the training sample charging pile quantity evaluation data as input and the corresponding clustering labels as output, a preset clustering model is trained to obtain the first sub-transition clustering model, the second sub-transition clustering model, the third sub-transition clustering model, and the fourth sub-transition clustering model.
[0027] The clustering module is also used for:
[0028] The information corresponding to each sub-transition clustering model in the test sample charging pile quantity evaluation data is input into the corresponding sub-transition clustering model to obtain the sub-test clustering data corresponding to each sub-transition clustering model;
[0029] The adjustment module is also used for:
[0030] The parameters of each sub-transitional clustering model are adjusted based on the difference between each sub-test clustering data and the corresponding clustering label to obtain multiple trained sub-clustering models, which together constitute the trained clustering model.
[0031] In some embodiments, the adjustment module is further configured to:
[0032] Calculate the difference between each sub-test cluster data and its corresponding cluster label to obtain the test loss for each sub-transition cluster model;
[0033] Add weight coefficients to the test loss corresponding to each sub-transition clustering model, and perform weighted calculation on each test loss based on the weight coefficients to obtain the target test loss;
[0034] The target test loss is optimized by gradient descent based on a preset loss function to adjust the model parameters and weight coefficients of each sub-intermediate clustering model, thereby obtaining multiple trained sub-clustering models and the corresponding weight coefficients of each sub-clustering model.
[0035] In some embodiments, the clustering unit includes:
[0036] The clustering subunit is used to input the parking lot information, the vehicle information, the power distribution information and the charging pile parameters into the corresponding trained sub-clustering model for clustering, and obtain the clustering label output by each trained sub-clustering model;
[0037] The computing unit is also used for:
[0038] The target cluster label is obtained by weighting the corresponding cluster labels based on the weight coefficients of each sub-clustering model.
[0039] In some embodiments, the evaluation unit includes:
[0040] The first calculation subunit is used to calculate the target charging pile electricity consumption based on the target proportion and the target electricity quota of the target parking lot;
[0041] The second calculation subunit is used to calculate the number of charging piles in the target parking lot based on the electricity consumption of the target charging pile and the parameters of the charging pile.
[0042] In some embodiments, the charging pile quantity assessment device provided in this application further includes:
[0043] A receiving subunit is used to receive encrypted model data, which includes an encrypted trained clustering model and encrypted weight coefficients.
[0044] The decryption subunit is used to decrypt the encrypted model data to obtain the trained clustering model and the weight coefficients corresponding to each sub-clustering model in the clustering model.
[0045] A third aspect of this application also provides a method for evaluating the number of charging piles, the method including:
[0046] The system receives first encrypted model data uploaded by multiple distributed training terminals, and decrypts the first encrypted model data to obtain multiple sub-transitional clustering models and the test loss corresponding to each sub-transitional clustering model. The sub-transitional clustering models are trained by the distributed training terminals based on the corresponding local training sample data, and the test loss is calculated by the distributed training terminals based on the test results of the corresponding local test samples and the corresponding label data.
[0047] Obtain the weight coefficients corresponding to each sub-transition cluster, and calculate the corresponding test loss based on the weight coefficients to obtain the target test loss;
[0048] The target test loss is optimized by gradient descent based on the pre-built loss function until the target test loss is less than the preset loss value, thereby obtaining multiple sub-transition clustering models after training and the corresponding weight coefficients after training.
[0049] The trained sub-transitional clustering models and their corresponding trained weight coefficients are encrypted to obtain the second encrypted model data.
[0050] The second encrypted model data is sent to the target terminal so that the target terminal can evaluate the number of charging piles in the target parking lot based on the multiple sub-transition clustering models obtained after decrypting the second encrypted model data, the corresponding trained weight coefficients, and the obtained evaluation data on the number of charging piles in the target parking lot.
[0051] Accordingly, a fourth aspect of this application also provides a charging pile quantity assessment device, the device comprising:
[0052] The receiving unit is configured to receive first encrypted model data uploaded by multiple distributed training terminals, and decrypt the first encrypted model data to obtain multiple sub-transitional clustering models and the test loss corresponding to each sub-transitional clustering model. The sub-transitional clustering models are trained by the distributed training terminals based on corresponding local training sample data, and the test loss is calculated by the distributed training terminals based on the test results of corresponding local test samples and corresponding label data.
[0053] The second acquisition unit is used to acquire the weight coefficients corresponding to each sub-transition cluster, and to perform weighted calculation on the corresponding test loss based on the weight coefficients to obtain the target test loss.
[0054] An optimization unit is used to perform gradient descent optimization on the target test loss based on a pre-built loss function until the target test loss is less than a preset loss value, thereby obtaining multiple sub-transition clustering models after training and the corresponding weight coefficients after training.
[0055] An encryption unit is used to encrypt the trained multiple sub-transitional clustering models and their corresponding trained weight coefficients to obtain second encrypted model data.
[0056] The sending unit is used to send the second encrypted model data to the target terminal, so that the target terminal can evaluate the number of charging piles in the target parking lot based on the trained multiple sub-transitional clustering models obtained by decrypting the second encrypted model data, the corresponding trained weight coefficients, and the obtained evaluation data of the number of charging piles in the target parking lot.
[0057] The fifth aspect of this application also provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to perform the steps in the charging pile quantity evaluation method provided in the first aspect of this application.
[0058] The sixth aspect of this application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the charging pile quantity evaluation method provided in the first aspect of this application.
[0059] The seventh aspect of this application provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps in the charging pile quantity evaluation method provided in the first aspect.
[0060] The charging pile quantity assessment method provided in this application involves obtaining charging pile quantity assessment data for a target parking lot, including parking lot information, vehicle information, power distribution information, and charging pile parameters. This data is then input into a trained clustering model to obtain multiple cluster labels, each indicating the proportion of charging pile electricity consumption within the parking lot's electricity quota. A weight coefficient is obtained for each cluster label, and multiple cluster labels are weighted based on these coefficients to obtain a target cluster label. A target proportion of charging pile electricity consumption within the target parking lot's electricity quota is determined based on the target cluster label. Finally, the number of charging piles in the target parking lot is assessed based on this target proportion.
[0061] Therefore, the charging pile quantity assessment method provided in this application, when assessing the number of charging piles in a target parking lot, utilizes a trained clustering model to cluster the charging pile quantity assessment data of the target parking lot to obtain the cluster category of the target parking lot. Then, based on the mapping relationship between the cluster category and the proportion of charging pile electricity consumption in the electricity quota, the range of charging pile electricity consumption in the target parking lot is determined, thereby determining the range of the number of charging piles. This method can greatly improve the accuracy of parking lot charging pile quantity assessment. Attached Figure Description
[0062] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0063] Figure 1 This is a schematic diagram of a scenario for assessing the number of charging piles in this application;
[0064] Figure 2 This is another scenario diagram illustrating the assessment of the number of charging piles in this application;
[0065] Figure 3This is a flowchart illustrating the method for evaluating the number of charging piles provided in this application;
[0066] Figure 4 This is another flowchart illustrating the method for evaluating the number of charging piles provided in this application;
[0067] Figure 5 This is another flowchart illustrating the method for evaluating the number of charging piles provided in this application;
[0068] Figure 6 This is a schematic diagram of the charging pile quantity assessment device provided in this application;
[0069] Figure 7 This is a schematic diagram of the structure of the computer device provided in this application. Detailed Implementation
[0070] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0071] This invention provides a method, apparatus, computer-readable storage medium, and computer device for assessing the number of charging piles. The method for assessing the number of charging piles can be used in the apparatus. The apparatus can be integrated into a computer device, which can be a terminal or a server. The terminal can be a mobile phone, tablet computer, laptop computer, smart TV, wearable smart device, personal computer (PC), or vehicle-mounted terminal, etc. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. The server can also be a node in a blockchain.
[0072] Please see Figure 1This is a schematic diagram of a scenario for the charging pile quantity assessment method provided in this application. As shown in the figure, server A receives charging pile quantity assessment data for a target parking lot sent by terminal B. The charging pile quantity assessment data includes parking lot information, vehicle information, power distribution information, and charging pile parameters. The parking lot information, vehicle information, power distribution information, and charging pile parameters are input into a trained clustering model for clustering, resulting in multiple cluster labels. The cluster labels indicate the proportion of charging pile electricity consumption in the parking lot's electricity quota. The weight coefficient corresponding to each cluster label is obtained, and multiple cluster labels are weighted based on the weight coefficient to obtain the target cluster label. The target proportion of charging pile electricity consumption in the target parking lot's electricity quota is determined based on the target cluster label. The number of charging piles in the target parking lot is assessed based on the target proportion.
[0073] Please see Figure 2 This is another scenario illustration of the charging pile quantity assessment method provided in this application. As shown in the figure, server A receives first encrypted model data sent by multiple terminals B (only two are shown here), and decrypts the first encrypted model data to obtain multiple sub-transitional clustering models and the test loss corresponding to each sub-transitional clustering model. The sub-transitional clustering models are trained by distributed training terminals based on corresponding local training sample data, and the test loss is calculated by distributed training terminals based on the test results of corresponding local test samples and corresponding label data. The server A obtains the weight coefficients corresponding to each sub-transitional clustering, and calculates the corresponding test loss based on the weight coefficients to obtain the target test loss. The server A performs gradient descent optimization on the target test loss based on a pre-constructed loss function until the target test loss is less than a preset loss value, obtaining multiple trained sub-transitional clustering models and corresponding trained weight coefficients. The server A encrypts the multiple trained sub-transitional clustering models and corresponding trained weight coefficients to obtain second encrypted model data. The server A sends the second encrypted model data to target terminal C, so that target terminal C can evaluate the number of charging piles in the target parking lot based on the multiple trained sub-transitional clustering models obtained by decrypting the second encrypted model data, the corresponding trained weight coefficients, and the obtained evaluation data on the number of charging piles in the target parking lot.
[0074] It should be noted that, Figure 1 and Figure 2 The illustrated scenarios for assessing the number of charging piles shown are merely two examples. The charging pile quantity assessment scenarios described in the embodiments of this application are intended to more clearly illustrate the technical solutions of this application and do not constitute a limitation on the technical solutions provided in this application. Those skilled in the art will understand that as charging pile quantity assessment scenarios evolve and new business scenarios emerge, the technical solutions provided in this application are equally applicable to similar technical problems.
[0075] The implementation scenarios described above will be explained in detail below.
[0076] With the increasing popularity of new energy vehicles, charging stations have become an essential feature of parking lots. However, the distribution of charging stations in each parking lot affects the charging efficiency of new energy vehicles, as well as the sufficiency of electricity or potential waste. An unreasonable allocation of charging stations in a parking lot can negatively impact charging efficiency and lead to energy waste. For example, insufficient charging stations result in queuing for new energy vehicles, reducing charging efficiency; conversely, too many charging stations lead to low utilization rates and further energy waste. For newly built parking lots, the lack of relevant data often makes estimating the allocation of charging stations and charging spaces difficult. Therefore, this application provides a method for assessing the number of charging stations to improve the accuracy of such assessments.
[0077] This application embodiment will be described from the perspective of a charging pile quantity assessment device, which can be integrated into a computer device. The computer device can be a terminal or a server. The terminal can be a mobile phone, tablet, laptop, smart TV, wearable smart device, personal computer (PC), or vehicle terminal, etc. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms. Figure 3 The diagram shown is a flowchart illustrating the charging pile quantity assessment method provided in this application. The method includes:
[0078] Step 110: Obtain assessment data on the number of charging piles in the target parking lot.
[0079] The target parking lot can be a parking lot whose number of charging piles needs to be assessed. This parking lot can be a newly built parking lot or a parking lot that needs to be upgraded to add charging pile parking spaces.
[0080] The specific data for assessing the number of charging piles can include parking lot information, vehicle information, power distribution information, and charging pile parameters for the target parking lot. Parking lot information includes, but is not limited to: number of parking spaces, number of charging piles in the parking lot, number of new energy vehicles entering the parking lot, average charging time for new energy vehicles, and average waiting time for new energy vehicles to charge. Vehicle information includes, but is not limited to: vehicle length, width, height, weight, mileage, battery capacity, pure electric range, fast charging time, slow charging time, percentage of fast charging capacity, maximum engine power, maximum engine torque, total electric motor torque, electric motor, transmission type, maximum speed, and 0-100 km / h acceleration time. Power distribution information includes, but is not limited to: parking lot power quota, maximum power consumption, minimum power consumption, the percentage of vehicle charging volume in each parking lot's total power consumption in that parking lot, the percentage of vehicle charging volume in each parking lot's power quota, number of power outages in the parking lot, and the percentage of total power consumption in the parking lot relative to its power quota. Charging pile parameters include, but are not limited to: charging pile specifications, input / output power, input voltage, maximum transmission rate, maximum transmission distance, communication distance, size, charging start-up method, frequency, model (single-gun / dual-gun), and range.
[0081] The above-mentioned data on the number of charging piles can be obtained from actual data statistics of the parking lots to be evaluated, or it can be estimated based on parking lot information.
[0082] Step 120: Input parking lot information, vehicle information, power distribution information and charging pile parameters into the trained clustering model to perform clustering and obtain multiple cluster labels.
[0083] In the parking lot charging pile quantity assessment method provided in this application embodiment, a clustering model is offered to cluster parking lots based on the charging pile quantity assessment data. Specifically, this clustering model can be a K-Nearest Neighbor (KNN) model. The KNN model is a machine learning model that can be used for classification and regression; it is a supervised learning model. Its main idea is that if most of the K most similar (i.e., nearest) samples in the feature space belong to a certain category, then the sample also belongs to that category. In other words, this method determines the category of the sample to be classified based solely on the category of its one or a few nearest neighbors.
[0084] Furthermore, the KNN model provided in this application is used to perform cluster analysis on the charging pile quantity assessment data to obtain cluster category labels. In the method provided in this application, the category label can be defined based on the proportion of charging pile electricity consumption in the parking lot's electricity quota. Specifically, the proportion of charging pile electricity consumption in the parking lot's electricity quota can be divided into multiple intervals, for example, 0%–10% as one interval, 10%–20% as another interval, ... 90%–100% as yet another interval. Further, a cluster label can be determined for each interval; for example, cluster label 1 can be set for the interval 0%–10%, cluster label 2 for the interval 10%–20%, and so on, with cluster label 10 set for the interval 90%–100%.
[0085] It is understandable that before using the aforementioned KNN model to perform cluster analysis on the charging pile quantity assessment data to obtain the cluster labels corresponding to the parking lots, the KNN model can be trained first. Specifically, in some embodiments, before inputting parking lot information, vehicle information, power distribution information, and charging pile parameters into the trained clustering model for clustering to obtain multiple cluster labels, and before the cluster labels indicate the proportion of charging pile electricity consumption in the parking lot's electricity quota, the following steps are also included:
[0086] 1. Obtain training sample data. The training sample data includes the evaluation data of the number of sample charging piles in multiple parking lots and the clustering label of each parking lot. The evaluation data of the number of sample charging piles includes sample parking lot information, sample vehicle information, sample power distribution information and sample charging pile parameters.
[0087] 2. Using the sample charging pile quantity assessment data as input and the corresponding clustering labels as output, train the preset clustering model to obtain the trained clustering model.
[0088] In this embodiment of the application, training the KNN clustering model can be supervised training. The training sample data for supervised training of the KNN model can specifically include model input sample data and corresponding label data. The model input sample data can be the evaluation data of the number of charging piles in mature parking lots, and the corresponding label data can be the clustering labels determined based on the proportion of charging pile electricity consumption in the parking lot electricity quota.
[0089] Specifically, when training the aforementioned KNN clustering model, training sample data can be obtained first. This training sample data includes the evaluation data of the number of charging piles in multiple parking lots and the clustering label of each parking lot. The evaluation data of the number of charging piles in the parking lots includes the sample parking lot information, sample vehicle information, sample power distribution information, and sample charging pile parameters. The clustering label of the parking lot can be mapped according to the proportion of the charging amount of each parking lot's charging pile in the parking lot's power quota in the sample power distribution information. For example, if the proportion of the charging amount of the parking lot's charging pile in the parking lot's power quota in the sample power distribution information is 45%, then its corresponding clustering label can be determined to be 5.
[0090] Then, the sample charging pile quantity evaluation data of each parking lot can be used as the input of the KNN model, and its corresponding clustering label can be used as the output to train the KNN model, thus obtaining the trained KNN model.
[0091] In some scenarios, the input data for the KNN model provided in this application consists of parking lot information, vehicle information, power distribution information, and charging pile parameters. This data contains a large amount of detailed information, which involves parking lot data security and is generally not shared or exchanged externally. Therefore, to protect the data security of each parking lot, this application provides a federated KNN model training method. Specifically, the method first obtains the charging pile quantity assessment data and corresponding clustering labels for each parking lot from multiple distributed terminals. Then, based on the charging pile quantity assessment data obtained from each distributed terminal, the KNN model is trained and tested on each distributed terminal. Finally, the trained model parameters and corresponding test results are encrypted and uploaded to a cloud server for federated training to obtain the final federated KNN model.
[0092] In the above scenario, parking lot information, vehicle information, power distribution information, and charging pile parameters are input into the trained clustering model to obtain multiple cluster labels. These labels, before indicating the proportion of charging pile electricity consumption in the parking lot's electricity quota, also include:
[0093] a. Receive encrypted model data, which includes encrypted trained clustering models and encrypted weight coefficients;
[0094] b. Decrypt the encrypted model data to obtain the trained clustering model and the weight coefficients of each sub-cluster model in the clustering model.
[0095] In this embodiment of the application, after the federated KNN is trained using the federated learning method, the cloud server can further encrypt and send the model parameters of the trained federated KNN and the weight coefficients of each module in the model to the terminal where the charging pile quantity assessment device is located. After receiving the encrypted data, the encrypted data can be decrypted to obtain the trained KNN model and the weight coefficients corresponding to each module.
[0096] Specifically, before clustering parking lot information, vehicle information, power distribution information, and charging pile parameters, encrypted model data can be received first. This encrypted model data includes the aforementioned trained clustering model, namely the federated KNN model data, and the weight coefficients corresponding to each sub-clustering model (multiple modules of the federated KNN).
[0097] In some embodiments, a preset clustering model is trained using sample charging pile quantity assessment data as input and corresponding clustering labels as output to obtain the trained clustering model, including:
[0098] 2.1 The sample charging pile quantity evaluation data is divided into training sample charging pile quantity evaluation data and test sample charging pile quantity evaluation data.
[0099] 2.2. Using the evaluation data of the number of charging piles in the training sample as input and the corresponding clustering labels as output, train the preset clustering model to obtain the transition clustering model;
[0100] 2.3 Input the test sample charging pile quantity assessment data into the transition clustering model to obtain the output test clustering data;
[0101] 2.4. Based on the difference between the test clustering data and the corresponding clustering labels, the parameters of the transition clustering model are adjusted to obtain the trained clustering model.
[0102] In this embodiment, when training the KNN model based on training sample data, the training sample data can be divided into two parts: one part for training the KNN model and the other part for testing the trained KNN model. Specifically, the sample charging pile quantity evaluation data can be divided into training sample charging pile quantity evaluation data and test sample charging pile quantity evaluation data. When the preset clustering model to be trained is Federated KNN, the sample charging pile quantity evaluation data in the training sample data obtained in each distributed terminal is divided into training sample charging pile quantity evaluation data and test sample charging pile quantity evaluation data.
[0103] After dividing the sample charging pile quantity assessment data, the training sample charging pile quantity assessment data can be used as input to the clustering model to be trained, and its corresponding cluster labels can be used as output to perform supervised training of the clustering model to be trained. The clustering model trained here is either a preliminary clustering model or a clustering model trained individually by each distributed terminal; therefore, this training time can be called a transitional clustering model. In the training process of the federated KNN model, this transitional clustering model is simply a clustering model pre-trained by each distributed terminal.
[0104] Furthermore, the test sample charging pile quantity assessment data can be input again into the aforementioned trained transitional clustering model for clustering processing, obtaining the corresponding clustering results output by the transitional clustering model, referred to here as test clustering data. The difference between the clustering labels of this test clustering data and the corresponding test sample charging pile quantity assessment data can indicate the accuracy of the trained transitional clustering model. Based on this difference, the model parameters of the transitional clustering model can be further adjusted to obtain a more accurate clustering model, i.e., the trained clustering model.
[0105] In some embodiments, the preset clustering model includes a first sub-clustering model corresponding to parking lot information, a second sub-clustering model corresponding to vehicle information, a third sub-clustering model corresponding to power distribution information, and a fourth sub-clustering model corresponding to charging pile parameters. The preset clustering model is trained using training sample charging pile quantity evaluation data as input and corresponding cluster labels as output to obtain a transitional clustering model, including:
[0106] 2.2.1. Using the evaluation data of the number of charging piles in the training sample as input and the corresponding clustering labels as output, train the preset clustering model to obtain the first sub-transition clustering model, the second sub-transition clustering model, the third sub-transition clustering model and the fourth sub-transition clustering model.
[0107] The test sample charging pile quantity assessment data is input into the transition clustering model to obtain the output test clustering data, including:
[0108] 2.2.2 Input the information corresponding to each sub-transition clustering model from the test sample charging pile quantity evaluation data into the corresponding sub-transition clustering model to obtain the sub-test clustering data corresponding to each sub-transition clustering model;
[0109] The parameters of the transitional clustering model are adjusted based on the differences between the test clustering data and the corresponding cluster labels to obtain the trained clustering model, including:
[0110] 2.2.3. Based on the difference between each sub-test clustering data and the corresponding clustering label, the parameters of each sub-transitional clustering model are adjusted to obtain multiple trained sub-clustering models. The multiple trained sub-clustering models constitute the trained clustering model.
[0111] In this embodiment, the preset clustering model to be trained can be a KNN model comprising multiple KNN clustering modules, where each module corresponds to a branch of the charging pile quantity evaluation data. Here, the KNN clustering module can be referred to as a sub-clustering model, and the sub-clustering model corresponding to parking lot information can be designated as the first sub-clustering model, the sub-clustering model corresponding to vehicle information as the second sub-clustering model, the sub-clustering model corresponding to power distribution information as the third sub-clustering model, and the sub-clustering model corresponding to charging pile parameters as the fourth sub-clustering model.
[0112] Thus, by using the training sample charging pile quantity assessment data and corresponding cluster labels to train a preset clustering model, we can train a first sub-clustering model using the sample parking lot information as input and the corresponding cluster labels as output; train a second sub-clustering model using the sample vehicle information as input and the corresponding cluster labels as output; train a third sub-clustering model using the sample power distribution information as input and the corresponding cluster labels as output; and train a fourth sub-clustering model using the sample charging pile parameters as input and the corresponding cluster labels as output. This yields a sub-transitional clustering model corresponding to each sub-clustering model.
[0113] The contribution of these four sub-clustering models to the overall KNN can be constrained by weight coefficients. That is, the output of multiple sub-clustering models can be weighted based on the weight coefficients corresponding to each sub-clustering model to obtain the output of KNN.
[0114] Therefore, when using the test sample charging pile quantity assessment data to test the transitional clustering model, the parking lot information, vehicle information, power distribution information, and charging pile parameters from the test sample charging pile quantity assessment data can be input into the corresponding sub-transitional clustering model, respectively, to obtain the sub-test clustering data output by each sub-transitional clustering model. Then, the parameters of each sub-transitional clustering model can be adjusted based on the difference between the sub-test clustering data and the corresponding cluster labels, resulting in multiple trained sub-clustering models. This leads to the trained clustering model.
[0115] In some embodiments, the parameters of each sub-transitional clustering model are adjusted based on the difference between each sub-test clustering data and its corresponding clustering label to obtain multiple trained sub-clustering models, including:
[0116] 2.2.3.1 Calculate the difference between each sub-test cluster data and its corresponding cluster label to obtain the test loss corresponding to each sub-transitional clustering model;
[0117] 2.2.3.2 Add weight coefficients to the test loss corresponding to each sub-transition clustering model, and calculate the target test loss by weighting each test loss based on the weight coefficients;
[0118] 2.2.3.3. Based on the preset loss function, the target test loss is optimized by gradient descent to adjust the model parameters and weight coefficients of each sub-intermediate clustering model, so as to obtain multiple trained sub-clustering models and the corresponding weight coefficients of each sub-clustering model.
[0119] In this embodiment, the parameters of each sub-transitional clustering model are adjusted based on the difference between each sub-test clustering data and its corresponding clustering label. Specifically, the difference between each sub-test clustering data and its corresponding clustering label can be calculated first to obtain the test loss corresponding to each sub-transitional clustering model. Then, a learnable weight coefficient can be added to each test loss. The initial value of the weight coefficient can be 0.25, and the target test loss is obtained by weighting each test loss based on the weight coefficient.
[0120] Then, each sub-clustering model and its corresponding weight coefficients can be further adjusted according to a preset loss function to continuously reduce the target test loss until the target test loss meets a preset condition, such as being less than a preset value. This yields multiple trained sub-clustering models and the corresponding weight coefficients for each sub-clustering model.
[0121] In some embodiments, parking lot information, vehicle information, power distribution information, and charging pile parameters are input into the trained clustering model to obtain multiple clustering labels, including:
[0122] Parking information, vehicle information, power distribution information, and charging pile parameters are input into the corresponding trained sub-clustering models for clustering, and the clustering labels output by each trained sub-clustering model are obtained.
[0123] Obtain the weight coefficient corresponding to each cluster label, and perform a weighted calculation on multiple cluster labels based on the weight coefficients to obtain the target cluster label, including:
[0124] The target cluster label is obtained by weighting the corresponding cluster labels based on the weight coefficients of each sub-clustering model.
[0125] In this embodiment of the application, when the clustering model includes multiple sub-clustering models corresponding to different branch data, when performing clustering analysis on the obtained charging pile quantity assessment data based on the trained clustering model, the trained multiple sub-clustering models can be used to cluster the branch data in the charging pile quantity assessment data respectively: parking lot information, vehicle information, power distribution information and charging pile parameters, to obtain multiple sub-clustering labels; then, based on the learned weight coefficients corresponding to each trained sub-clustering model, the multiple sub-clustering labels are weighted and calculated to obtain the target clustering label.
[0126] In this process, when the trained KNN model is a federated KNN model, multiple sub-transitional clustering models are trained using training sample charging pile quantity evaluation data in each distributed terminal to obtain multiple sub-transitional clustering models. These models are then tested using test sample charging pile quantity evaluation data, and the test loss for each sub-transitional clustering model is calculated based on the test results and cluster labels. The model parameters and test loss of each sub-transitional clustering model are then encrypted and uploaded to the server. Upon receiving the encrypted model parameters and test losses from multiple distributed terminals, the server decrypts the encrypted data one by one. Learnable weight coefficients are used to weight the test loss of each decrypted sub-transitional clustering model to obtain the target test loss. Furthermore, the model parameters and corresponding weight coefficients of each sub-transitional clustering model can be adjusted based on a preset loss function to ensure the target test loss meets the desired requirements. This process yields multiple sub-clustering models and their corresponding weight coefficients.
[0127] Step 130: Obtain the weight coefficient corresponding to each cluster label, and perform weighted calculation on multiple cluster labels based on the weight coefficient to obtain the target cluster label.
[0128] In this model, the weight coefficient corresponding to each cluster label represents the contribution of different branches of the charging pile quantity assessment data obtained during the training of the KNN model to the clustering result. When training the federated KNN using federated learning, obtaining the weight coefficient corresponding to each cluster label can be achieved by receiving the encrypted model parameters of the trained clustering model and the weight coefficients corresponding to each sub-cluster model within the trained clustering model sent by the server. Then, the encrypted data can be decrypted to obtain the model parameters of the trained clustering model and the weight coefficients of each sub-cluster model.
[0129] After obtaining the weight coefficients corresponding to each cluster label, the weight coefficients can be used to further calculate the weighted sum of the multiple cluster labels output by the trained clustering model to obtain the target cluster label of the target parking lot.
[0130] Step 140: Determine the target percentage of electricity consumption of charging piles in the target parking lot within the target parking lot's electricity quota based on the target clustering label.
[0131] As mentioned earlier, the cluster label of a parking lot can indicate the proportion of the electricity consumption of charging piles in the parking lot within the total electricity quota of the parking lot. After clustering the evaluation data of the number of charging piles in the target parking lot according to the trained clustering model to obtain the target cluster label of the target parking lot, the proportion of the electricity consumption of the charging piles in the target parking lot within the electricity quota of the target parking lot can be determined.
[0132] Step 150: Evaluate the number of charging piles in the target parking lot based on the target percentage.
[0133] Once the proportion of the charging pile's power consumption in the target parking lot's power quota is determined, the range of the charging pile's power consumption can be further determined, and the number of charging piles can be further evaluated based on the range of the charging pile's power consumption.
[0134] In some embodiments, the number of charging piles in the target parking lot is evaluated based on the target proportion, including:
[0135] 1. Calculate the target charging pile electricity consumption based on the target percentage and the target electricity quota of the target parking lot;
[0136] 2. Calculate the number of charging piles in the target parking lot based on the target charging pile's power consumption and charging pile parameters.
[0137] In this embodiment, once the target percentage of the charging pile's power consumption within the parking lot's power quota is determined, the charging pile's power consumption can be further calculated based on the parking lot's power quota and the target percentage, thus obtaining the target charging pile's power consumption. Then, the charging pile's power consumption can be calculated based on information such as the charging pile's power in the charging pile parameters, thereby accurately determining the number of charging piles.
[0138] As described above, the charging pile quantity assessment method provided in this application obtains charging pile quantity assessment data for a target parking lot. This data includes parking lot information, vehicle information, power distribution information, and charging pile parameters. The parking lot information, vehicle information, power distribution information, and charging pile parameters are input into a trained clustering model to obtain multiple cluster labels. These cluster labels indicate the proportion of charging pile electricity consumption in the parking lot's electricity quota. A weight coefficient corresponding to each cluster label is obtained, and multiple cluster labels are weighted based on this coefficient to obtain a target cluster label. The target proportion of charging pile electricity consumption in the target parking lot's electricity quota is determined based on the target cluster label. Finally, the number of charging piles in the target parking lot is assessed based on this target proportion.
[0139] Therefore, the charging pile quantity assessment method provided in this application, when assessing the number of charging piles in a target parking lot, utilizes a trained clustering model to cluster the charging pile quantity assessment data of the target parking lot to obtain the cluster category of the target parking lot. Then, based on the mapping relationship between the cluster category and the proportion of charging pile electricity consumption in the electricity quota, the range of charging pile electricity consumption in the target parking lot is determined, thereby determining the range of the number of charging piles. This method can greatly improve the accuracy of parking lot charging pile quantity assessment.
[0140] This application also provides a method for evaluating the number of charging piles, which can be used in a computer device, such as a server. Figure 4 The diagram shown is another flowchart illustrating the charging pile quantity assessment method provided in this application. The method specifically includes:
[0141] Step 210: Receive the first encrypted model data uploaded by multiple distributed training terminals, and decrypt the first encrypted model data to obtain multiple sub-transitional clustering models and the test loss corresponding to each sub-transitional clustering model.
[0142] To ensure data security across parking lots, a model capable of evaluating the number of charging stations in a parking lot needs to be trained without data sharing between them. This application provides a method for constructing a federated KNN model based on federated learning to evaluate the number of charging stations in a parking lot. This method can be executed by a cloud server.
[0143] Specifically, the cloud server can receive first encrypted model data uploaded by multiple distributed training terminals. This first encrypted model data includes model data for multiple sub-transitional clustering models, which may include model structure data and model parameters; furthermore, the first encrypted model data may also include the test loss for each sub-transitional clustering model.
[0144] The model's structural data can be pre-defined data. For example, in this embodiment, a KNN model with four clustering modules can be used, where each module can be called a sub-clustering model. After obtaining the local parking lot's charging pile quantity assessment data (including parking lot information, vehicle information, power distribution information, and charging pile parameters), the distributed training terminal can train the pre-defined KNN model locally based on the local parking lot's charging pile quantity assessment data to obtain a transitional clustering model. The transitional clustering model includes multiple sub-transitional clustering models, which correspond to the parking lot information, vehicle information, power distribution information, and charging pile parameters, respectively. Then, the trained transitional clustering model is tested using test data, and the difference between the output clustering result and the corresponding clustering label is calculated to obtain the test loss. Then, each distributed training terminal encrypts and sends the model data of the multiple trained sub-transitional clustering models and the corresponding test loss to the cloud server for further model training.
[0145] After receiving the first encrypted model data, the cloud server can decrypt it to obtain multiple sub-transitional clustering models and the test loss corresponding to each sub-transitional clustering model. Furthermore, it can be understood that since the cloud server receives the first encrypted model data sent by multiple distributed terminals, the cloud server decrypts the data to obtain multiple sub-transitional clustering models corresponding to multiple terminals and the test loss corresponding to each sub-transitional clustering model.
[0146] Step 220: Obtain the weight coefficients corresponding to each sub-transition cluster, and calculate the corresponding test loss based on the weight coefficients to obtain the target test loss.
[0147] Furthermore, the cloud server can set a learnable weight coefficient for each sub-transitional clustering model, and then calculate the test loss of the response based on the weight coefficient to obtain the target test loss.
[0148] Step 230: Optimize the target test loss using gradient descent based on the pre-built loss function until the target test loss is less than the preset loss value, thereby obtaining multiple trained sub-transition clustering models and their corresponding trained weight coefficients.
[0149] Furthermore, the cloud server can optimize the model parameters and weight coefficients of each sub-transitional clustering model based on a preset loss function, thereby enabling further training of each sub-transitional clustering model and obtaining the trained sub-transitional clustering model, which in turn yields the trained clustering model. Simultaneously, the weight coefficients corresponding to each sub-transitional clustering model can be learned.
[0150] Step 240: Encrypt the multiple sub-transitional clustering models and their corresponding trained weight coefficients to obtain the second encrypted model data.
[0151] In this process, after the cloud server decrypts the first encrypted model data uploaded by each distributed training terminal and further trains it to obtain multiple trained sub-clustering models and the weight coefficients corresponding to each sub-clustering model, it can further encrypt the multiple trained sub-clustering models and the weight coefficients corresponding to each sub-clustering model to obtain the second encrypted model data.
[0152] Step 250: Send the second encrypted model data to the target terminal so that the target terminal can evaluate the number of charging piles in the target parking lot based on the multiple sub-transitional clustering models obtained after decrypting the second encrypted model data, the corresponding trained weight coefficients, and the obtained evaluation data on the number of charging piles in the target parking lot.
[0153] Furthermore, the cloud server can further distribute the encrypted second encrypted model data to the target terminal, so that the target terminal can decrypt the second encrypted model data to obtain the trained multiple sub-clustering model data and the weight coefficients corresponding to each clustering model. Then, the target terminal can perform cluster analysis on the charging pile quantity evaluation data of the target parking lot based on the multiple sub-clustering model data and the weight coefficients corresponding to each clustering model to obtain the category label of the target parking lot.
[0154] The target terminal can be one of the aforementioned distributed training terminals, or it can be other terminals, such as a terminal for evaluating the number of charging piles in a newly built parking lot.
[0155] As described above, the charging pile quantity assessment method provided in this application receives first encrypted model data uploaded by multiple distributed training terminals, and decrypts the first encrypted model data to obtain multiple sub-transitional clustering models and the test loss corresponding to each sub-transitional clustering model. The sub-transitional clustering models are trained by the distributed training terminals based on corresponding local training sample data, and the test loss is calculated by the distributed training terminals based on the test results of corresponding local test samples and corresponding label data. The method obtains the weight coefficients corresponding to each sub-transitional clustering and performs weighted calculations on the corresponding test loss based on the weight coefficients to obtain the target test loss. It then performs gradient descent optimization on the target test loss based on a pre-constructed loss function until the target test loss is less than a preset loss value, obtaining multiple trained sub-transitional clustering models and corresponding trained weight coefficients. The method encrypts the multiple trained sub-transitional clustering models and corresponding trained weight coefficients to obtain second encrypted model data. Finally, it sends the second encrypted model data to the target terminal, enabling the target terminal to assess the number of charging piles in the target parking lot based on the multiple trained sub-transitional clustering models obtained by decrypting the second encrypted model data, the corresponding trained weight coefficients, and the obtained charging pile quantity assessment data of the target parking lot.
[0156] Therefore, the charging pile quantity assessment method provided in this application employs federated learning to train a federated KNN model, and then uses the trained federated KNN to perform cluster analysis on the charging pile quantity assessment data of parking lots to determine the category of the parking lot, and further determine the number of charging piles in the parking lot accordingly. This method can train an accurate federated KNN model while ensuring that the data of each parking lot is not shared and that the data of each parking lot is secure. This allows for accurate classification of parking lots and estimation of the accurate number of charging piles based on the classification results.
[0157] This application also provides a method for evaluating the number of charging piles. This method can be used in a computer device, which can be a terminal or a server. Figure 5 The diagram shown is another flowchart illustrating the charging pile quantity assessment method provided in this application. The method specifically includes:
[0158] Step 310: The distributed training terminal acquires sample data and divides the training sample data into training sample data and test sample data.
[0159] The distributed terminal is a terminal that processes the charging pile quantity assessment data of mature parking lots and uses this data to initially train the federated KNN model. Specifically, as mentioned earlier, the charging pile quantity assessment data includes parking lot information, vehicle information, power distribution information, and charging pile parameters. In addition to the charging pile quantity assessment data, the sample data also includes their corresponding clustering labels.
[0160] Specifically, the parking information matrix can be denoted as... Where n1 represents the number of features in the parking information data, and h1 represents the length of each feature vector in the parking information data; the vehicle information data matrix is denoted as... Where n2 represents the number of features in the vehicle information data, and h2 represents the length of each feature vector in the vehicle information data; the power distribution information data matrix is denoted as... Q represents the number of features in the power distribution information data, and h3 represents the length of each feature vector in the power distribution information data; the charging pile information data matrix is denoted as... Where n4 represents the number of features in the charging pile information data, and h4 represents the length of each feature vector in the charging pile information data.
[0161] Then, based on the proportion of vehicle charging volume in each parking lot to its electricity quota, the parking lot can be further divided into 10 equal categories to obtain a cluster label Y for each parking lot's charging piles. That is: 1 represents 0-10%, 2 represents 10%-20%, 3 represents 20%-30%, 4 represents 30%-40%, 5 represents 40%-50%, 6 represents 50%-60%, 7 represents 60%-70%, 8 represents 70%-80%, 9 represents 80%-90%, and 10 represents 90%-100%.
[0162] Furthermore, the sample data can be divided into training sample data and test sample data. This will be determined by X. i,1 The sample consisting of the label vector Y is randomly divided into training sample sequences according to a certain ratio. (ratio of a) and test samples (The ratio is 1-a). X i,2 The data is randomly divided into training sample sequences according to a certain proportion. (ratio of a) and test samples (The ratio is 1-a). X i,3 The data is randomly divided into training sample sequences according to a certain proportion. (ratio of a) and test samples (The ratio is 1-a). X i,4 The data is randomly divided into training sample sequences according to a certain proportion. (ratio α) and test samples (The ratio is 1-a).
[0163] Step 320: The distributed training terminal uses training sample data to train a preset clustering model to obtain a transitional clustering model.
[0164] The preset clustering model provided in this application embodiment can be composed of four modules: parking lot information module, vehicle information module, power distribution information module, and charging pile parameter module. That is, the preset clustering model provided in this application includes four sub-clustering models, which correspond to the clustering tasks of parking lot information, vehicle information, power distribution information, and charging pile parameters, respectively.
[0165] Then, in the parking information module, input the training sample sequence of parking information. A KNN model with k=10 is trained to obtain KNN model M1 for the parking lot data module. The training sample sequence of vehicle information samples is then input into the vehicle information module. A KNN model with k=10 is trained, resulting in KNN model M2 for the vehicle data module. The training sample sequence of the power distribution information samples is then input into the power distribution information module. A KNN model with k=10 was trained, resulting in KNN model M3 under the power distribution data module. The training sample sequence of charging pile information samples was then input into the charging pile parameter module. A KNN model with k=10 is trained, resulting in KNN model M4 for the charging pile data module. The KNN models trained here for each module can be called sub-transitional clustering models, and multiple sub-transitional clustering models constitute the transitional clustering model.
[0166] Step 330: The distributed training terminal uses a transitional clustering model to perform cluster analysis on the test sample data to obtain the test results.
[0167] Furthermore, test sample data can be used to test the KNN models under each trained module to obtain the corresponding test results.
[0168] Specifically, you can first input a test sample of parking information in the parking information module. The KNN model with k=10 was tested, and the loss label sequence for the test samples under the parking lot data module was obtained: Test sample of inputting vehicle information sample under the vehicle information module. The KNN model with k=10 was tested, and the loss label sequence for the test samples under the vehicle data module was obtained: Input the test sample of the power distribution information sample in the power distribution information module. The KNN model with k=10 was tested, and the loss label sequence for the test samples under the power distribution data module was obtained: Test sample of charging pile information input under the charging pile information module. A KNN model with k=10 was tested, and the KNN model under the charging pile data module and the loss label sequence under the test samples were obtained: I4(y i4 ≠c k ).
[0169] Step 340: The distributed training terminal calculates the test loss based on the test results and cluster labels.
[0170] Furthermore, the test loss for each sub-clustering model can be determined based on the difference between the test results and the clustering labels, i.e., the aforementioned I4(y i4 ≠c k ).
[0171] Step 350: The distributed training terminal encrypts the transition clustering model and the test loss and uploads them to the cloud server.
[0172] Furthermore, each distributed training terminal can encrypt the trained models M1 to M4 and their corresponding test losses (i.e., loss label sequences) to obtain the first encrypted data, and then upload the encrypted first encrypted data to the cloud server for further training.
[0173] Step 360: The cloud server decrypts the first encrypted data to obtain the transition clustering model and test loss, and trains the transition clustering model based on the preset loss function to obtain the trained clustering model.
[0174] After receiving the aforementioned first encrypted data, the cloud server can decrypt the first encrypted data according to the preset decryption rules to obtain the corresponding transition clustering model and the corresponding loss label sequence.
[0175] In this embodiment of the application, the federated KNN model can be specifically represented as:
[0176]
[0177] In this embodiment, a loss function for training the federated KNN model is also provided as follows:
[0178]
[0179] Wherein, w in the above formula j For the j-th module, or the weight coefficient corresponding to the j-th sub-clustering model.
[0180] Then, using the Lagrange optimality principle and gradient descent algorithm, the weight coefficient W = {w} for each module's test samples can be calculated. j|j=1,2,3,4}. If the overall loss of the test samples is minimized, then save the weight vector sequence W and the model M={M} for each module. j |j=1,2,3,4}. Otherwise, repeat the training until the total loss reaches the evaluation criterion.
[0181] Step 370: The cloud server encrypts the trained clustering model and sends it to the target terminal.
[0182] After training is completed, the cloud server can encrypt the trained federated KNN model to obtain second encrypted data, and then send the second encrypted data to the target terminal that needs to evaluate the number of charging piles.
[0183] Step 380: The target terminal decrypts the second encrypted data to obtain the trained clustering model, and uses the trained clustering model to perform cluster analysis on the charging pile quantity assessment data to obtain cluster labels.
[0184] After receiving the second encrypted data, the target terminal can decrypt it to obtain the trained federated KNN. The clustering model can then be deployed online.
[0185] When assessing the number of charging stations, the assessment data for the target parking lot can be obtained, including the aforementioned parking lot information, vehicle information, power distribution information, and charging station parameters. Then, the trained clustering model is used to perform cluster analysis on this charging station quantity assessment data to obtain the cluster label corresponding to the target parking lot to be assessed. For example, the cluster label for the target parking lot is 5.
[0186] Step 390: The target terminal evaluates the number of charging piles in the target parking lot based on the clustering labels.
[0187] Once the cluster label of the target parking lot is determined, the charging pile data of the target parking lot can be further evaluated. For example, if the cluster label is determined to be 5, then it can be determined that the electricity consumption of the charging piles in this parking lot accounts for 40% to 50% of the parking lot's electricity quota. In this way, the range of electricity consumption of the charging piles can be calculated, and then the range of the number of charging piles can be calculated based on the range of electricity consumption and the power parameters in the charging pile parameters, thereby evaluating the number of charging piles that need to be installed.
[0188] The charging pile quantity assessment method provided in this application uses parking lot layout data, vehicle category distribution data, vehicle parameter data, electricity quota for each parking lot, and electricity fluctuation data for each parking lot as data inputs to construct a clustering model based on federated learning, and constructs a charging pile distribution model for each parking lot based on the input data.
[0189] Among them, the federated learning method is used to build the charging pile allocation model. Without exchanging data modules from different sources, the model's prediction effect is effectively improved by utilizing the data features of each data module. This allows the charging pile allocation model to be built according to the layout characteristics of each parking lot. At the same time, the federated learning mechanism effectively protects the data security of each module.
[0190] As described above, the charging pile quantity assessment method provided in this application obtains charging pile quantity assessment data for a target parking lot. This data includes parking lot information, vehicle information, power distribution information, and charging pile parameters. The parking lot information, vehicle information, power distribution information, and charging pile parameters are input into a trained clustering model to obtain multiple cluster labels. These cluster labels indicate the proportion of charging pile electricity consumption in the parking lot's electricity quota. A weight coefficient corresponding to each cluster label is obtained, and multiple cluster labels are weighted based on this coefficient to obtain a target cluster label. The target proportion of charging pile electricity consumption in the target parking lot's electricity quota is determined based on the target cluster label. Finally, the number of charging piles in the target parking lot is assessed based on this target proportion.
[0191] Therefore, the charging pile quantity assessment method provided in this application, when assessing the number of charging piles in a target parking lot, utilizes a trained clustering model to cluster the charging pile quantity assessment data of the target parking lot to obtain the cluster category of the target parking lot. Then, based on the mapping relationship between the cluster category and the proportion of charging pile electricity consumption in the electricity quota, the range of charging pile electricity consumption in the target parking lot is determined, thereby determining the range of the number of charging piles. This method can greatly improve the accuracy of parking lot charging pile quantity assessment.
[0192] To better implement the above method for assessing the number of charging piles, this application also provides a device for assessing the number of charging piles, which can be integrated into a terminal or server.
[0193] For example, such as Figure 6 The diagram shown is a structural schematic of a charging pile quantity assessment device provided in an embodiment of this application. The charging pile quantity assessment device may include a first acquisition unit 410, a clustering unit 420, a calculation unit 430, a determination unit 440, and an assessment unit 450, as follows:
[0194] The first acquisition unit 410 is used to acquire the number of charging piles in the target parking lot. The number of charging piles in the target parking lot includes parking lot information, vehicle information, power distribution information and charging pile parameters.
[0195] Clustering unit 420 is used to input parking lot information, vehicle information, power distribution information and charging pile parameters into the trained clustering model for clustering, and obtain multiple cluster labels. The cluster labels indicate the proportion of charging pile power consumption in the parking lot power quota.
[0196] The calculation unit 430 is used to obtain the weight coefficient corresponding to each cluster label, and to perform weighted calculation on multiple cluster labels based on the weight coefficient to obtain the target cluster label;
[0197] The determination unit 440 is used to determine the target proportion of the electricity consumption of charging piles in the target parking lot in the electricity quota of the target parking lot based on the target clustering label;
[0198] Evaluation unit 450 is used to evaluate the number of charging piles in the target parking lot based on the target percentage.
[0199] In some embodiments, the charging pile quantity assessment device provided in this application further includes:
[0200] The acquisition sub-unit is used to acquire training sample data. The training sample data includes the evaluation data of the number of sample charging piles in multiple parking lots and the clustering label of each parking lot. The evaluation data of the number of sample charging piles includes sample parking lot information, sample vehicle information, sample power distribution information and sample charging pile parameters.
[0201] The training subunit is used to train a preset clustering model with the sample charging pile quantity evaluation data as input and the corresponding clustering label as output, so as to obtain the trained clustering model.
[0202] In some embodiments, the training subunit includes:
[0203] The partitioning module is used to divide the sample charging pile quantity evaluation data into training sample charging pile quantity evaluation data and test sample charging pile quantity evaluation data.
[0204] The training module is used to train a preset clustering model with the evaluation data of the number of charging piles in the training sample as input and the corresponding clustering labels as output, so as to obtain a transitional clustering model.
[0205] The clustering module is used to input the test sample charging pile quantity evaluation data into the transition clustering model for clustering processing, and obtain the output test clustering data.
[0206] The adjustment module is used to adjust the parameters of the transition clustering model based on the difference between the test clustering data and the corresponding clustering labels, so as to obtain the trained clustering model.
[0207] In some embodiments, the preset clustering model includes a first sub-clustering model corresponding to parking lot information, a second sub-clustering model corresponding to vehicle information, a third sub-clustering model corresponding to power distribution information, and a fourth sub-clustering model corresponding to charging pile parameters. The training module is further used for:
[0208] Using the evaluation data of the number of charging piles in the training sample as input and the corresponding clustering labels as output, a preset clustering model is trained to obtain the first sub-transition clustering model, the second sub-transition clustering model, the third sub-transition clustering model and the fourth sub-transition clustering model;
[0209] The clustering module is also used for:
[0210] The information corresponding to each sub-transition clustering model in the test sample charging pile quantity evaluation data is input into the corresponding sub-transition clustering model to obtain the sub-test clustering data corresponding to each sub-transition clustering model;
[0211] The adjustment module is also used for:
[0212] The parameters of each sub-transitional clustering model are adjusted based on the difference between each sub-test clustering data and its corresponding clustering label, resulting in multiple trained sub-clustering models. These multiple trained sub-clustering models constitute the trained clustering model.
[0213] In some embodiments, the adjustment module is further configured to:
[0214] Calculate the difference between each sub-test cluster data and its corresponding cluster label to obtain the test loss for each sub-transition cluster model;
[0215] Add weight coefficients to the test loss corresponding to each sub-transition clustering model, and calculate the target test loss by weighting each test loss based on the weight coefficients.
[0216] The target test loss is optimized by gradient descent based on a preset loss function to adjust the model parameters and weight coefficients of each sub-intermediate clustering model, thereby obtaining multiple trained sub-clustering models and the corresponding weight coefficients of each sub-clustering model.
[0217] In some embodiments, the clustering unit includes:
[0218] The clustering sub-unit is used to input parking lot information, vehicle information, power distribution information and charging pile parameters into the corresponding trained sub-clustering model for clustering, and obtain the clustering label output by each trained sub-clustering model;
[0219] The computing unit is also used for:
[0220] The target cluster label is obtained by weighting the corresponding cluster labels based on the weight coefficients of each sub-clustering model.
[0221] In some embodiments, the evaluation unit includes:
[0222] The first calculation subunit is used to calculate the target charging pile's electricity consumption based on the target percentage and the target electricity quota of the target parking lot.
[0223] The second calculation subunit is used to calculate the number of charging piles in the target parking lot based on the target charging pile's power consumption and charging pile parameters.
[0224] In some embodiments, the charging pile quantity assessment device provided in this application further includes:
[0225] The receiving subunit is used to receive encrypted model data, which includes encrypted trained clustering models and encrypted weight coefficients.
[0226] The decryption subunit is used to decrypt the encrypted model data to obtain the trained clustering model and the weight coefficients of each sub-clustering model in the clustering model.
[0227] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.
[0228] As described above, the charging pile quantity assessment device provided in this application embodiment acquires charging pile quantity assessment data of the target parking lot through the first acquisition unit 410. The charging pile quantity assessment data includes parking lot information, vehicle information, power distribution information, and charging pile parameters of the target parking lot. The clustering unit 420 inputs the parking lot information, vehicle information, power distribution information, and charging pile parameters into the trained clustering model to obtain multiple clustering labels. The clustering labels indicate the proportion of charging pile power consumption in the parking lot's power quota. The calculation unit 430 acquires the weight coefficient corresponding to each clustering label and performs weighted calculation on multiple clustering labels based on the weight coefficient to obtain the target clustering label. The determination unit 440 determines the target proportion of charging pile power consumption in the target parking lot's power quota based on the target clustering label. The evaluation unit 450 evaluates the number of charging piles in the target parking lot based on the target proportion.
[0229] Therefore, the charging pile quantity assessment method provided in this application, when assessing the number of charging piles in a target parking lot, utilizes a trained clustering model to cluster the charging pile quantity assessment data of the target parking lot to obtain the cluster category of the target parking lot. Then, based on the mapping relationship between the cluster category and the proportion of charging pile electricity consumption in the electricity quota, the range of charging pile electricity consumption in the target parking lot is determined, thereby determining the range of the number of charging piles. This method can greatly improve the accuracy of parking lot charging pile quantity assessment.
[0230] This application also provides a computer device, which can be a terminal or a server, such as... Figure 7 The diagram shown is a structural schematic of the computer device provided in this application. Specifically:
[0231] The computer device may include components such as a processing unit 510 with one or more processing cores, a storage unit 520 with one or more storage media, a power module 530, and an input module 540. Those skilled in the art will understand that... Figure 7 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0232] The processing unit 510 is the control center of the computer device. It connects various parts of the computer device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the storage unit 520, and by calling data stored in the storage unit 520. Optionally, the processing unit 510 may include one or more processing cores; preferably, the processing unit 510 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processing unit 510.
[0233] Storage unit 520 can be used to store software programs and modules. Processing unit 510 executes various functional applications and data processing by running the software programs and modules stored in storage unit 520. Storage unit 520 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, and web page access), etc.; the data storage area may store data created based on the use of the computer device. In addition, storage unit 520 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, storage unit 520 may also include a memory controller to provide processing unit 510 with access to storage unit 520.
[0234] The computer equipment also includes a power supply module 530 that supplies power to various components. Preferably, the power supply module 530 can be logically connected to the processing unit 510 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply module 530 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0235] The computer device may also include an input module 540, which can be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to object settings and function control.
[0236] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processing unit 510 in the computer device loads the executable files corresponding to the processes of one or more applications into the storage unit 520 according to the following instructions, and the processing unit 510 runs the applications stored in the storage unit 520 to realize various functions, as follows:
[0237] The process involves: acquiring assessment data on the number of charging piles in the target parking lot, including parking lot information, vehicle information, power distribution information, and charging pile parameters; inputting this data into a trained clustering model to obtain multiple cluster labels, each indicating the proportion of charging pile electricity consumption within the parking lot's electricity quota; obtaining the weight coefficient corresponding to each cluster label and performing a weighted calculation based on these coefficients to obtain the target cluster label; determining the target proportion of charging pile electricity consumption within the target parking lot's electricity quota based on the target cluster label; and assessing the number of charging piles in the target parking lot based on this target proportion.
[0238] It should be noted that the computer device provided in this application embodiment and the method in the above embodiment belong to the same concept. The specific implementation of each of the above operations can be found in the previous embodiments, and will not be repeated here.
[0239] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0240] Therefore, embodiments of the present invention provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the methods provided in the embodiments of the present invention. For example, the instructions can execute the following steps:
[0241] The process involves: acquiring assessment data on the number of charging piles in the target parking lot, including parking lot information, vehicle information, power distribution information, and charging pile parameters; inputting this data into a trained clustering model to obtain multiple cluster labels, each indicating the proportion of charging pile electricity consumption within the parking lot's electricity quota; obtaining the weight coefficient corresponding to each cluster label and performing a weighted calculation based on these coefficients to obtain the target cluster label; determining the target proportion of charging pile electricity consumption within the target parking lot's electricity quota based on the target cluster label; and assessing the number of charging piles in the target parking lot based on this target proportion.
[0242] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0243] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0244] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the methods provided in the embodiments of the present invention, the beneficial effects that any of the methods provided in the embodiments of the present invention can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0245] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium and executes the computer instructions, causing the computer device to perform the methods provided in various optional implementations of the above-described method for evaluating the number of charging piles.
[0246] The charging pile quantity assessment method, apparatus, and computer-readable storage medium provided in the embodiments of the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for evaluating the number of charging piles, characterized in that, The method includes: Obtain assessment data on the number of charging piles in the target parking lot. The assessment data includes parking lot information, vehicle information, power distribution information, and charging pile parameters of the target parking lot. The parking lot information, vehicle information, power distribution information, and charging pile parameters are input into a trained clustering model for clustering to obtain multiple cluster labels. This includes: inputting the parking lot information, vehicle information, power distribution information, and charging pile parameters into corresponding trained sub-clustering models for clustering to obtain cluster labels output by each trained sub-clustering model; the cluster labels indicate the proportion of charging pile electricity consumption in the parking lot's electricity quota. Obtaining the weight coefficient corresponding to each cluster label, and performing a weighted calculation on the multiple cluster labels based on the weight coefficient to obtain the target cluster label, includes: performing a weighted calculation on the corresponding cluster label according to the weight coefficient corresponding to each sub-clustering model to obtain the target cluster label; The target percentage of electricity consumption by charging piles in the target parking lot within the target parking lot's electricity quota is determined based on the target clustering label. The number of charging piles in the target parking lot is evaluated based on the target percentage.
2. The method according to claim 1, characterized in that, Before inputting the parking lot information, vehicle information, power distribution information, and charging pile parameters into the trained clustering model for clustering to obtain multiple cluster labels, where the cluster labels indicate the proportion of charging pile power consumption in the parking lot power quota, the method further includes: Acquire training sample data, which includes evaluation data on the number of sample charging piles in multiple parking lots and clustering labels for each parking lot. The evaluation data on the number of sample charging piles includes sample parking lot information, sample vehicle information, sample power distribution information, and sample charging pile parameters. Using the sample charging pile quantity assessment data as input and the corresponding clustering labels as output, a preset clustering model is trained to obtain the trained clustering model.
3. The method according to claim 2, characterized in that, The process of training a preset clustering model using the sample charging pile quantity assessment data as input and the corresponding clustering labels as output to obtain the trained clustering model includes: The sample charging pile quantity evaluation data is divided into training sample charging pile quantity evaluation data and test sample charging pile quantity evaluation data. Using the training sample charging pile quantity evaluation data as input and the corresponding clustering labels as output, a preset clustering model is trained to obtain a transitional clustering model; The test sample charging pile quantity evaluation data is input into the transition clustering model to obtain the output test clustering data; The parameters of the transitional clustering model are adjusted based on the differences between the test clustering data and the corresponding clustering labels to obtain the trained clustering model.
4. The method according to claim 3, characterized in that, The preset clustering model includes a first sub-clustering model corresponding to parking lot information, a second sub-clustering model corresponding to vehicle information, a third sub-clustering model corresponding to power distribution information, and a fourth sub-clustering model corresponding to charging pile parameters. The preset clustering model is trained using the training sample charging pile quantity evaluation data as input and the corresponding clustering labels as output to obtain a transitional clustering model, including: Using the training sample charging pile quantity evaluation data as input and the corresponding clustering labels as output, a preset clustering model is trained to obtain the first sub-transition clustering model, the second sub-transition clustering model, the third sub-transition clustering model, and the fourth sub-transition clustering model. The step of inputting the test sample charging pile quantity evaluation data into the transition clustering model to obtain the output test clustering data includes: The information corresponding to each sub-transition clustering model in the test sample charging pile quantity evaluation data is input into the corresponding sub-transition clustering model to obtain the sub-test clustering data corresponding to each sub-transition clustering model; The step of adjusting the parameters of the transitional clustering model based on the difference between the test clustering data and the corresponding clustering labels to obtain the trained clustering model includes: The parameters of each sub-transitional clustering model are adjusted based on the difference between each sub-test clustering data and the corresponding clustering label to obtain multiple trained sub-clustering models, which together constitute the trained clustering model.
5. The method according to claim 4, characterized in that, The parameters of each sub-transitional clustering model are adjusted based on the difference between each sub-test clustering data and its corresponding clustering label to obtain multiple trained sub-clustering models, including: Calculate the difference between each sub-test cluster data and its corresponding cluster label to obtain the test loss for each sub-transition cluster model; Add weight coefficients to the test loss corresponding to each sub-transition clustering model, and perform weighted calculation on each test loss based on the weight coefficients to obtain the target test loss; The target test loss is optimized by gradient descent based on a preset loss function to adjust the model parameters and weight coefficients of each sub-intermediate clustering model, thereby obtaining multiple trained sub-clustering models and the corresponding weight coefficients of each sub-clustering model.
6. The method according to claim 1, characterized in that, The assessment of the number of charging piles in the target parking lot based on the target proportion includes: The target charging pile electricity consumption is calculated based on the target percentage and the target electricity quota of the target parking lot. The number of charging piles in the target parking lot is calculated based on the electricity consumption of the target charging pile and the parameters of the charging pile.
7. The method according to claim 1, characterized in that, Before inputting the parking lot information, vehicle information, power distribution information, and charging pile parameters into the trained clustering model to obtain multiple clustering labels, whereby the clustering labels indicate the proportion of charging pile power consumption in the parking lot power quota, the method further includes: Receive encrypted model data, which includes an encrypted trained clustering model and encrypted weight coefficients; The encrypted model data is decrypted to obtain the trained clustering model and the weight coefficients corresponding to each sub-clustering model in the clustering model.
8. A method for evaluating the number of charging piles, characterized in that, The method includes: The system receives first encrypted model data uploaded by multiple distributed training terminals, and decrypts the first encrypted model data to obtain multiple sub-transitional clustering models and the test loss corresponding to each sub-transitional clustering model. The sub-transitional clustering models are trained by the distributed training terminals based on the corresponding local training sample data, and the test loss is calculated by the distributed training terminals based on the test results of the corresponding local test samples and the corresponding label data. Obtain the weight coefficients corresponding to each sub-transition cluster, and calculate the corresponding test loss based on the weight coefficients to obtain the target test loss; The target test loss is optimized by gradient descent based on the pre-built loss function until the target test loss is less than the preset loss value, thereby obtaining multiple sub-transition clustering models after training and the corresponding weight coefficients after training. The trained sub-transitional clustering models and their corresponding trained weight coefficients are encrypted to obtain the second encrypted model data. The second encrypted model data is sent to the target terminal, enabling the target terminal to evaluate the number of charging piles in the target parking lot based on the trained sub-transitional clustering models obtained by decrypting the second encrypted model data, the corresponding trained weight coefficients, and the obtained evaluation data on the number of charging piles in the target parking lot. This includes: inputting the obtained parking lot information, vehicle information, power distribution information, and charging pile parameters into the corresponding trained sub-transitional clustering models for clustering, obtaining a clustering label output by each trained sub-transitional clustering model; the clustering label indicates the proportion of charging pile electricity consumption in the parking lot's electricity quota; weighting the corresponding clustering label according to the weight coefficients of each sub-transitional clustering model to obtain a target clustering label; determining the target proportion of charging pile electricity consumption in the target parking lot within the target parking lot's electricity quota based on the target clustering label; and evaluating the number of charging piles in the target parking lot based on the target proportion.
9. A device for evaluating the number of charging piles, characterized in that, The device includes: The first acquisition unit is used to acquire the number of charging piles in the target parking lot as an assessment data. The number of charging piles as an assessment data includes the parking lot information, vehicle information, power distribution information and charging pile parameters of the target parking lot. The clustering unit is used to input the parking lot information, vehicle information, power distribution information, and charging pile parameters into a trained clustering model for clustering to obtain multiple cluster labels. This includes inputting the parking lot information, vehicle information, power distribution information, and charging pile parameters into corresponding trained sub-clustering models for clustering to obtain a cluster label output by each trained sub-clustering model. The cluster label indicates the proportion of charging pile electricity consumption in the parking lot's electricity quota. The calculation unit is used to obtain the weight coefficient corresponding to each cluster label, and to perform weighted calculation on the multiple cluster labels based on the weight coefficient to obtain the target cluster label, including: performing weighted calculation on the corresponding cluster label according to the weight coefficient corresponding to each sub-clustering model to obtain the target cluster label; The determining unit is used to determine the target proportion of the electricity consumption of the charging piles in the target parking lot in the electricity quota of the target parking lot based on the target clustering label; An evaluation unit is used to evaluate the number of charging piles in the target parking lot based on the target percentage.
10. The apparatus according to claim 9, characterized in that, The device further includes: The acquisition subunit is used to acquire training sample data, which includes the evaluation data of the number of sample charging piles in multiple parking lots and the clustering label of each parking lot. The evaluation data of the number of sample charging piles includes sample parking lot information, sample vehicle information, sample power distribution information and sample charging pile parameters. The training subunit is used to train a preset clustering model with the sample charging pile quantity evaluation data as input and the corresponding clustering label as output, so as to obtain the trained clustering model.
11. The apparatus according to claim 10, characterized in that, The training subunit includes: The partitioning module is used to divide the sample charging pile quantity evaluation data into training sample charging pile quantity evaluation data and test sample charging pile quantity evaluation data. The training module is used to train a preset clustering model with the evaluation data of the number of charging piles in the training sample as input and the corresponding clustering labels as output, so as to obtain a transitional clustering model. The clustering module is used to input the evaluation data of the number of charging piles in the test sample into the transition clustering model for clustering processing, and to obtain the output test clustering data. The adjustment module is used to adjust the parameters of the transition clustering model based on the difference between the test clustering data and the corresponding clustering labels, so as to obtain the trained clustering model.
12. The apparatus according to claim 11, characterized in that, The preset clustering model includes a first sub-clustering model corresponding to parking lot information, a second sub-clustering model corresponding to vehicle information, a third sub-clustering model corresponding to power distribution information, and a fourth sub-clustering model corresponding to charging pile parameters. The training module is further used for: Using the training sample charging pile quantity evaluation data as input and the corresponding clustering labels as output, a preset clustering model is trained to obtain the first sub-transition clustering model, the second sub-transition clustering model, the third sub-transition clustering model, and the fourth sub-transition clustering model. The clustering module is also used for: The information corresponding to each sub-transition clustering model in the test sample charging pile quantity evaluation data is input into the corresponding sub-transition clustering model to obtain the sub-test clustering data corresponding to each sub-transition clustering model; The adjustment module is also used for: The parameters of each sub-transitional clustering model are adjusted based on the difference between each sub-test clustering data and the corresponding clustering label to obtain multiple trained sub-clustering models, which together constitute the trained clustering model.
13. The apparatus according to claim 12, characterized in that, The adjustment module is also used for: Calculate the difference between each sub-test cluster data and its corresponding cluster label to obtain the test loss for each sub-transition cluster model; Add weight coefficients to the test loss corresponding to each sub-transition clustering model, and perform weighted calculation on each test loss based on the weight coefficients to obtain the target test loss; The target test loss is optimized by gradient descent based on a preset loss function to adjust the model parameters and weight coefficients of each sub-intermediate clustering model, thereby obtaining multiple trained sub-clustering models and the corresponding weight coefficients of each sub-clustering model.
14. The apparatus according to claim 9, characterized in that, The evaluation unit includes: The first calculation subunit is used to calculate the target charging pile electricity consumption based on the target proportion and the target electricity quota of the target parking lot; The second calculation subunit is used to calculate the number of charging piles in the target parking lot based on the electricity consumption of the target charging pile and the parameters of the charging pile.
15. The apparatus according to claim 9, characterized in that, The device further includes: A receiving subunit is used to receive encrypted model data, which includes an encrypted trained clustering model and encrypted weight coefficients. The decryption subunit is used to decrypt the encrypted model data to obtain the trained clustering model and the weight coefficients corresponding to each sub-clustering model in the clustering model.
16. A device for evaluating the number of charging piles, characterized in that, The device includes: The receiving unit is configured to receive first encrypted model data uploaded by multiple distributed training terminals, and decrypt the first encrypted model data to obtain multiple sub-transitional clustering models and the test loss corresponding to each sub-transitional clustering model. The sub-transitional clustering models are trained by the distributed training terminals based on corresponding local training sample data, and the test loss is calculated by the distributed training terminals based on the test results of corresponding local test samples and corresponding label data. The second acquisition unit is used to acquire the weight coefficients corresponding to each sub-transition cluster, and to perform weighted calculation on the corresponding test loss based on the weight coefficients to obtain the target test loss. An optimization unit is used to perform gradient descent optimization on the target test loss based on a pre-built loss function until the target test loss is less than a preset loss value, thereby obtaining multiple trained sub-transition clustering models and corresponding trained weight coefficients. An encryption unit is used to encrypt the trained multiple sub-transitional clustering models and their corresponding trained weight coefficients to obtain second encrypted model data. The sending unit is configured to send the second encrypted model data to the target terminal, so that the target terminal can evaluate the number of charging piles in the target parking lot based on the trained sub-transitional clustering models obtained by decrypting the second encrypted model data, the corresponding trained weight coefficients, and the obtained evaluation data on the number of charging piles in the target parking lot. This includes: inputting the obtained parking lot information, vehicle information, power distribution information, and charging pile parameters of the target parking lot into the corresponding trained sub-transitional clustering models for clustering, obtaining a clustering label output by each trained sub-transitional clustering model; the clustering label indicating the proportion of charging pile electricity consumption in the parking lot's electricity quota; performing a weighted calculation on the corresponding clustering label according to the weight coefficients of each sub-transitional clustering model to obtain a target clustering label; determining the target proportion of charging pile electricity consumption in the target parking lot within the target parking lot's electricity quota based on the target clustering label; and evaluating the number of charging piles in the target parking lot based on the target proportion.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps in the charging pile quantity assessment method according to any one of claims 1 to 8.
18. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in the charging pile quantity assessment method according to any one of claims 1 to 8.
19. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps in the charging pile quantity assessment method according to any one of claims 1 to 8.