Battery swapping recommendation method and system based on multi-objective deep learning
Through multi-objective deep learning, integrating user, battery and electric cabinet features, and using expert network and gated network optimization models, the problems of low user matching and insufficient resource utilization in the battery swap cabinet system are solved, accurate electric cabinet and battery recommendations are achieved, and the efficiency and quality of battery swap services are improved.
Patent Information
- Application Number
- CN202510006882.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-01-03
AI Technical Summary
The existing battery swap cabinet system cannot fully meet the rider's personalized needs. The battery recommendation method has low user matching and insufficient resource utilization. Traditional methods such as random distribution or simple rule allocation cannot accurately match the rider's needs.
The battery swap recommendation method based on multi-objective deep learning is adopted. By integrating user, battery and electric cabinet characteristics, the expert network and gated network are used to generate accurate battery swap recommendations, and combined with cross entropy loss and uncertainty weight optimization model, the comprehensive recommendations of electric cabinet and battery are achieved.
It improves the user matching and resource utilization rate of battery swap recommendations, reduces costs and production pressure, enhances the balance of supply and demand relationships, meets the personalized needs of riders, and improves the efficiency and quality of battery swap services.
Smart Images

Figure CN119397107B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine learning, and particularly to a battery swapping recommendation method, system, computer device, and computer-readable storage medium based on multi-objective deep learning. Background Art
[0002] With the acceleration of urbanization and the rapid development of e-commerce, electric bicycles have become an indispensable means of transportation in industries such as express delivery and food delivery. To ensure the continuous and efficient operation of the distribution services in these industries, a fast and convenient battery swapping service is particularly important.
[0003] Traditional battery swapping methods rely on manual operations at fixed stations, which are not only inefficient but also difficult to meet the growing service demands. In recent years, intelligent battery swapping cabinets, as a new type of infrastructure, have gradually become popular, allowing riders to swap batteries by themselves, greatly improving convenience and efficiency. However, existing battery swapping cabinet systems still have certain limitations in battery management and distribution, and cannot fully meet the personalized needs of riders. At the same time, due to factors such as the battery placement time and usage environment, there are performance differences between batteries. In addition, the limited number of batteries cannot guarantee that each user can obtain the battery with the best performance. Summary of the Invention
[0004] Embodiments of this application provide a battery swapping recommendation method, system, computer device, and computer-readable storage medium based on multi-objective deep learning to at least solve the problem of low user matching degree in the related art battery swapping recommendation methods.
[0005] In a first aspect, embodiments of this application provide a battery swapping recommendation method based on multi-objective deep learning, implemented based on an improved ESMM model. The method includes:
[0006] Integrate multi-dimensional original features into shared underlying features, where the multi-dimensional original features include: user features, battery features, and cabinet features;
[0007] Based on the shared underlying features, through an expert network, learn feature representations related to different types of specific tasks respectively, obtain multi-dimensional feature learning results, and perform weighted fusion on the multi-dimensional feature learning results;
[0008] Through a task tower, make a prediction based on the weighted combination result to obtain a battery swapping recommendation result that matches the user's habits.
[0009] In some embodiments, integrating the multi-dimensional original features into a unified feature representation through a feature processing layer includes:
[0010] Receive the multi-dimensional original features through an input layer;
[0011] Through multiple multi - layer perceptrons, the original features in each dimension are respectively transformed into high - dimensional feature representations;
[0012] Integrate the multi - dimensional high - dimensional feature representations to obtain the shared underlying features.
[0013] In some embodiments, the expert network includes multiple expert layers with shared structures but independently trained. Each expert layer is used to focus on learning the feature representations related to a specific task;
[0014] Generate the weight parameters corresponding to each expert layer through a gating network. According to the weight parameters, weight - fuse all the feature representations to obtain the multi - dimensional feature learning result.
[0015] In some embodiments, through the expert network, learn the feature representations related to different types of specific tasks respectively. The multi - dimensional feature learning result includes:
[0016] Through the first fully - connected layer, perform a linear transformation on the shared underlying features, and use an activation function to map the shared underlying features to a new feature space to obtain the latent features corresponding to the specific task;
[0017] Through the second fully - connected layer, perform a linear transformation and activation on the latent features to strengthen the feature patterns related to the specific task, and output the feature learning result.
[0018] In some embodiments, the weighted fusion of the multi - dimensional feature learning results includes:
[0019] Through the gating network, obtain the feature learning results output by each expert layer, and respectively process the feature learning results through a fully - connected layer. And, convert the results output by the fully - connected layer into the gating signals corresponding to each expert layer through the Softmax function;
[0020] According to the gating signals, perform a weighted combination on the feature learning results output by each expert layer to obtain the multi - dimensional feature learning result.
[0021] In some embodiments, the task tower includes a first task tower and a second task tower. Among them, the first task tower is used for the electric cabinet recommendation task to output a first prediction value, and the second task tower is used for the battery recommendation task to output a second prediction value;
[0022] By combining the first prediction value and the second prediction value, obtain a comprehensive index for reflecting the performance in the battery - electric cabinet recommendation task.
[0023] In some of these embodiments, the cross-entropy loss is used to supervise the prediction results of the task, and the improved ESMM model is optimized and trained with the goal of minimizing the cross-entropy between the predicted values and the true values of the electrical cabinet recommendation task and the battery recommendation task. Among them, the loss functions of the first task tower and the second task tower are represented by the following formula:
[0024]
[0025] Among them, represents the loss function of the task related to the electrical cabinet, represents the loss function of the task related to the battery, H represents the cross-entropy function, is used to calculate the cross-entropy loss between the predicted value and the true value L1, is used to calculate the cross-entropy loss between the predicted value and the true label distribution, represents the i-th training sample, N represents the number of training samples, , respectively represent the predicted values of the electrical cabinet recommendation task and the battery recommendation task, and L1, L2 represent the true values of the electrical cabinet recommendation task and the battery recommendation task.
[0026] In some of these embodiments, the method further includes: calculating the uncertainty and precision of the electrical cabinet recommendation task and the battery recommendation task respectively;
[0027] During the process of optimizing and training the improved ESMM model, the uncertainty and the precision are incorporated into the overall loss function of the model to dynamically allocate the weights of the tasks related to the electrical cabinet features and the tasks related to the battery features. Among them, the overall function is represented by the following formula:
[0028]
[0029] Among them, L is the overall loss function, are the precisions corresponding to the tasks related to the electrical cabinet features and the tasks related to the battery features respectively, are the uncertainties corresponding to the tasks related to the electrical cabinet features and the tasks related to the battery features respectively.
[0030] In a second aspect, an embodiment of the present application provides a battery swapping recommendation system based on multi-objective deep learning, which is characterized in that it includes: The system includes: an input module, a feature processing module, and a recommendation module, where:
[0031] The input module is configured to integrate multi-dimensional original features into shared underlying features, where the multi-dimensional original features include: user features, battery features, and cabinet features;
[0032] The feature processing module is configured to, based on the shared underlying features, through an expert network, respectively learn feature representations related to different types of specific tasks to obtain multi-dimensional feature learning results, and perform weighted fusion on the multi-dimensional feature learning results;
[0033] The recommendation module is configured to, through a task tower, make a prediction based on the result of the weighted combination to obtain a battery replacement recommendation result that matches the user's habits.
[0034] In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the method described in the first aspect above is implemented.
[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect above is implemented.
[0036] The battery replacement recommendation method provided by the embodiment of the present application, compared with the method of simply making battery replacement recommendations based on battery power and fixed rules in the traditional technology, the solution of the present application makes full use of multi-dimensional basic information such as the basic attributes of the battery, relevant data of the battery replacement cabinet, personal information of the rider, and the interaction records between the rider and the battery. Through a multi-objective recommendation system based on deep learning, potential variables in these data are deeply mined, and these basic information and the mined implicit variables are integrated into the recommendation system model to output in real time the battery replacement cabinet and battery suggestions that best meet the rider's needs. It solves the problems of low user matching degree and low resource utilization rate in the related technology of battery replacement recommendation methods, not only reducing costs and production pressure, but also promoting the balance of supply and demand relationships; in addition, including rider-battery interaction information and deep learning implicit variable information, fully exploring the association between the rider and the battery. Since this model mines the rider's habitual battery replacement data information and generates recommendation information in combination with the rider's personal habits and preferences, it can also more comprehensively meet the rider's needs and further relieve the pressure on the high-quality battery supply side. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation of the present application. In the drawings:
[0038] Figure 1It is a flowchart of a battery swapping recommendation method based on multi-objective deep learning according to an embodiment of the present application;
[0039] Figure 2 It is an architecture diagram of an improved ESMM model according to an embodiment of the present application;
[0040] Figure 3 It is a structural block diagram of a battery swapping recommendation system based on multi-objective deep learning according to an embodiment of the present application;
[0041] Figure 4 It is an internal structure schematic diagram of an electronic device according to an embodiment of the present application. Specific embodiments
[0042] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be described and explained below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments provided in the present application without creative efforts fall within the scope of protection of the present application.
[0043] Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, the present application can be applied to other similar scenarios based on these drawings without creative efforts. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacturing or production changes based on the technical content disclosed in the present application are only conventional technical means and should not be understood as the content disclosed in the present application being insufficient.
[0044] Referring to "embodiments" in the present application means that specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those of ordinary skill in the art explicitly and implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.
[0045] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the ordinary meanings understood by those with ordinary skills in the technical field to which this application belongs. The words such as "a", "an", "one", "the" and the like involved in this application do not indicate a limitation in quantity and may represent a singular or plural number. The terms "comprise", "include", "have" and any variations thereof involved in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may further include unlisted steps or units, or may further include other steps or units inherent to these processes, methods, products or devices. The words such as "connect", "be connected", "couple" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the front and back associated objects. The terms "first", "second", "third" and the like involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.
[0046] With the acceleration of the urbanization process and the rapid development of e-commerce, electric bicycles have become an indispensable means of transportation in industries such as express delivery and food delivery. In order to ensure the continuous and efficient operation of the distribution services in these industries, a fast and convenient battery replacement service is particularly important. The traditional battery replacement method relies on manual operation at fixed stations, which is not only inefficient but also difficult to meet the growing service demand. In recent years, intelligent battery swapping cabinets, as a new type of infrastructure, have gradually become popular, allowing riders to replace batteries by themselves, greatly improving convenience and efficiency. However, there are still certain limitations in the battery management and distribution of existing battery swapping cabinet systems, and they cannot fully meet the personalized needs of riders. Due to different factors such as the battery placement time and usage environment, there are performance differences between batteries. In addition, the limited number of batteries also cannot guarantee that each user can obtain the battery with the best performance.
[0047] In the prior art, battery recommendation methods usually adopt a random distribution strategy or rely on simple rules to achieve, for example:
[0048] 1. The system randomly selects a battery with the highest power from the battery swapping cabinet for recommendation
[0049] Most of the current battery swapping facilities on the market adopt a random distribution strategy, that is, randomly select a fully charged battery from the existing ones for users. Although this approach is simple and fast, it fails to take into account the unique needs of each rider. For example, riders performing long-distance delivery tasks are more suitable for using high-capacity batteries, while for those who frequently make short-distance deliveries, carrying lighter batteries may be more ideal. In addition, there are differences in the performance of batteries from different brands or models, which makes the random allocation method more likely to result in a mismatch between supply and demand.
[0050] 2. Fixed rule allocation
[0051] Some improved systems optimize the battery allocation process by introducing basic rules, such as preferentially selecting the battery with the most remaining power, or determining the priority based on the number of times the battery has been used. Although such methods can improve the user experience to a certain extent, they still lack sufficient flexibility to adapt to diverse actual needs. Especially when serving a large number of users, it is difficult to fully meet various different demand scenarios relying on a single rule.
[0052] In practical applications, battery recommendation is a relatively complex issue. It is unreasonable to rely solely on the battery's power or capacity to determine whether it is suitable for a certain rider, and it is also impossible to achieve efficient utilization of resources. Therefore, in the operation of the battery swapping system, a multi-factor comprehensive consideration strategy model needs to be established to better meet the personalized needs of riders and provide accurate support for battery swapping requirements.
[0053] In view of this, the embodiments of the present application provide a battery swapping recommendation method based on multi-objective deep learning. Figure 1 It is a flowchart of a battery swapping recommendation method based on multi-objective deep learning according to the embodiments of the present application, as Figure 1 shown, and this process includes the following steps:
[0054] S101, integrate multi-dimensional original features into shared underlying features, where the multi-dimensional original features include: user features, battery features, and cabinet features;
[0055] Specifically, this step includes the following sub-steps:
[0056] Step1, receive multi-dimensional original features through the input layer;
[0057] Among them, the original features include: user features, battery features, and cabinet features;
[0058] It can be understood that user features reflect the past behavior patterns of riders, which can be but are not limited to trip length, energy consumption, and recharge cycle, etc.; further, battery features include but are not limited to battery capacity, remaining power, and battery type-related information; cabinet features can be cabinet location and distribution information, device internal resource information, and device status information, where the device status information includes: operating status, fault status, and maintenance records, etc.
[0059] Step2, through multiple multi-layer perceptrons, convert the original features of each dimension into high-dimensional feature representations respectively;
[0060] Figure 2 is the architecture diagram of the improved ESMM model according to the embodiments of the present application, as Figure 2 shown, user features, battery features, and cabinet features are respectively fed into the shared layer (share Bottom) as the original inputs. The shared layer includes multiple multi-layer perceptrons (abbreviated as MLP). Each MLP processes the input features through its internal structure, converting the original features into higher-level abstract representations for the subsequent deep learning model to understand.
[0061] Specifically, an MLP is composed of multiple neurons, including an input layer, a hidden layer, and an output layer. After receiving the original feature data in the input layer, the data undergoes a series of linear transformations and operations of non-linear activation functions (such as ReLU, etc.) in the hidden layer.
[0062] Among them, the original features often have characteristics such as high dimensionality, sparsity, and complexity, which are not conducive to the model directly mining useful information from them. In this embodiment, the conversion of the original features into higher-level abstract representations enables the subsequent deep learning model to better understand the data. The abstract representation after being processed by the MLP reduces the complexity of the data, highlights the key information, and at the same time, is more suitable for processing by the deep learning model.
[0063] For example, in subsequent components such as the shared layer and the expert network, the model can more efficiently learn the complex relationships between users, batteries, and cabinets based on these abstract features, thereby more accurately performing cabinet recommendation (CTR) and battery recommendation (CVR) tasks.
[0064] Step3, integrate the various multi-dimensional high-dimensional feature representations to obtain the shared bottom-layer features.
[0065] It can be understood that the multi-dimensional high-dimensional feature representations obtained after being processed by each MLP are integrated together. This process combines the high-dimensional feature vectors of the three dimensions of users, batteries, and cabinets into a unified feature representation, that is, the shared bottom-layer features.
[0066] In this embodiment, the shared underlying features can comprehensively reflect the complex relationships among users, batteries, and cabinets. For example, it may include relationship information between the rider's demand for a certain battery performance on a specific delivery route and the possibility of nearby cabinets providing such a battery. This shared underlying feature will serve as the input to the expert network in the subsequent deep learning model, providing a unified and rich information basis for the entire battery swapping recommendation system, enabling the system to perform more accurate cabinet recommendation (CTR) and battery recommendation (CVR) tasks based on this.
[0067] S102. Based on the shared underlying features, through the expert network, respectively learn the feature representations related to different types of specific tasks to obtain multi-dimensional feature learning results;
[0068] As Figure 2 shown, the expert network (Expert) includes multiple expert layers with shared structures but independently trained. Each expert layer is used to focus on learning the feature representations related to a specific task;
[0069] When the "basic feature representation" after being processed by the multi-layer perceptron (MLP) is generated from the shared underlying layer, it will be distributed to multiple expert layers. Each expert layer focuses on learning the feature representations related to specific tasks and conducts in-depth analysis and processing according to the specific types of features it is responsible for.
[0070] For example, the first expert layer focuses on processing features related to battery performance, such as battery capacity, remaining power, charging speed, etc.; the second expert layer focuses on analyzing user behavior features, such as trip length, energy consumption, recharge cycle, and historical battery swapping habits, etc.; the third expert layer will conduct feature mining and analysis for cabinet-related features, such as cabinet location, the number and distribution of batteries in the cabinet, etc.
[0071] It can be understood that in this embodiment, by having different expert layers respectively focus on learning different task features, this kind of specialized division of labor enables the system to comprehensively understand and mine the key information in the data from different perspectives, providing a rich and targeted feature basis for accurate recommendation.
[0072] In an exemplary embodiment, the specific processing flow of a certain expert layer includes the following steps:
[0073] Step1. The expert layer receives the "shared underlying features" from the shared underlying layer. These features have been pre-processed and integrated into a unified form, containing preliminary abstracted information in multiple aspects such as user features, battery features, and cabinet features.
[0074] Step 1: Through the first fully connected layer, perform a linear transformation on the shared underlying features, and use an activation function to map the shared underlying features to a new feature space, obtaining potential features corresponding to a specific task.
[0075] The input features enter the first fully connected layer of the expert network. Each neuron in this fully connected layer is connected to the neurons in the shared underlying layer. By performing a linear transformation on the input features and applying an activation function (such as ReLU, etc.) to introduce non-linearity, the input shared underlying features are mapped to a new feature space, realizing the preliminary exploration of potential feature patterns related to the specific type of features responsible for this expert network.
[0076] Step 2: Through the second fully connected layer, perform a linear transformation and activation on the features mapped to the new feature space, strengthening the feature patterns related to the specific task, and outputting the feature learning result.
[0077] It can be understood that the features processed by the first fully connected layer are further used as the input of the second fully connected layer. The second fully connected layer continues to perform similar linear transformation and activation operations on the features, further strengthening and refining the feature patterns related to the specific task, making the feature representation more accurately reflect the information related to the specific task, and completing deeper feature extraction.
[0078] After the deep processing of two fully connected layers, each expert layer network outputs a feature representation of a fixed dimension. Those skilled in the art know that this feature representation is a highly refined and abstracted view of the input shared underlying features from the perspective of a specific task.
[0079] Step 3: Through the gating network, obtain the feature learning results output by each expert network, and respectively process the feature learning results through the fully connected layer. Moreover, convert the results output by the fully connected layer into gating signals corresponding to each expert network through the Softmax function, where the gating signals are used to indicate how to weight the output results of each expert layer.
[0080] Among them, the role of the gating network is to determine how the output of each expert layer should affect the final prediction result. Specifically, in this embodiment, two gating layers (Gate1 and Gate2) are set. The gating layers will generate a series of gating signals (such as G_11, G_12,..., G_24), and these signals indicate how the output of the expert layer should be weighted and combined, so that when generating prediction tasks such as cabinet recommendation (CTR) and battery recommendation (CVR), key information from different aspects extracted by each expert network can be comprehensively considered.
[0081] For example, if an expert network performs well in processing user behavior characteristics, and the feature representation it outputs is of great value in reflecting the personalized needs of users for batteries and battery cabinets, then the gating network may assign a higher weight to it, so that the final recommendation result is more inclined to meet the specific needs of this user.
[0082] It can be understood that through the gating mechanism, the output of the expert network and the gating network work together, providing a solid foundation for the system to generate accurate and personalized battery replacement recommendations, ensuring that the recommendation results can best meet the actual needs of riders and improving the efficiency and quality of the entire battery replacement service.
[0083] Specifically, the gating network first processes the feature representation of the input expert network through a fully connected layer. Further, the result after being processed by the fully connected layer is input into the Softmax function. The Softmax function will convert these values into the weights corresponding to each expert network, and the sum of all weights is 1. These weights reflect the relative importance of the output of each expert network in the final prediction result.
[0084] Step4, according to the gating signal, perform weighted combination on the feature learning results output by each expert layer to obtain multi-dimensional feature learning results.
[0085] According to the generated weights, the gating network performs weighted combination on the outputs of each expert layer to obtain a comprehensive feature representation. This comprehensive feature representation integrates the key information extracted by each expert network from different perspectives, and reflects the difference in the importance of different information in the current task according to the weight distribution.
[0086] Through the above step S102, multiple expert networks are used to respectively focus on processing specific feature learning, converting the shared features into accurate abstract features corresponding to different types of learning tasks, providing a rich information basis for the system. On this basis, the gating network is used to assign weights to the outputs of each expert network to highlight the contributions of important features. The two cooperate to enable the system to accurately grasp the relationship between users, batteries and battery cabinets, accurately analyze the relationship between users, batteries and battery cabinets, realize accurate recommendations of battery cabinets and batteries, effectively improve the distribution efficiency, enhance customer satisfaction, and ensure the efficient and reliable operation of the battery replacement recommendation system.
[0087] S103, perform prediction based on the weighted combination result of the multi-dimensional feature learning results to obtain a prediction result for recommending battery replacement.
[0088] It should be noted that the task tower in this embodiment includes the first task tower Tower1 and the second task tower Tower2; the weighted combination results output by the gating network are respectively input into Task Tower1 and Task Tower2.
[0089] Among them, Task Tower1 focuses on predicting the electric cabinet recommendation task (CTR), and Task Tower2 conducts the battery recommendation task (CVR) prediction; the first prediction result and the second prediction result are respectively input, and the first prediction result and the second prediction result are then integrated by multiplication to form a comprehensive index CVCTR.
[0090] Specifically, in this deep learning network architecture, both the CTR and CVR tasks have their own independent task-specific output layers. The construction of the output layer includes two fully connected layers. The first fully connected layer performs preliminary feature transformation and integration on the input data, further processes the feature information passed in after weighted combination by the expert layer, and extracts more task-relevant feature representations. The second fully connected layer performs more in-depth calculations and mappings on this basis. The last layer uses the Sigmoid activation function, whose characteristic is that it can convert any real number input into a probability value between 0 and 1, thereby generating the final prediction value.
[0091] The prediction results of the two task towers are organically combined through a multiplication operation to generate a comprehensive index CVCTR, which comprehensively reflects the overall performance of the model in the electric cabinet battery recommendation task. It should be noted that this comprehensive index is not just a simple combination of results, but overall considers the synergy and comprehensive matching degree between the electric cabinet recommendation and the battery recommendation, providing a key and effective quantitative basis for comprehensively and accurately evaluating the actual effectiveness of the model in the multi-objective recommendation task.
[0092] In addition, it should also be noted that in this embodiment, during the model training process, the cross-entropy loss is used to supervise the prediction results of the task towers, and the goal is to minimize the error between the predicted values and the true values of the electric cabinet recommendation task and the battery recommendation task to train and improve the ESMM model. Among them, the loss functions of the first task tower and the second task tower are represented by the following formulas:
[0093]
[0094] Among them, represents the loss function of the task related to the electric cabinet, represents the loss function of the task related to the battery, H represents the cross-entropy function, is used to calculate the cross-entropy loss between the predicted value and the true value L1, is used to calculate the cross-entropy loss between the predicted value and the true label distribution, represents the i-th training sample, and N represents the number of training samples. , respectively represent the predicted values of the electrical cabinet recommendation task and the battery recommendation task, and L1 and L2 represent the true values of the electrical cabinet recommendation task and the battery recommendation task.
[0095] It should be noted that cross-entropy is a measure used to measure the difference between two probability distributions. In the process of training the model in the solution of this application, by minimizing the cross-entropy loss between the predicted value and the true value, the model parameters are continuously adjusted to make the prediction result closer to the real situation.
[0096] In addition, in a multi-objective recommendation system, when optimizing the electrical cabinet recommendation (CTR) and battery recommendation (CVR) tasks simultaneously, there may be a negative transfer situation where the performance of one task improves while the performance of the other task deteriorates, making it difficult to balance both ends like a seesaw.
[0097] Considering the above problems, the technical solution of this application introduces the calculation of uncertain weights loss. By comprehensively considering the uncertainty (variance) and accuracy of the tasks, the weights of each task in the total loss are adjusted. When the uncertainty of a task is high (large variance, low accuracy), its weight in the total loss will be adjusted accordingly, so that the model will not overly favor the optimization of this task, thereby avoiding damaging the performance of another task due to over-optimizing one task, and effectively alleviating the negative transfer and seesaw phenomena.
[0098] Specifically, first, the uncertainty is defined. For the 1st and 2nd tasks, their uncertainties are calculated respectively. Taking the i-th task as an example, its uncertainty is obtained by taking the logarithm of the variance of this task, and is calculated by the following formula:
[0099]
[0100] where is the uncertainty of the i-th task, is the variance of the task;
[0101] Furthermore, based on this uncertainty, the accuracy is calculated. For the i-th task, its accuracy is the reciprocal of the exponent of the uncertainty , and can be specifically calculated by the following formula:
[0102]
[0103] where represents the accuracy of the i-th task.
[0104] Finally, the overall loss L of the model is obtained by adding the losses of the two tasks and the terms related to uncertainty, and can be specifically expressed by the following formula:
[0105]
[0106] The overall loss function of the model set in the above manner is composed of the loss functions of the CTR and CVR tasks. Among them, the cross-entropy loss function significantly penalizes the model for incorrect predictions. When the predicted probability differs greatly from the true value, the loss value increases rapidly, prompting the model to avoid incorrect predictions. At the same time, its gradient characteristics during the optimization process are conducive to the rapid convergence of the model and can effectively guide the update of model parameters.
[0107] Furthermore, in a multi-task environment, rationally combining the loss functions of CTR and CVR based on uncertainty can balance the relationship between the cabinet recommendation and battery recommendation tasks, avoiding the "seesaw" phenomenon where only one task is focused on, resulting in a decline in the performance of the other task. By integrating the loss functions of the two tasks, the performance of the model in cabinet and battery recommendations can be comprehensively evaluated, enabling the model to provide a more accurate recommendation solution.
[0108] How to select the most suitable battery for an individual's driving habits from adjacent battery swapping stations to enhance delivery efficiency and customer satisfaction. Currently, there are various battery options on the market, which differ in specifications, capacities, and production batches. The previous approach was usually to let users randomly select a fully charged battery for replacement. However, this method often ignores the specific preferences of individual users, resulting in insufficient resource allocation.
[0109] Through the above steps S101 to S103, the solution of the present application makes full use of multi-dimensional basic information such as the basic attributes of the battery, relevant data of the battery swapping cabinet, personal information of the rider, and the interaction records between the rider and the battery. Through a multi-objective recommendation system based on deep learning, the latent variables in these data are deeply mined, and these basic information and the mined latent variables are integrated into the recommendation system model to real-time output the battery swapping cabinet and battery suggestions that best meet the rider's needs. It solves the problems of low user matching degree and low resource utilization rate in the related art of battery swapping recommendation methods, not only reducing costs and production pressure and promoting the balance of supply and demand relationships; in addition, including rider-battery interaction information and latent variable information of deep learning, fully exploring the relationship between the rider and the battery. Since this model mines the rider's habitual battery swapping data information and generates recommendation information in combination with the rider's personal habits and preferences, it can also more comprehensively meet the rider's needs and further relieve the pressure on the high-quality battery supply side.
[0110] In a second aspect, the embodiment of the present application also provides a battery swapping recommendation system based on multi-objective deep learning, Figure 3 which is a structural block diagram of a battery swapping recommendation system based on multi-objective deep learning according to the embodiment of the present application, as Figure 3As shown in the figure, the system includes: an input module 30, a feature processing module 31, and a recommendation module 32, where:
[0111] The input module 30 is configured to integrate multi-dimensional original features into shared underlying features, where the multi-dimensional original features include: user features, battery features, and cabinet features;
[0112] Among them, the user features reflect the past behavior patterns of riders, which can be but are not limited to trip length, energy consumption, and recharge cycle, etc.; further, the battery features include but are not limited to battery capacity, remaining power, and battery type-related information; the cabinet features can be cabinet location and distribution information, device internal resource information, and device status information, where the device status information includes: operating status, fault status, and maintenance records, etc.
[0113] In this embodiment, the shared underlying features can comprehensively reflect the complex relationships among users, batteries, and cabinets. For example, it can include the relationship information between the rider's demand for a certain battery performance on a specific delivery route and the possibility of the nearby cabinet providing that battery. This shared underlying feature will be used as the input of the expert network in the subsequent deep learning model, providing a unified and rich information basis for the entire battery replacement recommendation system, enabling the system to perform more accurate cabinet recommendation (CTR) and battery recommendation (CVR) tasks based on this.
[0114] The feature processing module 31 is configured to, based on the shared underlying features, through the expert network, respectively learn the feature representations related to different types of specific tasks, obtain multi-dimensional feature learning results, and perform weighted fusion on the multi-dimensional feature learning results;
[0115] This module uses multiple expert networks to respectively focus on processing specific feature learning, transforming the shared features into accurate abstract features corresponding to different types of learning tasks, providing a rich information basis for the system. On this basis, a gating network is used to assign weights to the outputs of each expert network to highlight the contributions of important features. The two cooperate to enable the system to accurately grasp the relationships among users, batteries, and cabinets, accurately analyze the relationships among users, batteries, and cabinets, realize accurate recommendations for cabinets and batteries, effectively improve the delivery efficiency, enhance customer satisfaction, and ensure the high-efficiency and reliable operation of the battery replacement recommendation system.
[0116] The recommendation module 32 is configured to, through the task tower, make predictions based on the weighted combination result to obtain a battery replacement recommendation result that matches the user's habits.
[0117] It should be noted that the task tower in this embodiment includes a first task tower Tower1 and a second task tower Tower2; the weighted combination results output by the gating network are respectively input into Task Tower1 and Task Tower2. Among them, Task Tower1 focuses on predicting the cabinet recommendation task (CTR), and Task Tower2 conducts the battery recommendation task (CVR) prediction; the first prediction result and the second prediction result are respectively input into them, and the first prediction result and the second prediction result are then integrated by multiplication to form a comprehensive index CVCTR;
[0118] This index comprehensively reflects the overall performance of the model in the cabinet-battery recommendation task. It should be noted that this comprehensive index is not just a simple combination of results, but overall considers the synergistic effect and comprehensive matching degree between cabinet recommendation and battery recommendation, providing a key and effective quantitative basis for comprehensively and accurately evaluating the actual effectiveness of the model in the multi-objective recommendation task.
[0119] Through the above system, multi-dimensional basic information such as the basic attributes of the battery, relevant data of the battery swapping cabinet, personal information of the rider, and the interaction records between the rider and the battery are utilized. Through a multi-objective recommendation system based on deep learning, potential variables in these data are deeply mined, and these basic information and the mined hidden variables are integrated into the recommendation system model to output in real time the battery swapping cabinet and battery suggestions that best meet the rider's needs. It solves the problems of low user matching degree and low resource utilization rate in the related technology of battery swapping recommendation method, not only reducing costs and production pressure, but also promoting the balance of supply and demand relationship.
[0120] In one embodiment, Figure 4 is a schematic internal structure diagram of an electronic device according to an embodiment of the present application, as Figure 4 shown, provides an electronic device, which may be a server, and its internal structure diagram may be as Figure 4 shown. The electronic device includes a processor, a network interface, an internal memory, and a non-volatile memory connected through an internal bus. Among them, the non-volatile memory stores an operating system, a computer program, and a database. The processor is used to provide computing and control capabilities, the network interface is used to communicate with external terminals through a network connection, the internal memory is used to provide an environment for the operation of the operating system, the computer program is executed by the processor to implement a battery swapping recommendation method for multi-objective deep learning, and the database is used to store data.
[0121] Those skilled in the art can understand, Figure 4The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0122] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in this application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0123] The above embodiments only represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of the patent of this application should be subject to the appended claims.
Claims
1. A battery replacement recommendation method based on multi-objective deep learning, characterized in that: Based on the improved ESMM model, the method includes: Use multi-layer perceptron to convert multi-dimensional original features into high-dimensional feature representation; Integrate each high-dimensional feature representation into a shared underlying feature, wherein the multi-dimensional original feature includes: user features, battery features and cabinet features, the cabinet features include cabinet location and distribution information, resource information in the device, and device status information, wherein the device status information includes: operating status, fault status and maintenance record; Based on the shared underlying features, feature representations related to different types of specific tasks are learned through an expert network to obtain feature learning results of multiple different dimensions, and the multi-dimensional feature learning results are weighted and fused; Through the task tower, prediction is made based on the weighted combined results to obtain a battery replacement recommendation result that matches the user's habits; The task tower includes a first task tower and a second task tower, wherein the first task tower focuses on predicting recommended tasks for electric cabinets, and the second task tower predicts recommended tasks for batteries; The first task tower and the second task tower have their own independent task-specific output layers, and the output layer includes two fully connected layers. The first fully connected layer performs preliminary feature transformation and integration on the input data, further processes the feature information passed in after weighted merging by the expert layer, and extracts the feature representation of task relevance; the second fully connected layer performs more in-depth calculation and mapping based on the feature representation; and uses Sigmoid activation function processing to generate the final prediction value; In the model training process, the cross entropy loss is used to supervise the prediction results of the task tower, and the ESMM model is trained and improved with the goal of minimizing the error between the predicted value and the true value of the cabinet recommendation task and the battery recommendation task; The expert network includes a plurality of expert layers that are shared in structure but trained independently, and each expert layer is used to focus on learning feature representations related to a specific task; Generate weight parameters corresponding to each expert layer through a gating network, and perform weighted fusion of all feature representations according to the weight parameters to obtain a weighted fusion result of the feature learning results of the multiple different dimensions; Through the expert network, feature representations related to different types of specific tasks are learned respectively, and the multi-dimensional feature learning results are obtained, including: Through the first fully connected layer, the shared underlying features are linearly transformed, and the shared underlying features are mapped to a new feature space using an activation function to obtain potential features corresponding to the specific task; Through the second fully connected layer, the latent features are linearly transformed and activated, the feature patterns related to the specific task are strengthened, and the feature learning results are output; The weighted fusion of the multi-dimensional feature learning results includes: Obtain feature learning results output by each expert layer through a gating network, process the feature learning results respectively through a fully connected layer, and convert the results output by the fully connected layer into gating signals corresponding to each expert layer through a Softmax function; According to the gating signal, the feature learning results output by each expert layer are weighted and combined to obtain a weighted fusion result of the feature learning results of the multiple different dimensions.
2. The method according to claim 1, characterized in that Integrating multi-dimensional original features into a unified feature representation includes: Receiving the multi-dimensional original features through an input layer; Through multiple multi-layer perceptrons, the original features of each dimension are converted into high-dimensional feature representations; The multi-dimensional high-dimensional feature representations are integrated to obtain the shared underlying features.
3. The method according to claim 1, characterized in that The first task tower is used for cabinet recommendation tasks to output a first prediction value, and the second task tower is used for battery recommendation tasks to output a second prediction value; By combining the first prediction value and the second prediction value, a comprehensive indicator reflecting the performance on the battery cabinet recommendation task is obtained.
4. The method according to claim 1, characterized in that: in, The loss function of the first task tower and the second task tower is expressed by the following formula: in, represents the loss function of the cabinet-related tasks, represents the loss function of battery-related tasks, H represents the cross entropy function, To calculate the predicted value and the cross entropy loss between the true value L1, To calculate the predicted value and the cross entropy loss between the true label distribution, represents the i-th training sample, N represents the number of training samples, , They represent the predicted values of the power cabinet recommendation task and the battery recommendation task respectively, and L1 and L2 represent the true values of the power cabinet recommendation task and the battery recommendation task respectively.
5. The method according to claim 3, characterized in that: The method further comprises: Calculating the uncertainty and accuracy of the electric cabinet recommended task and the battery recommended task respectively; In the process of optimizing and training the improved ESMM model, the uncertainty and the accuracy are incorporated into the overall loss function of the model to dynamically allocate the weights of the cabinet feature-related tasks and the battery feature-related tasks, wherein the overall function is expressed by the following formula: Among them, L is the overall loss function, are the accuracies corresponding to the cabinet feature-related tasks and the battery feature-related tasks, They are the uncertainties corresponding to the tasks related to the electrical cabinet characteristics and the tasks related to the battery characteristics.
6. A battery replacement recommendation system based on multi-objective deep learning, characterized in that: include: The system comprises: an input module, a feature processing module and a recommendation module, wherein: The input module is used to convert the multi-dimensional original features into high-dimensional feature representations using a multi-layer perceptron; and integrate the various high-dimensional feature representations into shared underlying features, wherein the multi-dimensional original features include: user features, battery features and electrical cabinet features, and the electrical cabinet features include electrical cabinet location and distribution information, resource information in the device, and device status information, wherein the device status information includes: operating status, fault status and maintenance records; The feature processing module is used to learn feature representations related to different types of specific tasks through an expert network based on the shared underlying features, obtain feature learning results of multiple different dimensions, and perform weighted fusion on the feature learning results of the multiple dimensions; The recommendation module is used to make predictions based on the weighted combination results through the task tower to obtain a battery replacement recommendation result that matches the user's habits; The task tower includes a first task tower and a second task tower, wherein the first task tower focuses on predicting recommended tasks for electric cabinets, and the second task tower predicts recommended tasks for batteries; The first task tower and the second task tower have their own independent task-specific output layers, and the output layer includes two fully connected layers. The first fully connected layer performs preliminary feature transformation and integration on the input data, further processes the feature information passed in after weighted merging by the expert layer, and extracts the feature representation of task relevance; the second fully connected layer performs more in-depth calculation and mapping based on the feature representation; and uses Sigmoid activation function processing to generate the final prediction value; In the model training process, the cross entropy loss is used to supervise the prediction results of the task tower, and the ESMM model is trained and improved with the goal of minimizing the error between the predicted value and the true value of the cabinet recommendation task and the battery recommendation task; The expert network includes a plurality of expert layers that are shared in structure but trained independently, and each expert layer is used to focus on learning feature representations related to a specific task; Generate weight parameters corresponding to each expert layer through a gating network, and perform weighted fusion of all feature representations according to the weight parameters to obtain a weighted fusion result of the feature learning results of the multiple different dimensions; Through the expert network, feature representations related to different types of specific tasks are learned respectively, and the multi-dimensional feature learning results are obtained, including: Through the first fully connected layer, the shared underlying features are linearly transformed, and the shared underlying features are mapped to a new feature space using an activation function to obtain potential features corresponding to the specific task; Through the second fully connected layer, the latent features are linearly transformed and activated, the feature patterns related to the specific task are strengthened, and the feature learning results are output; The weighted fusion of the multi-dimensional feature learning results includes: Obtain feature learning results output by each expert layer through a gating network, process the feature learning results respectively through a fully connected layer, and convert the results output by the fully connected layer into gating signals corresponding to each expert layer through a Softmax function; According to the gating signal, the feature learning results output by each expert layer are weighted and combined to obtain a weighted fusion result of the feature learning results of the multiple different dimensions.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Behavior prediction method and device and related product
CN113821720A
Analysis method, system and equipment based on shared battery data and storage medium
CN118917566A