Vehicle charging feature recognition method based on multi-source classification and related device
Through the dimensionality reduction processing and model optimization of multi-source data, the problem of inaccurate charging feature recognition in the electric vehicle charging management system is solved, and more efficient charging feature recognition and management is achieved.
Patent Information
- Application Number
- CN202510542317.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-08-08
AI Technical Summary
Most existing electric vehicle charging management systems are based on a single data source for charging behavior analysis, which is difficult to comprehensively and accurately capture the user's complex charging behavior and demand patterns, resulting in inaccurate charging feature recognition.
By acquiring multi-source data, dimensionality reduction processing of feature vectors and model optimization are performed, and the multi-source classification method is used to improve the accuracy of charging feature recognition.
It improves the accuracy of vehicle charging feature recognition, can better learn the charging feature patterns and differences of different vehicles, and supports intelligent charging planning and scheduling.
Smart Images

Figure CN120448944A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of feature recognition technology, and in particular to a vehicle charging feature recognition method based on multi-source classification and related devices. Background Art
[0002] Existing electric vehicle charging management systems mostly analyze charging behavior based on a single data source (such as charging time, location, or power level). This single-dimensional analysis often fails to fully and accurately capture users' complex charging behaviors and demand patterns. EV users' charging behaviors vary significantly across different scenarios, and characteristics such as charging time, location, and frequency are influenced by multiple factors, including driving routes, weather conditions, battery capacity, and individual user preferences. Relying solely on a single data source for charging behavior analysis and feature recognition will be difficult to meet the actual needs of vehicle charging management.
[0003] Therefore, how to improve the accuracy of identifying vehicle charging characteristics needs to be solved urgently. Summary of the Invention
[0004] The embodiments of the present application provide a vehicle charging feature identification method and related devices based on multi-source classification. By performing dimensionality reduction processing on the feature vectors of different vehicles and performing model optimization, the model can better learn the patterns and differences of the charging features of different vehicles, thereby improving the accuracy of identifying vehicle charging features.
[0005] In a first aspect, an embodiment of the present application provides a vehicle charging feature recognition method based on multi-source classification, the method comprising:
[0006] Obtain N first eigenvectors corresponding to N vehicles; N is an integer greater than 1;
[0007] Assigning a label to each of the N first eigenvectors to obtain N first labels;
[0008] Performing dimensionality reduction processing on the N first eigenvectors to obtain N second eigenvectors;
[0009] Optimizing the first model according to the N second feature vectors and the N first labels to obtain a second model; the first model is used to identify vehicle charging characteristics;
[0010] Obtaining a reference feature vector corresponding to a preset first time period;
[0011] The reference feature vector is identified according to the second model to obtain an identification result; the identification result is used to determine whether the vehicle corresponding to the reference feature vector is any one of the N vehicles.
[0012] In a second aspect, an embodiment of the present application provides a vehicle charging feature recognition device based on multi-source classification, the device comprising a first acquisition module, an allocation module, a dimensionality reduction module, an optimization module, a second acquisition module, and an identification module, wherein:
[0013] The first acquisition module is used to obtain N first feature vectors corresponding to N vehicles; N is an integer greater than 1;
[0014] The assigning module is configured to assign a label to each of the N first feature vectors to obtain N first labels;
[0015] The dimensionality reduction module is used to perform dimensionality reduction processing on the N first eigenvectors to obtain N second eigenvectors;
[0016] The optimization module is configured to optimize the first model according to the N second feature vectors and the N first labels to obtain a second model; the first model is configured to identify vehicle charging characteristics;
[0017] The second acquisition module is used to obtain a reference feature vector corresponding to a preset first time period;
[0018] The recognition module is used to identify the reference feature vector according to the second model to obtain a recognition result; the recognition result is used to determine whether the vehicle corresponding to the reference feature vector is any one of the N vehicles.
[0019] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program comprises instructions for executing the steps of any method of the first aspect of the embodiment of the present application.
[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute part or all of the steps described in any method of the first aspect of the embodiment of the present application.
[0021] In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
[0022] By implementing the embodiments of the present application, the feature vectors of different vehicles are subjected to dimensionality reduction processing and model optimization is performed, so that the model can better learn the patterns and differences of the charging characteristics of different vehicles, thereby improving the accuracy of identifying vehicle charging characteristics. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0024] Figure 1 This is a system architecture diagram of a vehicle charging feature recognition system provided by an embodiment of the present application;
[0025] Figure 2 This is a schematic diagram of a model optimization process provided in an embodiment of the present application;
[0026] Figure 3 This is an application scenario diagram of vehicle charging feature recognition provided by an embodiment of the present application;
[0027] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0028] Figure 5 This is a flow chart of a vehicle charging feature identification method based on multi-source classification provided in an embodiment of the present application;
[0029] Figure 6 This is a schematic diagram of a process for obtaining a first eigenvector provided in an embodiment of the present application;
[0030] Figure 7 This is a schematic diagram of a process for identifying a reference feature vector provided by an embodiment of the present application;
[0031] Figure 8 This is a block diagram of the functional modules of a vehicle charging feature recognition device based on multi-source classification provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0034] It should be understood that the term "and / or" in this document is merely a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document indicates that the associated objects are in an "or" relationship. The "plurality" appearing in the embodiments of this application refers to two or more.
[0035] In the embodiments of the present application, "at least one item" or similar expressions refers to any combination of these items, including any combination of single items or plural items, and refers to one or more, and multiple refers to two or more. For example, at least one item (item) of a, b, or c can represent the following seven situations: a, b, c, a and b, a and c, b and c, a, b, and c. Among them, each of a, b, and c can be an element or a set containing one or more elements.
[0036] The "connection" appearing in the embodiments of the present application refers to various connection methods such as direct connection or indirect connection to achieve communication between devices, and the embodiments of the present application do not impose any limitations on this.
[0037] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0038] The following are the explanations of the relevant terms involved in this application:
[0039] Support Vector Machine (SVM) model: The SVM model refers to a supervised machine learning algorithm that aims to find the optimal hyperplane to classify data so as to maximize the distance between each category in N-dimensional space.
[0040] t-distributed Stochastic Neighbor Embedding (t-SNE): t-SNE is an algorithm for dimensionality reduction of high-dimensional data, accurately representing a set of data points in a high-dimensional space in a low-dimensional space.
[0041] Existing electric vehicle charging management systems mostly analyze charging behavior based on a single data source (such as charging time, location, or power level). This single-dimensional analysis often fails to fully and accurately capture users' complex charging behaviors and demand patterns. EV users' charging behaviors vary significantly across different scenarios, and characteristics such as charging time, location, and frequency are also influenced by multiple factors, including driving routes, weather conditions, battery capacity, and individual user preferences. Relying solely on a single data source for charging behavior analysis and feature recognition will be difficult to meet the actual needs of vehicle charging management. Therefore, improving the accuracy of identifying vehicle charging features is an urgent issue.
[0042] To address the above-mentioned issues, an embodiment of the present application provides a vehicle charging feature identification method and related apparatus based on multi-source classification, which obtains N first feature vectors corresponding to N vehicles; N is an integer greater than 1; a label is assigned to each of the N first feature vectors to obtain N first labels; dimensionality reduction is performed on the N first feature vectors to obtain N second feature vectors; a first model is optimized based on the N second feature vectors and the N first labels to obtain a second model; the first model is used to identify vehicle charging features; a reference feature vector corresponding to a preset first time period is obtained; the reference feature vector is identified based on the second model to obtain an identification result; the identification result is used to determine whether the vehicle corresponding to the reference feature vector is any of the N vehicles. By performing dimensionality reduction on the feature vectors of different vehicles and performing model optimization, the model can better learn the patterns and differences in the charging features of different vehicles, thereby improving the accuracy of identifying vehicle charging features.
[0043] For easier understanding, see Figure 1 , Figure 1 This is a system architecture diagram of a vehicle charging feature recognition system provided by an embodiment of the present application. The vehicle charging feature recognition system includes an input module, a model optimization module, a feature recognition module, and an output module. The input module is connected to the model optimization module and the feature recognition module, respectively, to transmit relevant data to these two modules; the model optimization module is connected to the feature recognition module to transmit the optimized second model to the feature recognition module; and the feature recognition module is connected to the output module to transmit the recognition results to the output module.
[0044] Among them, the input module is responsible for collecting and receiving data information related to vehicle charging, such as charging characteristic data such as charging time, charging power, current, voltage, as well as vehicle identification data. It is the entry point for the vehicle charging characteristic recognition system to obtain original information.
[0045] Among them, the feature recognition module can use the second model optimized by the model optimization module to analyze and identify the charging feature data transmitted by the input module, and determine the category label of the vehicle by judging the charging characteristics of the vehicle. It is the part that realizes the core recognition function.
[0046] The model optimization module can optimize and improve the first model used for feature recognition based on the relevant training data of the input module, such as by adjusting model parameters, selecting a more appropriate algorithm, etc., to obtain an optimized second model, thereby improving the accuracy and efficiency of model recognition. It should be noted that the first model can be an SVM model, which is not specifically limited here.
[0047] Among them, the output module can output the recognition results of the feature recognition module, and the output form can be displayed on the visual interface of the vehicle charging feature recognition system, stored in a database, or transmitted to other related systems.
[0048] It can be seen that by comprehensively collecting vehicle charging characteristic data, covering multi-dimensional information such as charging time, power, current, etc., a rich and complete data foundation is provided for subsequent accurate identification and analysis; by optimizing the model, the model's recognition accuracy of vehicle charging characteristics is improved, and misjudgments and wrong judgments are reduced; based on the optimized model, vehicle charging characteristics can be efficiently and accurately identified, and vehicle identity and charging status can be quickly determined, providing a reliable basis for vehicle management, charging billing and other businesses.
[0049] For easier understanding, see Figure 2 , Figure 2This is a flow chart of a model optimization provided by an embodiment of the present application. First, vehicle charging-related data is collected from multiple dimensions to obtain N external environment characteristic parameter sets and N internal charging characteristic parameter sets. Among them, the external environment characteristic parameter set includes but is not limited to charging duration, charging pile service life, and environmental parameters. The environmental parameters include but are not limited to ambient temperature, ambient humidity, and ambient air pressure, which are not specifically limited here. The external environment characteristic parameter set reflects the external conditions in which the vehicle is charging. For example, the charging duration can reflect the charging speed of the vehicle, the service life of the charging pile may affect the charging stability of the vehicle, and environmental parameters (such as ambient temperature, ambient humidity, and ambient air pressure) will have an indirect impact on the charging process of the vehicle. Among them, the internal charging characteristic parameter set includes but is not limited to voltage parameters, current parameters, battery temperature, and battery capacity, which are not specifically limited here. The internal charging characteristic parameter set describes the electrical and physical states of the vehicle during charging. For example, voltage and current reflect the charging power situation, battery temperature can be used to monitor the battery health status, and battery capacity is related to the remaining battery power and charging progress.
[0050] Next, the N sets of external environmental feature parameters and the N sets of internal charging feature parameters are integrated into N feature vectors, one for each external environmental feature parameter set and one for each internal charging feature parameter set. t-SNE is then used to reduce the dimensionality of these N feature vectors, yielding the N reduced feature vectors. High-dimensional data may contain redundancy and noise, and dimensionality reduction can simplify the data structure and reduce computational complexity while retaining key information, improving model training efficiency and generalization capabilities.
[0051] Finally, the model is trained using the N eigenvectors after dimensionality reduction, and the model's hyperparameters are adjusted and optimized, with the optimized model output. Hyperparameters determine the model's structure and training methods. Hyperparameter tuning can help the model better fit the data and improve the accuracy of identifying vehicle charging characteristics.
[0052] It can be seen that integrating multi-dimensional data to form feature vectors and performing dimensionality reduction processing to remove redundant information can reduce data complexity and computational complexity, and improve data processing speed and storage efficiency; model training and hyperparameter tuning based on the reduced-dimensional data enable the model to better capture the characteristics of vehicle charging, significantly improve the accuracy of feature recognition, and facilitate the subsequent implementation of intelligent charging planning and scheduling.
[0053] For easier understanding, see Figure 3 , Figure 3This is an application scenario diagram of vehicle charging feature identification provided by an embodiment of the present application, wherein the reference feature vector is a data set that describes the vehicle charging behavior, which may include information such as charging time, charging power, current, voltage, etc. The reference feature vector represents the characteristic performance of a certain vehicle in a specific charging process. First, the reference feature vector can be input into the vehicle charging feature identification system. Then, the vehicle charging feature identification system analyzes and processes the reference feature vector internally, that is, the reference feature vector is identified through the optimized model. Finally, the vehicle charging feature identification system outputs the category label corresponding to the reference feature vector, and the category label is used to determine the vehicle to which the charging feature belongs.
[0054] It can be seen that by identifying vehicle charging characteristics, charging data of different vehicles can be collected to analyze vehicle usage habits, charging demand distribution, etc., and provide data support for charging pile layout planning, power resource allocation, etc.
[0055] The following combination Figure 4 The electronic device in the embodiment of the present application is described. Figure 4 is a structural diagram of an electronic device provided in an embodiment of the present application, such as Figure 4 As shown, the electronic device includes one or more processors, a memory, a communication interface and one or more programs, and the processor is communicatively connected with the memory and the communication interface via an internal communication bus.
[0056] Among them, the processor is mainly used for:
[0057] Obtain N first eigenvectors corresponding to N vehicles; N is an integer greater than 1;
[0058] Assigning a label to each of the N first eigenvectors to obtain N first labels;
[0059] Performing dimensionality reduction processing on the N first eigenvectors to obtain N second eigenvectors;
[0060] Optimizing the first model according to the N second feature vectors and the N first labels to obtain a second model; the first model is used to identify vehicle charging characteristics;
[0061] Obtaining a reference feature vector corresponding to a preset first time period;
[0062] The reference feature vector is identified according to the second model to obtain an identification result; the identification result is used to determine whether the vehicle corresponding to the reference feature vector is any one of the N vehicles.
[0063] The one or more programs are stored in the above-mentioned memory and are configured to be executed by the above-mentioned processor, and the one or more programs include instructions for executing any step in the above-mentioned method embodiment.
[0064] Among them, the processor can be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It can implement or execute the various exemplary logic blocks, units and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication unit can be a communication interface, a transceiver, a transceiver circuit, etc., and the storage unit can be a memory.
[0065] The memory may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM).
[0066] It is understood that the electronic device may include more or fewer structural elements than those in the above structural block diagram, for example, including a power module, physical buttons, Wi-Fi module, speaker, Bluetooth module, sensor, display module, etc., which are not limited here. It is understood that the electronic device may be equipped with Figure 1 The system architecture described.
[0067] After understanding the software and hardware architecture of this application, Figure 5 A vehicle charging feature recognition method based on multi-source classification in an embodiment of the present application is described. Figure 5 This is a flow chart of a vehicle charging feature recognition method based on multi-source classification provided by an embodiment of the present application, which specifically includes the following steps:
[0068] Step S501: Obtain N first feature vectors corresponding to N vehicles.
[0069] For easier understanding, see Figure 6 , Figure 6 : This is a flow chart of obtaining a first feature vector provided by an embodiment of the present application, wherein N is an integer greater than 1, and each first feature vector corresponds to an external environment feature parameter set and an internal charging feature parameter set; the specific steps of obtaining N first feature vectors corresponding to N vehicles include:
[0070] A1. Obtaining a charging duration, voltage parameters, current parameters, battery temperature, and battery capacity of a first vehicle within a preset second time period; the first vehicle is any one of N vehicles; and the start time of the preset first time period is later than the end time of the preset second time period;
[0071] A2. Determine the service life of a first charging pile corresponding to the first vehicle;
[0072] A3. Obtaining environmental parameters corresponding to the preset second time period; the environmental parameters include ambient temperature, ambient humidity, and ambient pressure;
[0073] A4. Determine a first external environment characteristic parameter set based on the charging duration, the service life, and the environmental parameters;
[0074] A5. Determine a first internal charging characteristic parameter set based on the voltage parameter, the current parameter, the battery temperature, and the battery capacity;
[0075] A6. Determine a first feature vector corresponding to the first vehicle among the N first feature vectors based on the first external environment feature parameter set and the first internal charging feature parameter set.
[0076] In a specific embodiment, first, the charging duration, voltage parameters, current parameters, battery temperature, and battery capacity of the first vehicle within a preset second time period are obtained. The first vehicle is any one of the N vehicles, and the start time of the preset first time period is later than the end time of the preset second time period. The first charging pile corresponding to the first vehicle can be obtained, and the service life of the first charging pile can be determined based on the archival information and maintenance records of the first charging pile. The archival information can reflect the time when the first charging pile was put into use, and the maintenance records can reflect the actual usage status of the first charging pile. Based on historical maintenance data and industry experience, and in combination with the archival information and maintenance records of the first charging pile, the remaining usable time of the first charging pile, that is, the service life of the first charging pile, is estimated. Then, the environmental parameters corresponding to the preset second time period are obtained. The environmental parameters include but are not limited to ambient temperature, ambient humidity, and ambient air pressure, which are not specifically limited here.
[0077] Next, the charging duration, service life, and environmental parameters are sorted and combined to obtain a first external environment characteristic parameter set. The first external environment characteristic parameter set is as follows:
[0078] E={t charge ,L charger ,P env}
[0079] Wherein, E represents the first external environment characteristic parameter set; t charge Indicates charging duration; L charger Indicates the service life of the first charging pile; P env Represents environmental parameters, where P env ={T env ,H env ,p env}, T env Indicates ambient temperature; H env Indicates ambient humidity; p env Indicates the ambient air pressure.
[0080] The voltage parameter, current parameter, battery temperature and battery capacity are sorted and combined to obtain a first internal charging characteristic parameter set. The first internal charging characteristic parameter set is as follows:
[0081] I={V(t),I(t),T bat (t),C bat (t)}
[0082] Wherein, I represents the first internal charging characteristic parameter set; V(t) represents the voltage parameter at time t in the preset second time period; I(t) represents the current parameter at time t in the preset second time period; T bat (t) represents the battery temperature at time t within the preset second time period; Cbat (t) represents the battery capacity at time t within the preset second time period.
[0083] Finally, the first feature vector corresponding to the first vehicle in the N first feature vectors is determined based on the first external environment feature parameter set and the first internal charging feature parameter set. The first feature vector is as follows:
[0084] X=[E,I]
[0085] Where X represents the first eigenvector.
[0086] It can be seen that through the comprehensive collection and analysis of multi-dimensional charging characteristic data, the user's charging characteristics can be captured and identified more comprehensively, thereby providing strong support for intelligent charging management, resource optimization allocation and grid load scheduling.
[0087] Step S502 : assigning a label to each of the N first feature vectors to obtain N first labels.
[0088] Specifically, a first label can be assigned to each first eigenvector in the form of a number, or letters can be used to identify the labels of different first eigenvectors, which is not specifically limited here. For example, the first labels corresponding to different first eigenvectors are set to y∈{1,2,...,N}, and the first eigenvector X i The first label y corresponding to it i Form a sample pair (X i ,y i ). Among them, X i represents the i-th first eigenvector among N first eigenvectors, y i Indicates the i-th first label among N first labels.
[0089] It can be seen that by assigning corresponding first labels to the N first feature vectors, subsequent model training and vehicle charging feature recognition are facilitated.
[0090] Step S503: Perform dimensionality reduction processing on the N first eigenvectors to obtain N second eigenvectors.
[0091] The step of performing dimensionality reduction processing on the N first eigenvectors to obtain N second eigenvectors specifically includes:
[0092] B1. Calculate the similarity between any two first eigenvectors among the N first eigenvectors to obtain a first similarity matrix;
[0093] B2. Randomly initialize N coordinates in a preset low-dimensional space to obtain N first coordinates;
[0094] B3. Calculate the similarity between any two first coordinates of the N first coordinates to obtain a second similarity matrix;
[0095] B4. Determining a first objective function based on the first similarity matrix and the second similarity matrix; the first objective function is used to measure the difference between the first similarity matrix and the second similarity matrix;
[0096] B5. Determine the gradient corresponding to each of the N first coordinates according to the first objective function to obtain N first gradients;
[0097] B6. Iteratively updating the N first coordinates according to a preset first learning rate and the N first gradients to obtain N second coordinates;
[0098] B7. Calculate the similarity between any two second coordinates of the N second coordinates to obtain a third similarity matrix;
[0099] B8. Determine a second objective function based on the first similarity matrix and the third similarity matrix;
[0100] B9. If the function value corresponding to the second objective function is less than a preset threshold, the N second coordinates are used as the N second eigenvectors.
[0101] In a specific embodiment, first, the similarity between any two first eigenvectors among the N first eigenvectors is calculated according to a preset first similarity calculation formula, thereby obtaining a first similarity matrix. The first similarity calculation formula is as follows:
[0102]
[0103] Among them, p ij Represents X i With X j The similarity between them, that is, X i With X j The probability of being neighbors; x i represents the i-th first eigenvector among N first eigenvectors; X j represents the jth first eigenvector among the N first eigenvectors; ||X i -X j || 2 Represents X i With X j The square of the Euclidean distance between i Represents X i Corresponding bandwidth parameter; X k represents the kth first eigenvector among N first eigenvectors; ||X k -Xi || 2 Represents X k With Z i The square of the Euclidean distance between them.
[0104] Then, N coordinates are randomly initialized in a preset low-dimensional space to obtain N first coordinates. Wherein, the dimension of the low-dimensional space can be 2 or 3, and the first coordinate is a 2-dimensional vector or a 3-dimensional vector, which is not specifically limited here. Then, the similarity between any two first coordinates in the N first coordinates is calculated according to the preset second similarity calculation formula to obtain a second similarity matrix. Wherein, the second similarity calculation formula is as follows:
[0105]
[0106] Among them, q ij represents z i and z j The similarity between i represents the i-th first coordinate among N first coordinates; z j Indicates the jth first coordinate among N first coordinates; ||z i -z j || 2 represents z i and z j The square of the Euclidean distance between k Indicates the kth first coordinate among N first coordinates; ||z k -z i || 2 represents z k and z i The square of the Euclidean distance between them.
[0107] Next, a first objective function is determined based on the first similarity matrix and the second similarity matrix, where the first objective function is used to measure the difference between the first similarity matrix and the second similarity matrix. The first objective function is as follows:
[0108]
[0109] Wherein, KL(P||Q) represents the KL divergence between P and Q, that is, the degree of difference between P and Q; P represents the first similarity matrix; Q represents the second similarity matrix.
[0110] Determine the gradient corresponding to each of the N first coordinates according to the first objective function to obtain N first gradients. iThe first gradient of is. According to the preset first learning rate and N first gradients, the N first coordinates are iteratively updated according to the preset first update formula to obtain N second coordinates. The first update formula is as follows:
[0111]
[0112] in, Indicates the y obtained by the t+1th iteration update i ; Indicates the y obtained by the t-th iteration update i ; t represents the number of iterations; Indicates y in N first gradients i The corresponding first gradient; η represents the first learning rate.
[0113] Finally, the similarity between any two of the N second coordinates is calculated to obtain a third similarity matrix. The second objective function is determined based on the first similarity matrix and the third similarity matrix. If the function value corresponding to the second objective function is less than a preset threshold, it indicates that the second objective function has converged, and the N second coordinates are used as N second eigenvectors. If the function value corresponding to the second objective function is greater than or equal to the preset threshold, it indicates that the second objective function has not converged, and the N second coordinates are iteratively updated again until the second objective function converges, and the updated N second coordinates are used as N second eigenvectors.
[0114] Step S504: Optimize the first model according to the N second eigenvectors and the N first labels to obtain a second model.
[0115] The first model is used to identify vehicle charging characteristics, and the first model is optimized according to the N second feature vectors and the N first labels to obtain the second model. The specific steps include:
[0116] Determining a data set based on the N second feature vectors and the N first labels; dividing the data set into a training set and a validation set according to a preset ratio; randomly generating p first parameter combinations based on a preset parameter range; each first parameter combination includes a weight vector and a bias term; p is an integer greater than 1;
[0117] Perform the following steps G1-G8 on the p first parameter combinations:
[0118] G1. Initialize the first model according to the weight vector and the bias term in each of the p first parameter combinations to obtain p initial first models;
[0119] G2. Train the p initial first models according to the training set to obtain p reference first models;
[0120] G3. Determine an evaluation value corresponding to each of the p reference first models according to the validation set to obtain p evaluation values;
[0121] G4. Determine the reference first model corresponding to the maximum evaluation value among the p evaluation values as the target first model;
[0122] G5. Determine the first parameter combination corresponding to the target first model in the p first parameter combinations as the target first parameter combination;
[0123] G6. Update the p first parameter combinations according to the target first parameter combination to obtain p second parameter combinations;
[0124] G7. Repeat steps G1-G6 T times to obtain p third parameter combinations; T is an integer greater than 1;
[0125] G8. Execute steps G1-G4 once for the p third parameter combinations to obtain the second model.
[0126] In a specific embodiment, first, N second eigenvectors and N first labels are combined to obtain a data set. The data set is then divided into a training set and a validation set according to a preset ratio, wherein the training set is used to train the model and the validation set is used to evaluate the performance of the model to prevent overfitting. The preset ratio can be 8:2 or 7:3, which is not specifically limited here. P first parameter combinations are randomly generated within the preset parameter range, each first parameter combination including a weight vector and a bias term, and p is an integer greater than 1. The preset parameter range is the value range of the weight vector and the bias term.
[0127] Next, perform the following steps G1-G8 on the p first parameter combinations:
[0128] G1. Initialize the first model according to the weight vector and bias term in each of the p first parameter combinations to obtain p initial first models.
[0129] Specifically, the first model is initialized using the weight vector and bias term in each first parameter combination to obtain p initial first models, each of which corresponds to a first parameter combination. The initial first model is as follows:
[0130] f(x)=w T v(x)+b
[0131] Wherein, f(x) represents the initial first model; w represents the weight vector in the first parameter combination; b represents the bias term in the first parameter combination; φ(x) represents the kernel function mapping.
[0132] Among them, the optimization problem of the initial first model can be expressed as:
[0133]
[0134] Where L(w,b) represents the loss function; ||w|| 2 represents the sum of the squares of the components of the weight vector w; C represents the regularization parameter, which is used to control the complexity of the model and the misclassification penalty; f(X i ) represents the initial first model pair X i The predicted value of y i Represents X i The corresponding first label.
[0135] G2. Train the p initial first models according to the training set to obtain p reference first models.
[0136] Specifically, the training set is used to train the p initial first models respectively to obtain p reference first models, so that each reference first model learns the relationship between the feature vector and the label.
[0137] G3. Determine an evaluation value corresponding to each of the p reference first models according to the validation set to obtain p evaluation values.
[0138] Specifically, determining the evaluation value corresponding to each of the p reference first models according to the validation set to obtain p evaluation values specifically comprises the following steps:
[0139] C1. Predict the validation set according to each of the p reference first models to obtain p predicted label sets;
[0140] C2. Obtain the first label set corresponding to each of the p predicted label sets in the validation set to obtain p first label sets;
[0141] C3. Determine p verification results based on the p predicted label sets and the p first label sets; each verification result includes a predicted label set and a first label set;
[0142] C4. Calculate the precision and recall corresponding to each of the p verification results to obtain p precisions and p recalls;
[0143] C5. Determine the p evaluation values according to the p precision rates and the p recall rates; each evaluation value corresponds to a precision rate and a recall rate.
[0144] In a specific embodiment, the validation set data is first input into each reference first model for prediction, resulting in p predicted label sets. The corresponding first label set in the validation set is then obtained for each of the p predicted label sets, resulting in p first label sets. Based on the p predicted label sets and the p first label sets, p validation results are determined, each of which contains the label predicted by the model and the actual label of the sample.
[0145] Next, the precision corresponding to each verification result is calculated according to the preset precision calculation formula to obtain p precision rates. The precision rate represents the proportion of samples correctly marked as positive by the classifier to all samples marked as positive. The precision calculation formula is as follows:
[0146]
[0147] Among them, precision refers to the accuracy rate; TP refers to true positive examples, that is, the number of samples that the model predicts to be positive in the verification results and are actually positive; FP refers to false positive examples, that is, the number of samples that the model predicts to be positive in the verification results but are actually negative.
[0148] The recall rate corresponding to each verification result is calculated according to the preset recall rate calculation formula, and p recall rates are obtained. Among them, the recall rate represents the proportion of samples correctly marked as positive by the classifier to all samples that are actually positive. The recall rate calculation formula is as follows:
[0149]
[0150] Among them, recall represents the recall rate; FN represents false negative examples, that is, the number of samples in the verification results that the model predicts as negative but is actually positive.
[0151] Finally, the p precision rates and p recall rates are calculated according to the preset evaluation value calculation formula to obtain p evaluation values, each of which corresponds to a precision rate and a recall rate. The evaluation value calculation formula is as follows:
[0152]
[0153] Here, F1 represents one evaluation value among p evaluation values.
[0154] It can be seen that by verifying the performance of the model, we can understand the accuracy of each model's predictions, its ability to capture positive samples, etc., which makes it convenient to compare the advantages and disadvantages of different models and select the model with the best performance for practical application based on the evaluation value.
[0155] G4. Determine the reference first model corresponding to the maximum evaluation value among the p evaluation values as the target first model.
[0156] Specifically, the maximum evaluation value is found from the p evaluation values, and the reference first model corresponding to the maximum evaluation value is used as the target first model.
[0157] G5. Determine the first parameter combination corresponding to the target first model in the p first parameter combinations as the target first parameter combination.
[0158] Specifically, a first parameter combination corresponding to the target first model is obtained from the p first parameter combinations and used as the target first parameter combination. The target first parameter combination is a first parameter combination that optimizes the model performance among the current p first parameter combinations.
[0159] G6. Update the p first parameter combinations according to the target first parameter combination to obtain p second parameter combinations.
[0160] Specifically, the updating of the p first parameter combinations according to the target first parameter combination to obtain p second parameter combinations comprises the following steps:
[0161] Perform the following steps on the p first parameter combinations:
[0162] Calculating a difference between a current first parameter combination and the target first parameter combination to obtain a first difference value; the current first parameter combination is the first parameter combination being updated among the p first parameter combinations;
[0163] Obtaining a preset second learning rate, a dynamic adjustment factor, and a random control parameter; the dynamic adjustment factor is used to adjust the update step size; the random control parameter is used to control the randomness of the update;
[0164] Multiplying the first difference value, the second learning rate, and the dynamic adjustment factor to obtain a first update amount;
[0165] Calculating a difference between a random parameter combination and the target first parameter combination to obtain a second difference value; the random parameter combination is any one of the p first parameter combinations;
[0166] Multiplying the second difference value, the random control parameter, and the dynamic adjustment factor to obtain a second update amount;
[0167] A second parameter combination corresponding to the current first parameter combination in the p second parameter combinations is determined according to the first update amount and the second update amount.
[0168] In a specific embodiment, first, a difference between the current first parameter combination and the target first parameter combination is calculated to obtain a first difference value, where the current first parameter combination is the first parameter combination being updated among the p first parameter combinations. Then, a preset second learning rate, a dynamic adjustment factor, and a random control parameter are obtained, where the dynamic adjustment factor is used to adjust the update step size. The first difference value, the second learning rate, and the dynamic adjustment factor are multiplied to obtain a first update amount.
[0169] Next, the difference between the random parameter combination and the target first parameter combination is calculated to obtain a second difference value, where the random parameter combination is any one of the p first parameter combinations. The second difference value, the random control parameter, and the dynamic adjustment factor are multiplied to obtain a second update amount.
[0170] Finally, the first update amount and the second update amount are calculated according to a preset second update formula to obtain the second parameter combination corresponding to the current first parameter combination among the p second parameter combinations. The second update formula is as follows:
[0171] X i (t+1)=X i (t)+α·(1+sin(r))·(X best -X i (t))+β·(1+sin(r))·(X rand -X i (t))
[0172] Among them, X i (t+1) represents the second parameter combination corresponding to the current first parameter combination; t represents the number of iterations; X i (t) represents the current first parameter combination; α represents the second learning rate; (1+sin(r)) represents the dynamic adjustment factor, the value range of sin(r) is [-1,1], then the value range of (1+sin(r)) is [0,2], and r is a random number; (X best -X i (t)) represents the first difference value; X best represents the target first parameter combination; β represents the random control parameter; (X rand -X i (t) represents the second difference value; X rand represents a random parameter combination.
[0173] It can be seen that by continuously iterating and updating the parameter combination, it is possible to search in the parameter space and gradually find the parameter combination that optimizes the model performance, which facilitates the subsequent identification of vehicle charging characteristics.
[0174] G7. Repeat steps G1-G6 T times to obtain p third parameter combinations; T is an integer greater than 1.
[0175] Specifically, steps G1-G6 are repeated T times, further optimizing the parameter combination through multiple iterations to obtain p third parameter combinations, where T is an integer greater than 1. In each iteration, the model is trained and evaluated based on different parameter combinations. By comparing the corresponding evaluation values, the model is gradually adjusted toward the optimal parameters. T represents the preset maximum number of iterations, which can be set based on the data scale and actual needs and is not specifically limited here.
[0176] G8. Execute steps G1-G4 once for the p third parameter combinations to obtain the second model.
[0177] Specifically, steps G1-G4 are performed again for the p third parameter combinations, that is, a model with the best performance is selected from multiple models trained based on different third parameter combinations as the second model.
[0178] It can be seen that by optimizing the model, the model can focus more on the relationship between the feature vector and the label, thereby improving the accuracy of vehicle charging feature recognition and helping the model maintain good performance in different practical application scenarios.
[0179] Step S505: Obtain a reference feature vector corresponding to a preset first time period.
[0180] Specifically, a reference feature vector corresponding to a preset first time period is obtained, where the reference feature vector represents charging feature data of a vehicle within the preset first time period, such as information in multiple dimensions such as charging power, duration, and battery temperature.
[0181] Step S506: Identify the reference feature vector according to the second model to obtain a recognition result.
[0182] For easier understanding, see Figure 7 , Figure 7 : is a schematic diagram of a process for identifying a reference feature vector provided by an embodiment of the present application, wherein the recognition result is used to determine whether the vehicle corresponding to the reference feature vector is any one of the N vehicles. The reference feature vector is identified according to the second model to obtain the recognition result. The specific steps include:
[0183] D1. Identify the reference feature vector according to the second model to obtain a reference label;
[0184] D2. If the reference label is positive, the vehicle corresponding to the reference feature vector is any one of the N vehicles as the recognition result;
[0185] D3. If the reference label is negative, the vehicle corresponding to the reference feature vector is not any of the N vehicles as the recognition result.
[0186] In a specific embodiment, first, the reference feature vector is input into the second model. The second model analyzes and processes the reference feature vector based on the patterns and rules learned in the previous training process, and outputs a reference label, which can be -1 or 1. The second model is shown below:
[0187]
[0188] in, Represents the reference label, that is, the second model pair X i The recognition result of X i represents the reference eigenvector; w j ′ represents the weight vector of the second model; b ′ represents the bias term of the second model; y j represents the jth first label among N first labels; K(X i ,X j ) represents the kernel function of the second model, which is used to calculate the similarity between the reference eigenvector and the j-th second eigenvector.
[0189] If the reference label is positive, that is, the reference label is 1, then the recognition result is that the vehicle corresponding to the reference feature vector is any one of the N vehicles. If the reference label is negative, that is, the reference label is -1, then the recognition result is that the vehicle corresponding to the reference feature vector is not any one of the N vehicles.
[0190] It can be seen that by identifying the reference feature vector through the second model to obtain the reference label, and determining the identification result based on the reference label, the accuracy and reliability of vehicle charging feature identification are improved, and the possibility of errors and misjudgments is reduced.
[0191] The above mainly introduces the solution of the embodiment of the present application from the perspective of the execution process of the method side. It is understandable that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0192] The embodiment of the present application can divide the functional units of the electronic device according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0193] In the case of dividing each functional module into corresponding functional modules, Figure 8 This is a functional module block diagram of a vehicle charging feature recognition device based on multi-source classification provided in an embodiment of the present application. The vehicle charging feature recognition device based on multi-source classification 800 includes a first acquisition module 810, an allocation module 820, a dimensionality reduction module 830, an optimization module 840, a second acquisition module 850, and an identification module 860, wherein:
[0194] The first acquisition module 810 is used to obtain N first feature vectors corresponding to N vehicles; N is an integer greater than 1;
[0195] The assigning module 820 is configured to assign a label to each of the N first feature vectors to obtain N first labels;
[0196] The dimensionality reduction module 830 is configured to perform dimensionality reduction processing on the N first eigenvectors to obtain N second eigenvectors;
[0197] The optimization module 840 is configured to optimize the first model based on the N second feature vectors and the N first labels to obtain a second model; the first model is configured to identify vehicle charging characteristics;
[0198] The second acquisition module 850 is used to obtain a reference feature vector corresponding to a preset first time period;
[0199] The identification module 860 is used to identify the reference feature vector according to the second model to obtain an identification result; the identification result is used to determine whether the vehicle corresponding to the reference feature vector is any one of the N vehicles.
[0200] Optionally, each first feature vector corresponds to an external environment feature parameter set and an internal charging feature parameter set; in terms of obtaining N first feature vectors corresponding to N vehicles, the first obtaining module 810 is specifically configured to:
[0201] Obtaining a charging duration, voltage parameters, current parameters, battery temperature, and battery capacity of a first vehicle within a preset second time period; the first vehicle is any one of N vehicles; and the start time of the preset first time period is later than the end time of the preset second time period;
[0202] Determining the service life of a first charging pile corresponding to the first vehicle;
[0203] Acquire environmental parameters corresponding to the preset second time period; the environmental parameters include ambient temperature, ambient humidity, and ambient pressure;
[0204] determining a first external environment characteristic parameter set according to the charging duration, the service life, and the environmental parameters;
[0205] determining a first internal charging characteristic parameter set according to the voltage parameter, the current parameter, the battery temperature, and the battery capacity;
[0206] A first feature vector corresponding to the first vehicle among the N first feature vectors is determined according to the first external environment feature parameter set and the first internal charging feature parameter set.
[0207] Optionally, in performing dimensionality reduction processing on the N first eigenvectors to obtain N second eigenvectors, the dimensionality reduction module 830 is specifically configured to:
[0208] Calculating the similarity between any two first eigenvectors among the N first eigenvectors to obtain a first similarity matrix;
[0209] Randomly initialize N coordinates in a preset low-dimensional space to obtain N first coordinates;
[0210] Calculating the similarity between any two first coordinates of the N first coordinates to obtain a second similarity matrix;
[0211] Determining a first objective function according to the first similarity matrix and the second similarity matrix; the first objective function is used to measure the difference between the first similarity matrix and the second similarity matrix;
[0212] determining a gradient corresponding to each of the N first coordinates according to the first objective function to obtain N first gradients;
[0213] Iteratively updating the N first coordinates according to a preset first learning rate and the N first gradients to obtain N second coordinates;
[0214] Calculating the similarity between any two second coordinates of the N second coordinates to obtain a third similarity matrix;
[0215] determining a second objective function according to the first similarity matrix and the third similarity matrix;
[0216] If the function value corresponding to the second objective function is less than a preset threshold, the N second coordinates are used as the N second eigenvectors.
[0217] Optionally, in optimizing the first model according to the N second feature vectors and the N first labels to obtain the second model, the optimization module 840 is specifically configured to:
[0218] Determine a data set according to the N second eigenvectors and the N first labels;
[0219] Dividing the data set into a training set and a validation set according to a preset ratio;
[0220] Randomly generate p first parameter combinations according to a preset parameter range; each first parameter combination includes a weight vector and a bias term; p is an integer greater than 1;
[0221] Perform the following steps G1-G8 on the p first parameter combinations:
[0222] G1. Initialize the first model according to the weight vector and the bias term in each of the p first parameter combinations to obtain p initial first models;
[0223] G2. Train the p initial first models according to the training set to obtain p reference first models;
[0224] G3. Determine an evaluation value corresponding to each of the p reference first models according to the validation set to obtain p evaluation values;
[0225] G4. Determine the reference first model corresponding to the maximum evaluation value among the p evaluation values as the target first model;
[0226] G5. Determine the first parameter combination corresponding to the target first model in the p first parameter combinations as the target first parameter combination;
[0227] G6. Update the p first parameter combinations according to the target first parameter combination to obtain p second parameter combinations;
[0228] G7. Repeat steps G1-G6 T times to obtain p third parameter combinations; T is an integer greater than 1;
[0229] G8. Execute steps G1-G4 once for the p third parameter combinations to obtain the second model.
[0230] Optionally, in determining the evaluation value corresponding to each of the p reference first models according to the validation set to obtain the p evaluation values, the optimization module 840 is further specifically configured to:
[0231] Predicting the validation set according to each of the p reference first models to obtain p predicted label sets;
[0232] Obtain the first label set corresponding to each of the p predicted label sets in the validation set to obtain p first label sets;
[0233] Determine p verification results based on the p predicted label sets and the p first label sets; each verification result includes a predicted label set and a first label set;
[0234] Calculate the precision and recall corresponding to each of the p verification results to obtain p precisions and p recalls;
[0235] The p evaluation values are determined according to the p precision rates and the p recall rates; each evaluation value corresponds to a precision rate and a recall rate.
[0236] Optionally, in the aspect of updating the p first parameter combinations according to the target first parameter combination to obtain p second parameter combinations, the optimization module 840 is further specifically configured to:
[0237] Perform the following steps on the p first parameter combinations:
[0238] Calculating a difference between a current first parameter combination and the target first parameter combination to obtain a first difference value; the current first parameter combination is the first parameter combination being updated among the p first parameter combinations;
[0239] Obtaining a preset second learning rate, a dynamic adjustment factor, and a random control parameter; the dynamic adjustment factor is used to adjust the update step size; the random control parameter is used to control the randomness of the update;
[0240] Multiplying the first difference value, the second learning rate, and the dynamic adjustment factor to obtain a first update amount;
[0241] Calculating a difference between a random parameter combination and the target first parameter combination to obtain a second difference value; the random parameter combination is any one of the p first parameter combinations;
[0242] Multiplying the second difference value, the random control parameter, and the dynamic adjustment factor to obtain a second update amount;
[0243] A second parameter combination corresponding to the current first parameter combination in the p second parameter combinations is determined according to the first update amount and the second update amount.
[0244] Optionally, in the aspect of identifying the reference feature vector according to the second model to obtain the identification result, the identification module 860 is specifically configured to:
[0245] Identify the reference feature vector according to the second model to obtain a reference label;
[0246] If the reference label is positive, the vehicle corresponding to the reference feature vector is any one of the N vehicles as the recognition result;
[0247] If the reference label is negative, the vehicle corresponding to the reference feature vector is not any of the N vehicles as the recognition result.
[0248] It can be seen that by reducing the dimensionality of the feature vectors of different vehicles and performing model optimization, the model can better learn the patterns and differences of the charging characteristics of different vehicles, thereby improving the accuracy of identifying vehicle charging characteristics.
[0249] It should be noted that the specific implementation of each operation can adopt the corresponding description of the method embodiment shown above. The vehicle charging feature recognition device 800 based on multi-source classification can be used to execute the above method embodiment of this application, which will not be repeated here.
[0250] An embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any method described in the above method embodiments, and the above computer includes an electronic device.
[0251] The present application also provides a computer program product comprising a non-transitory computer-readable storage medium storing a computer program, wherein the computer program is operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments. The computer program product may be a software installation package, and the computer may comprise an electronic device.
[0252] It should be noted that, for the above-mentioned various embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. Those skilled in the art should know that this application is not limited by the order of the actions described, because some steps in the embodiments of the present application can be performed in other orders or simultaneously. In addition, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions, steps, modules or units involved are not necessarily required by the embodiments of the present application.
[0253] In the above embodiments, the embodiments of the present application have different focuses on the description of each embodiment. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0254] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0255] The steps of the method or algorithm described in the embodiments of the present application can be implemented in hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium can be located in an ASIC. In addition, the ASIC can be located in a terminal device or a management device. Of course, the processor and storage medium can also be present in a terminal device or a management device as discrete components.
[0256] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital video disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0257] The modules / units included in the devices and products described in the above embodiments may be software modules / units, hardware modules / units, or partly software modules / units and partly hardware modules / units. For example, for the devices and products applied to or integrated in the chip, the modules / units included therein may all be implemented in the form of hardware such as circuits, or at least part of the modules / units may be implemented in the form of software programs, which run on the processor integrated inside the chip, and the remaining (if any) modules / units may be implemented in the form of hardware such as circuits; for the devices and products applied to or integrated in the chip module, the modules / units included therein may all be implemented in the form of hardware such as circuits, and different modules / units may be located in the same component (such as chip, circuit module, etc.) or different components of the chip module, or at least part of the modules / units may be It is implemented in the form of a software program, which runs on the processor integrated inside the chip module, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits; for various devices and products applied to or integrated in the terminal equipment, the various modules / units contained therein can be implemented in the form of hardware such as circuits, and different modules / units can be located in the same component (for example, chip, circuit module, etc.) or different components in the terminal equipment, or, at least some modules / units can be implemented in the form of a software program, which runs on the processor integrated inside the terminal equipment, and the remaining (if any) modules / units can be implemented in the form of hardware such as circuits.
[0258] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the embodiments of the present application. It should be understood that the above description is only a specific implementation method of the embodiments of the present application and is not intended to limit the scope of protection of the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the embodiments of the present application should be included in the scope of protection of the embodiments of the present application.
Claims
1. A vehicle charging feature recognition method based on multi-source classification, characterized in that: The method comprises: Obtain N first eigenvectors corresponding to N vehicles; N is an integer greater than 1; Assigning a label to each of the N first eigenvectors to obtain N first labels; Performing dimensionality reduction processing on the N first eigenvectors to obtain N second eigenvectors; Optimizing the first model according to the N second feature vectors and the N first labels to obtain a second model; the first model is used to identify vehicle charging characteristics; Obtaining a reference feature vector corresponding to a preset first time period; The reference feature vector is identified according to the second model to obtain an identification result; the identification result is used to determine whether the vehicle corresponding to the reference feature vector is any one of the N vehicles.
2. The method according to claim 1, wherein Each first feature vector corresponds to an external environment feature parameter set and an internal charging feature parameter set; obtaining N first feature vectors corresponding to N vehicles includes: Obtaining a charging duration, voltage parameters, current parameters, battery temperature, and battery capacity of a first vehicle within a preset second time period; the first vehicle is any one of N vehicles; and the start time of the preset first time period is later than the end time of the preset second time period; Determining the service life of a first charging pile corresponding to the first vehicle; Acquire environmental parameters corresponding to the preset second time period; the environmental parameters include ambient temperature, ambient humidity, and ambient pressure; determining a first external environment characteristic parameter set according to the charging duration, the service life, and the environmental parameters; determining a first internal charging characteristic parameter set according to the voltage parameter, the current parameter, the battery temperature, and the battery capacity; A first feature vector corresponding to the first vehicle among the N first feature vectors is determined according to the first external environment feature parameter set and the first internal charging feature parameter set.
3. The method according to claim 1, wherein The performing dimensionality reduction processing on the N first eigenvectors to obtain N second eigenvectors includes: Calculating the similarity between any two first eigenvectors among the N first eigenvectors to obtain a first similarity matrix; Randomly initialize N coordinates in a preset low-dimensional space to obtain N first coordinates; Calculating the similarity between any two first coordinates of the N first coordinates to obtain a second similarity matrix; Determining a first objective function according to the first similarity matrix and the second similarity matrix; the first objective function is used to measure the difference between the first similarity matrix and the second similarity matrix; determining a gradient corresponding to each of the N first coordinates according to the first objective function to obtain N first gradients; Iteratively updating the N first coordinates according to a preset first learning rate and the N first gradients to obtain N second coordinates; Calculating the similarity between any two second coordinates of the N second coordinates to obtain a third similarity matrix; determining a second objective function according to the first similarity matrix and the third similarity matrix; If the function value corresponding to the second objective function is less than a preset threshold, the N second coordinates are used as the N second eigenvectors.
4. The method according to claim 1, wherein Optimizing the first model according to the N second eigenvectors and the N first labels to obtain the second model includes: Determine a data set according to the N second eigenvectors and the N first labels; Dividing the data set into a training set and a validation set according to a preset ratio; Randomly generate p first parameter combinations according to a preset parameter range; each first parameter combination includes a weight vector and a bias term; p is an integer greater than 1; Perform the following steps G1-G8 on the p first parameter combinations: G1. Initialize the first model according to the weight vector and the bias term in each of the p first parameter combinations to obtain p initial first models; G2. Train the p initial first models according to the training set to obtain p reference first models; G3. Determine an evaluation value corresponding to each of the p reference first models according to the validation set to obtain p evaluation values; G4. Determine the reference first model corresponding to the maximum evaluation value among the p evaluation values as the target first model; G5. Determine the first parameter combination corresponding to the target first model among the p first parameter combinations as the target first parameter combination; G6. Update the p first parameter combinations according to the target first parameter combination to obtain p second parameter combinations; G7. Repeat steps G1-G6 T times to obtain p third parameter combinations; T is an integer greater than 1; G8. Execute steps G1-G4 once for the p third parameter combinations to obtain the second model.
5. The method according to claim 4, wherein The step of determining an evaluation value corresponding to each of the p reference first models according to the validation set to obtain p evaluation values includes: Predicting the validation set according to each of the p reference first models to obtain p predicted label sets; Obtain the first label set corresponding to each of the p predicted label sets in the validation set to obtain p first label sets; Determine p verification results based on the p predicted label sets and the p first label sets; each verification result includes a predicted label set and a first label set; Calculate the precision and recall corresponding to each of the p verification results to obtain p precisions and p recalls; The p evaluation values are determined according to the p precision rates and the p recall rates; each evaluation value corresponds to a precision rate and a recall rate.
6. The method according to claim 4, wherein The updating of the p first parameter combinations according to the target first parameter combination to obtain p second parameter combinations includes: Perform the following steps on the p first parameter combinations: Calculating a difference between a current first parameter combination and the target first parameter combination to obtain a first difference value; the current first parameter combination is the first parameter combination being updated among the p first parameter combinations; Obtaining a preset second learning rate, a dynamic adjustment factor, and a random control parameter; the dynamic adjustment factor is used to adjust the update step size; the random control parameter is used to control the randomness of the update; Multiplying the first difference value, the second learning rate, and the dynamic adjustment factor to obtain a first update amount; Calculating a difference between a random parameter combination and the target first parameter combination to obtain a second difference value; the random parameter combination is any one of the p first parameter combinations; Multiplying the second difference value, the random control parameter, and the dynamic adjustment factor to obtain a second update amount; A second parameter combination corresponding to the current first parameter combination in the p second parameter combinations is determined according to the first update amount and the second update amount.
7. The method according to any one of claims 1 to 6, wherein: The identifying the reference feature vector according to the second model to obtain an identification result includes: Identify the reference feature vector according to the second model to obtain a reference label; If the reference label is positive, the vehicle corresponding to the reference feature vector is any one of the N vehicles as the recognition result; If the reference label is negative, the vehicle corresponding to the reference feature vector is not any of the N vehicles as the recognition result.
8. A vehicle charging feature recognition device based on multi-source classification, characterized in that: The device includes a first acquisition module, an allocation module, a dimensionality reduction module, an optimization module, a second acquisition module, and an identification module, wherein: The first acquisition module is used to obtain N first feature vectors corresponding to N vehicles; N is an integer greater than 1; The assigning module is configured to assign a label to each of the N first feature vectors to obtain N first labels; The dimensionality reduction module is used to perform dimensionality reduction processing on the N first eigenvectors to obtain N second eigenvectors; The optimization module is configured to optimize the first model according to the N second feature vectors and the N first labels to obtain a second model; the first model is configured to identify vehicle charging characteristics; The second acquisition module is used to obtain a reference feature vector corresponding to a preset first time period; The recognition module is used to recognize the reference feature vector according to the second model to obtain a recognition result; the recognition result is used to determine whether the vehicle corresponding to the reference feature vector is any one of the N vehicles.
9. An electronic device, characterized in that: include: a processor, a memory, a communication interface, and one or more programs; The one or more programs are stored in the memory and configured to be executed by the processor, wherein the programs include instructions for executing the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.