Method and device for generating resource recommendation parameters, storage medium, and vehicle
Patent Information
- Application Number
- CN202611087217.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-27
AI Technical Summary
该类方法虽然实现较为简单,但难以准确反映不同用户在续航、价格、等待时间和绕路成本等方面的差异化关注重点,导致推荐结果与用户真实需求之间存在偏差,从而影响资源推荐的准确性
[0009]通过本申请,由于通过构建综合车辆实时状态、资源动态信息及历史行为的多维决策上下文,并量化生成反映用户对筛选条件重视程度的偏好特征向量,实现了从静态规则推荐向动态个性化推荐的转变;能够根据用户在不同维度上的差异化敏感度,自适应地生成精准的资源推荐参数。因此,可以解决相关技术中资源推荐的准确性较低的技术问题,达到提高了资源推荐的准确性的技术效果。
Smart Images

Figure CN122986170A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for generating resource recommendation parameters, a storage medium, and a vehicle. Background Technology
[0002] Existing vehicle-mounted vehicle (V2V) systems often employ static rules or simple sorting methods when recommending vehicle resources (e.g., charging stations) and related services. For example, they prioritize recommending the nearest station or displaying information based on a single price factor. While these methods are relatively simple to implement, they fail to accurately reflect the differentiated concerns of different users regarding range, price, waiting time, and detour costs. This leads to a discrepancy between the recommended results and the actual needs of users, thus affecting the accuracy of resource recommendations. Summary of the Invention
[0003] This application provides a method and apparatus for generating resource recommendation parameters, a storage medium, and a vehicle, to at least solve the technical problem of low accuracy in resource recommendations in related technologies.
[0004] According to one aspect of the embodiments of this application, a method for generating resource recommendation parameters is provided, comprising: constructing a current decision context, wherein the current decision context is used to represent a comprehensive feature of a target vehicle's real-time vehicle status, resource dynamic information, and historical behavior information of a target object; generating a preference feature vector of the target object, wherein the preference feature vector is used to quantify the degree of importance the target object attaches to preset resource screening conditions; and generating resource recommendation parameters based on the current decision context and the preference feature vector, wherein the resource recommendation parameters are used to recommend target resources serving the target vehicle to the target object.
[0005] According to another aspect of the embodiments of this application, a resource recommendation parameter generation apparatus is also provided, comprising: a first construction module, configured to construct a current decision context, wherein the current decision context is used to represent a comprehensive feature of the real-time vehicle status of a target vehicle, resource dynamic information, and historical behavior information of a target object; a first generation module, configured to generate a preference feature vector of the target object, wherein the preference feature vector is used to quantify the degree of importance the target object attaches to preset resource screening conditions; and a second generation module, configured to generate resource recommendation parameters based on the current decision context and the preference feature vector, wherein the resource recommendation parameters are used to recommend target resources serving the target vehicle to the target object.
[0006] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed by a processor.
[0007] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in any of the method embodiments described above.
[0008] According to another aspect of the embodiments of this application, a vehicle is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to perform the steps of any of the above method embodiments through the computer program.
[0009] This application achieves a shift from static rule-based recommendation to dynamic personalized recommendation by constructing a multi-dimensional decision context that integrates real-time vehicle status, dynamic resource information, and historical behavior, and by quantifying and generating preference feature vectors that reflect the user's emphasis on selection criteria. It can adaptively generate accurate resource recommendation parameters based on the user's differentiated sensitivity across different dimensions. Therefore, it solves the technical problem of low accuracy in resource recommendation in related technologies, thus improving the accuracy of resource recommendation. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of the structure of a network system according to an embodiment of this application;
[0011] Figure 2 This is a flowchart illustrating a method for generating resource recommendation parameters according to an embodiment of this application;
[0012] Figure 3 This is a flowchart of the electric vehicle intelligent recommendation strategy generation method based on user behavior preferences and state awareness in this optional example;
[0013] Figure 4 This is a structural block diagram of a resource recommendation parameter generation device according to an embodiment of this application;
[0014] Figure 5 A schematic block diagram of a computer system architecture for implementing embodiments of the present application is shown. Detailed Implementation
[0015] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0016] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0017] According to one aspect of the embodiments of this application, a method for generating resource recommendation parameters is provided. Optionally, in this embodiment, the above-described method for generating resource recommendation parameters may be applied, but is not limited to, to applications such as... Figure 1 The hardware environment shown includes terminal device 102 and server 104. Server 104 can be connected to terminal device 102 via a network and can be used to provide services (e.g., application services, etc.) to terminal device 102 or clients installed on terminal device 102. A database can be set up on server 104 or independently of server 104 to provide data storage services for server 104.
[0018] The aforementioned network may include, but is not limited to, at least one of the following: wired network and wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network (WAN), metropolitan area network (MAN), and local area network (LAN). The aforementioned wireless network may include, but is not limited to, at least one of the following: Wireless Fidelity (WIFI) and Bluetooth. Terminal device 102 may be, but is not limited to, a personal computer (PC), mobile phone, tablet computer, etc. Server 104 may be, but is not limited to, a cloud server, server cluster, or other server types.
[0019] The method for generating resource recommendation parameters in this application embodiment can be executed by server 104, by terminal device 102, or by both server 104 and terminal device 102. The data query method of this application embodiment executed by terminal device 102 can also be executed by a client installed on it.
[0020] Taking the method for generating resource recommendation parameters in this embodiment, executed by server 104, as an example, Figure 2 This is a flowchart illustrating an optional method for generating resource recommendation parameters according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps:
[0021] Step S202: Construct the current decision context, wherein the current decision context is used to represent the comprehensive characteristics of the target vehicle's real-time vehicle status, resource dynamic information, and the target object's historical behavior information;
[0022] The resource recommendation parameters generated in this embodiment can be applied to the fields of intelligent charging services for electric vehicles and new energy interaction. They are particularly suitable for scenarios involving dynamic environments with multiple factors (such as real-time electricity prices, queue times, road congestion, and vehicle range) where precise resource matching and intelligent recommendation guidance are based on users' personalized behavioral preferences. For example, when a user urgently needs to charge while driving, the system no longer simply recommends the nearest charging station. Instead, it combines the user's current remaining battery power and sensitivity to price or waiting time to calculate and recommend a charging station that is optimal in terms of detour costs, charging fees, and waiting time. It also generates personalized messaging (such as the station's current electricity price being 15% lower than the average price and no queue required), thereby helping the user quickly make a decision that maximizes their interests.
[0023] Optionally, in this embodiment, the current decision context refers to the set of all relevant information collected by the system at a specific timestamp t in order to make an optimal resource recommendation decision. It is a multi-dimensional feature vector or data structure designed to comprehensively describe the overall state of the vehicle and the environment.
[0024] The context can consist of the following three sub-modules: real-time vehicle status, dynamic resource information, and historical behavior information of the target object.
[0025] The vehicle's implementation status includes: the target vehicle's current State of Charge (SOC), i.e., the percentage of the target vehicle's current battery charge; the vehicle's current remaining range estimated based on the current SOC, driving style, and weather; the vehicle's current location latitude and longitude information; and the user-set navigation destination (used to calculate detour costs).
[0026] The dynamic information of the resources includes: a set of candidate resources within a preset search radius; and the attributes of each candidate resource site, including: operating status (idle, occupied, faulty, offline), estimated queuing time (based on historical data or real-time occupancy rate prediction), real-time time-of-use electricity price (peak, flat, and valley period electricity price), surrounding road congestion index, and supporting facilities (such as whether there are rest rooms, toilets, and restaurants).
[0027] The target audience's historical behavior includes: historical charging station preferences (brand, distance, price range), user behavior patterns at different time periods (weekdays / weekends, daytime / nighttime), and historical clicks, rejections, or conversions in response to recommendation strategies.
[0028] For example, in a scenario where the target vehicle is an electric vehicle that needs charging, at the current moment... Define the current decision context as: ,in, Used to indicate the target vehicle is The state of charge of the battery. Used to represent the latitude and longitude information of the target vehicle's current location. Used to indicate the current remaining driving range of the target vehicle. This is used to represent the set of candidate charging stations obtained within a preset search radius. Used to represent the historical behavior information of the target object.
[0029] Step S204: Generate the preference feature vector of the target object, wherein the preference feature vector is used to quantify the degree of importance the target object attaches to the preset resource screening conditions;
[0030] Optionally, the preference feature vector in this embodiment can be a low-dimensional vector extracted after training user historical behavior data using a machine learning model (e.g., a reinforcement learning model based on Direct Preference Optimization (DPO)). This vector quantifies the user's subjective emphasis or sensitivity on different resource selection dimensions (e.g., distance, price, time).
[0031] Step S206: Generate resource recommendation parameters based on the current decision context and the preference feature vector, wherein the resource recommendation parameters are used to recommend target resources that serve the target vehicle to the target object.
[0032] Optionally, the resource recommendation parameters in this embodiment are a set of specific values or strategies used to guide resource recommendation, calculated based on the current decision context and preference feature vector through specific algorithmic logic (e.g., segmented filtering, sorting algorithms).
[0033] For example, in one specific embodiment, a user is driving an electric vehicle on a highway with a low battery and needs to find a charging station. The specific steps include:
[0034] S1, The system collects the following data to construct the context of the current time t. :
[0035] Vehicle Status: SOC: 25%; Remaining Range: 120km; Current Coordinates: K120, XX Expressway; Destination: Shanghai City Center (approximately 200km away); Resource Dynamics: The system detected 3 candidate charging stations within a 10km radius.
[0036] Station A: 3km away (2km detour), electricity price 1.2 yuan / kWh (peak hours), estimated queue time 5 minutes, currently idle. Station B: 8km away (6km detour), electricity price 0.8 yuan / kWh (off-peak hours), estimated queue time 0 minutes, currently idle. Station C: 15km away (13km detour), electricity price 1.0 yuan / kWh, estimated queue time 30 minutes, currently idle. Historical Behavior: The user's charging records over the past month show that he has never chosen a station with a detour exceeding 5km, and he is not sensitive to price fluctuations, prioritizing shorter queue times.
[0037] S2, based on the user's historical behavior data, generates a preference feature vector. This vector consists of three components, representing the user's sensitivity to mileage, price, and time, respectively. Specifically, the preference feature vector equals [0.9, 0.2, 0.8]. Where 0.9 indicates extremely high sensitivity to mileage or detours (high sensitivity); 0.2 indicates extremely low sensitivity to price (low sensitivity); and 0.8 indicates relatively high sensitivity to waiting time (medium-high sensitivity).
[0038] S3 first performs distance-guided filtering, then price-guided filtering, and finally time-guided filtering. Based on the final candidate set, the recommended resource is determined to be site A, and corresponding recommendation parameters are generated: navigation target is set to: site A; estimated arrival time is set to: 15:30. Simultaneously, the system generates personalized recommendation scripts.
[0039] Through the above steps, by constructing a multi-dimensional decision context that integrates real-time vehicle status, dynamic resource information, and historical behavior, and by quantifying and generating preference feature vectors that reflect the user's emphasis on selection criteria, a shift from static rule-based recommendation to dynamic personalized recommendation is achieved. This allows for the adaptive generation of accurate resource recommendation parameters based on the user's differentiated sensitivity across different dimensions. Therefore, it addresses the technical problem of low accuracy in resource recommendation in related technologies, thereby improving the accuracy of resource recommendation.
[0040] In an exemplary embodiment, constructing the current decision context includes: when the target vehicle is detected to be in a resource-demanding state, collecting the resource usage status and operating status of the target vehicle to obtain the real-time status of the vehicle; obtaining resource information within a preset range according to the real-time status of the vehicle to obtain the resource dynamic information; obtaining the resource selection behavior of the target object within a historical time period to obtain the historical behavior information; and sequentially performing a fusion operation and a structuring operation on the real-time status of the vehicle, the resource dynamic information, and the historical behavior information to obtain the current decision context.
[0041] Optionally, in this embodiment, the resource demand status refers to the state in which the target vehicle (such as an electric vehicle) needs to obtain external replenishment resources (such as charging services or refueling services) because its remaining energy is lower than a preset threshold or because the user actively initiates a charging / refueling request. It is a conditional signal that triggers the system to start the resource recommendation process.
[0042] Optionally, in this embodiment, the real-time vehicle status refers to the instantaneous physical parameters of the target vehicle obtained at a specific moment through onboard sensors or communication interfaces. These mainly include the battery state of charge (SOC), remaining driving range, current geographical coordinates (latitude and longitude), driving speed, and direction. These parameters reflect the vehicle's current urgency and spatial location.
[0043] Optionally, the resource dynamic information in this embodiment refers to the real-time service attributes of all available resources (such as charging stations) within a preset search radius of the target vehicle's current location. This includes the resource point's operational status (idle / occupied / faulty), estimated current queuing time, real-time service price (such as time-of-use electricity pricing), surrounding traffic congestion index, and facility availability. This information is highly time-sensitive and changes dynamically over time.
[0044] Optionally, in this embodiment, historical behavior information refers to the target object's (user's) historical interaction records regarding resource selection, route planning, price sensitivity, etc., over a past period. This includes historically selected resource point IDs, records of accepting or rejecting recommendations, actual consumption amounts, and average waiting time tolerance. This information is used to characterize the user's personalized preference features.
[0045] Optionally, the fusion operation in this embodiment specifically includes:
[0046] Time alignment: Since vehicle status, resource prices, and traffic conditions all change over time, the system needs to map all data to the same timestamp or eliminate time lag through interpolation algorithms.
[0047] Spatial mapping spatially correlates the vehicle's Global Positioning System (GPS) coordinates with the geographic coordinates of resource points, and calculates spatial characteristics such as distance and path cost.
[0048] Semantic fusion: Mapping structured numerical data (e.g., SOC=20%) and semi-structured behavioral data (e.g., preference for low prices) to a unified vector space for model processing.
[0049] Optionally, the structured operations in this embodiment can be represented using tensors or graph structures. Tensor representation involves concatenating vehicle features and resource features into a high-dimensional vector. Graph representation involves constructing a bipartite graph where nodes include users, vehicles, and resource points, and edges represent historical interactions between users and resources, and distance or price relationships between vehicles and resources.
[0050] For example, in one specific embodiment, when a user is driving an electric vehicle and the system detects that the battery level is low, a resource recommendation process is triggered. This specifically includes the following steps:
[0051] S1 detects resource demand status and collects real-time vehicle status, specifically including:
[0052] The onboard backend continuously monitors battery management system data. When the battery state of charge (SOC) drops to 25% and falls below a preset safety threshold (e.g., 30%), the system determines that the target vehicle is in a resource-demanding state. The system immediately collects the following data as the vehicle's real-time status:
[0053] Battery State of Charge (SOC) t =25%, Remaining range R t =120 km (estimated based on current driving style), current location (Loc) t ={Latitude 39.9042, Longitude 116.4074}, Heading North.
[0054] S2, obtains dynamic resource information, specifically including:
[0055] The system uses Loc t Centered on the remaining driving range R t Using a radius of 50% (i.e., 60 kilometers), potential charging resource points are searched in the map database. Real-time information on three candidate charging stations within this range is obtained from a cloud resource server, forming a dynamic resource information set S. t S t include:
[0056] Candidate station A, 3 km away (2 km detour); status: idle; queue time: 5 minutes; real-time electricity price: 1.2 yuan / kWh (peak hours); congestion index: low;
[0057] Candidate station B, 8 km away (6 km detour); Status: Idle; Queue time: 0 minutes; Real-time electricity price: 0.8 yuan / kWh (off-peak hours); Congestion index: Medium;
[0058] Candidate station C, 15 km away (13 km detour); status: idle; queue time: 30 minutes; real-time electricity price: 1.0 yuan / kWh; congestion index: high.
[0059] S3, obtain historical behavior information, specifically including:
[0060] The system retrieves charging records from the past three months and extracts historical behavior information H. u Total charging times: 12 times; Detour preference: 9 times choosing stations with detours of less than 5 kilometers, 3 times choosing stations with larger detours (usually due to nearby station malfunctions); Price sensitivity: 8 times choosing to charge during off-peak electricity prices, 4 times accepting high-priced charging; Waiting tolerance: 10 times choosing stations with queues of less than 10 minutes, 2 times accepting long queues.
[0061] S4, through fusion and structuring operations, yields the current decision context, specifically including:
[0062] The system integrates the above three types of information to construct the current decision context x. t Feature extraction and encoding: The vehicle state V... t Encoded as a vector, for example, [SOC=0.25, Range=120, L at =39.90, L on =116.40][SOC=0.25, Range=120, L at =39.90, L on =116.40]. This will transfer the resource dynamic information S. t Encode as a matrix or list, with each resource point si represented as a vector [Dist=3, Queue=5, Price=1.2, Congestion=Low]. Historical behavior H... u The features are transformed into user profile features. The system then performs a fusion operation, concatenating and normalizing these features to form the final current decision context x. t Its structure can be described as the current decision context x. t x t Includes the following parts:
[0063] User vehicle joint characteristics: by SOC t R t and H u The weighted average of historical preferences is obtained, reflecting the combination of current urgency and long-term preferences.
[0064] Environmental resource feature list: Contains complete attribute vectors for candidate stations A, B, and C. Interaction relationship features: Calculates the relative positional relationship (such as distance and estimated arrival time) between each candidate station and the vehicle, as well as a preliminary score for the degree of matching with user preferences.
[0065] The final output is the current decision context x. t It is constructed as a structured object, whose core fields include: Vehicle urgency index: calculated based on SOC 25% and remaining range of 120 km, marked as medium urgency.
[0066] Candidate Resource Pool: Contains standardized attribute vectors for sites A, B, and C. Site A's attribute vector is [distance weight 0.9, price weight 1.2, time weight 0.5]; Site B's attribute vector is [distance weight 0.6, price weight 0.8, time weight 0]; Site C's attribute vector is [distance weight 0.3, price weight 1.0, time weight 30]. User Preference Prior: Sensitivity weights for distance, price, and time extracted from historical behavior, initialized to [0.7, 0.5, 0.6].
[0067] This embodiment integrates vehicle data, environmental data, and historical data into a unified, machine-readable current decision context, providing accurate data for subsequent generation of preference feature vectors and execution of filtering.
[0068] In an exemplary embodiment, the resource dynamic information includes at least a set of candidate resources, wherein each candidate resource in the set includes at least one of the following information: the current resource operation status of the candidate resource, the estimated waiting time of the candidate resource, the real-time price of the candidate resource, the road conditions at the location of the candidate resource, and the location of the candidate resource.
[0069] Optionally, in this embodiment, the candidate resource set refers to the set of all available resource points that meet the basic user access criteria (such as distance restrictions and service type matching) selected by the system through a retrieval algorithm within a specific time window and spatial range. For example, it could be the set of candidate charging piles in an electric vehicle charging scenario.
[0070] Optionally, the current resource operating status in this embodiment refers to the current physical or service availability status of the resource point. For example, the status includes: Idle: The resource is available, and users can start service upon connection. Occupied: The resource is being used by other users and is temporarily unavailable. Fault / Offline: The resource is unavailable due to hardware failure, network interruption, or maintenance. Reserved: The resource has been reserved by other users but has not yet started service or has been reserved.
[0071] Optionally, the estimated waiting time in this embodiment refers to the estimated time required from the user's arrival at the resource point to the point where they can begin using the service (such as plugging in a charging gun). This value may not be measured in real time, but rather predicted based on the following factors: the remaining usage time of the currently occupied resource, the peak queuing patterns of the same historical period, and the length of the real-time reservation queue.
[0072] Optionally, the real-time pricing in this embodiment refers to the service price of the resource at the current moment. For charging resources, this typically involves a time-of-use pricing strategy, where the price is dynamically adjusted according to changes in grid load. This price may include a basic service fee, electricity charges, and platform adjustment fees.
[0073] Optionally, in this embodiment, the road conditions at the location refer to the traffic conditions of the roads surrounding the resource point, which directly affects the user's actual travel time and driving experience to the resource. Key indicators include: congestion index, reflecting the degree of reduction in road speed; traffic speed, the average speed of the current road segment; and accident / construction information, indicating whether there are any unforeseen events that reduce traffic capacity.
[0074] Optionally, in this embodiment, the location of the candidate resource refers to the precise coordinates (such as GPS latitude and longitude) of the resource point in geographic space, which is used to calculate the distance from the user's current location to the resource point, plan the navigation path, and calculate the detour cost.
[0075] In an exemplary embodiment, generating the preference feature vector of the target object includes: when the target object initiates a resource request, performing forward propagation inference on the real-time state of the vehicle and the historical behavior information using a pre-trained target model to obtain the preference feature vector; wherein, the target model is a model obtained by performing training operations on an initial model using a preference training sample set, the preference training sample set being generated based on the target object's historical context, positive samples, and negative samples, the historical context representing the target object's historical resource selection behavior, the positive samples representing samples where the target object made historical resource selections, and the negative samples representing samples where the target object did not make historical resource selections.
[0076] Optionally, the pre-trained target model in this embodiment refers to a machine learning model (e.g., a deep learning-based network architecture) trained on a large amount of historical data. This model can receive input features (vehicle state, historical behavior) and compute the output results through forward propagation. In this embodiment, the model is specifically designed to extract and map user preference features from contextual information.
[0077] Optionally, in this embodiment, the forward propagation inference operation refers to the process of feeding new input data (current context) into the model after model training is completed, performing linear transformations and nonlinear activation function calculations on each layer of neurons, and finally obtaining the output vector (preference feature vector). This process does not involve gradient updates and is only used for prediction.
[0078] Optionally, the preference training sample set in this embodiment is used as the dataset for training the target model, for example, consisting of triples (x, y). w Composed of y1), where, This represents the historical context (specific situational data when the user made the decision, such as SOC, location, candidate resource list, etc.) corresponding to a certain charging decision. This represents a positive sample (a candidate recommendation strategy based on user preferences, representing the direction of user preferences). This represents negative samples (candidate recommendation strategies that users do not prefer).
[0079] Optionally, in this embodiment, the initial model refers to the model parameter state before training begins, either randomly initialized or before fine-tuning based on a common language or recommended model.
[0080] This embodiment constructs a preference training sample set including historical context, positive samples (actual selections), and negative samples (unselected samples), and uses the direct preference optimization algorithm to train the initial model, thereby obtaining a pre-trained target model that can accurately capture users' implicit preferences.
[0081] In an exemplary embodiment, the training operation includes: for each training sample in the preference training sample set, calculating the log probability difference between the initial model and the reference model on the positive and negative samples, respectively, wherein the log probability difference is used to quantify the confidence gap between the model on the positive and negative samples, and the reference model is a baseline model with fixed parameters; constructing a graded weighted loss function based on the log probability value, wherein the parameters in the graded weighted loss function are composed of preference optimization loss parameters corresponding to different preference levels; and adjusting the parameters of the initial model using the graded weighted loss function and gradient descent until the training of the initial model meets a preset convergence condition to obtain the target model.
[0082] Optionally, the reference model in this embodiment refers to a baseline model whose parameters remain fixed during training. Typically, the initial model before training or the model from the previous training cycle is selected. Its function is to serve as an anchor point, preventing the target model from deviating too far during optimization, which could lead to the generation of uncontrollable or low-quality policies, thereby ensuring the stability of training and the interpretability of the policy.
[0083] Optionally, in this embodiment, the log probability difference refers to the model's log probability for positive samples (user preferred choices) minus the log probability for negative samples (user disliked choices). This difference quantifies the degree to which the model believes positive samples are superior to negative samples. If the difference is positive and large, it indicates that the model is highly confident that positive samples are the better choice; if it is negative, it indicates that the model tends to incorrectly select negative samples.
[0084] Optionally, the hierarchical weighted loss function in this embodiment is an improvement on the traditional DPO loss function. It not only considers the selection relationship between positive and negative samples but also introduces the intensity levels of user preferences (high, medium, and low). By assigning different weight coefficients to samples of different levels, the model prioritizes samples with strong user preferences and high data quality during training, thereby more accurately characterizing user preferences.
[0085] Optionally, the gradient descent method in this embodiment is an optimization algorithm. It minimizes the loss function by calculating the gradient of the loss function with respect to the model parameters and updating the parameters in the opposite direction of the gradient. In this embodiment, it iterative adjustments are made to the initial model parameters until the model performance meets the convergence condition.
[0086] Optionally, the preset convergence condition in this embodiment refers to the criteria for determining whether model training is complete. For example, the loss function value no longer decreases significantly, the preset maximum number of iterations is reached, or the preference accuracy on the validation set no longer improves.
[0087] For example, in one specific embodiment, the system is training a target model to learn the user's charging preferences. This includes the following steps:
[0088] S1, Prepare training samples by extracting three typical samples from the user's historical data:
[0089] Sample 1 (high intention), including: context x1, SOC 20%, location city center; positive sample y w1 Site A was selected (closer location, higher price); negative sample y l1 Site B not selected (far away, low price); Preference level: High; Weight: w high =0.6.
[0090] Sample 2 (neutral intention), including: context x2, SOC 50%, location suburban; positive sample y w2 We chose station C (reasonable price, no queue).
[0091] negative sample y l2 This includes: Site D not selected (low price, but long queue); Preference level Mid; Weight w mid =0.3.
[0092] Sample 3 (low willingness) includes: context x3, SOC 10%, remote location, only one station available; positive sample y w3 Site E was selected (the only available site, but with a high failure rate); negative sample y l3 There are no other options; the virtual negative sample is site F (which does not exist but is theoretically better); the preference level is Low; the weight is w. low =0.1.
[0093] S2, calculate the log probability difference and loss. For sample 1, the model performs forward propagation, which includes the following steps:
[0094] Calculate the log probability of the target model logπ θ (y w1 |x1), including the log probability of the model with respect to site A and the log probability of the model with respect to site B.
[0095] Log-probability difference of target model Δlogπ θ =logπ θ (y w1 |x1)-logπ θ (y l1 |x1). Similarly, calculate the reference model π. ref log probability difference Δlogπ ref =logπ ref (y w1 |x1)-logπ ref (y l1 |x1). Calculate the preference difference D1 = Δlogπ θ -Δlogπ ref This value represents the degree to which the target model's confidence in site A being superior to site B is increased compared to the reference model.
[0096] Calculating the single-sample loss involves multiplying D1 by the temperature coefficient β, passing the result to the Sigmoid function, and then taking the logarithm to obtain the basic loss L. DPO (1) Since the level is High, the weighted loss is L. weighted (1) =0.6×L DPO (1) ).
[0097] S3, Constructing a hierarchical weighted total loss:
[0098] The total loss function for this batch is obtained by summing the weighted losses of all samples: .
[0099] S4, Gradient Descent and Parameter Update, includes the following steps:
[0100] Backpropagation, i.e., calculating L total gradient with respect to the target model parameter θ θ L total ;
[0101] Parameter update, i.e., updating the parameter θ using gradient descent. new =θ old -η θ L total , where η is the learning rate.
[0102] Repeat the above process until the total loss no longer decreases significantly, or the preset number of epochs is reached. At this point, the target model has learned to distinguish Wang Wu's sensitivity to distance, price, and time, thus completing the construction of the ability to learn the preference feature vector.
[0103] The trained target model can adapt to the new context x new Output a high-confidence preference feature vector that reflects the user's true needs.
[0104] This embodiment achieves precise policy alignment based on direct preference optimization by introducing a reference model and calculating the log probability difference between the target model and the reference model on positive and negative samples. This avoids the complexity and instability caused by the traditional reinforcement learning model that relies on reward models. At the same time, by constructing a hierarchical weighted loss function, the loss term is weighted differently according to the strength of user preference intentions. This makes the model pay more attention to user behavior samples with high confidence and strong intentions during training, effectively suppressing the interference of noisy samples on model learning, thereby more accurately characterizing the fine-grained preference features of users.
[0105] In an exemplary embodiment, generating resource recommendation parameters based on the current decision context and the preference feature vector includes: performing a segmented guided filtering operation on a candidate resource set using sensitivity parameters in the preference feature vector that correspond to the preset resource filtering conditions, thereby generating the resource recommendation parameters. The sensitivity parameters include distance sensitivity, price sensitivity, and time sensitivity, and the candidate resource set includes candidate resources corresponding to the current decision context.
[0106] Optionally, the segmented guided filtering operation in this embodiment is a gradual resource filtering strategy. Unlike listing all candidate resources at once and letting the user compare them manually, this method decomposes the complex recommendation decision into multiple stages (e.g., filtering by distance first, then price, and finally time). Each stage dynamically adjusts the filtering threshold using the corresponding sensitivity parameter in the preference feature vector, gradually narrowing the candidate range, and ultimately outputting a small number of resources that best match the user's current needs. This mechanism reduces the user's cognitive load and improves decision-making efficiency.
[0107] Optionally, in this embodiment, distance sensitivity is a dimension of the preference feature vector, quantifying the user's tolerance for resources deviating from their original path or current location. A higher value indicates that the user is less willing to take a detour and tends to choose resources that are closer.
[0108] Optionally, in this embodiment, price sensitivity is one dimension of the preference feature vector, quantifying how sensitive users are to the price of resource services (such as electricity costs and service fees). The higher the value, the more sensitive users are to prices, and the more likely they are to choose lower-priced resources, even if this may mean a slightly longer distance or a longer waiting time.
[0109] Optionally, in this embodiment, time sensitivity is one dimension of the preference feature vector, quantifying the user's tolerance for waiting time or additional time consumption (such as queuing or congestion). The higher the value, the more the user values time and tends to choose resources with short waiting times and high passage efficiency.
[0110] Optionally, the candidate resource set in this embodiment is a list of resources that meet basic admission criteria (such as being within the driving range and being in normal condition) determined when constructing the current decision context. This is the initial input pool for segmented filtering.
[0111] For example, in a scenario where the target vehicle is an electric vehicle and the resource is a charging station, the candidate resource set is the candidate charging station set, which can be represented as: ,in, Used to indicate the number of candidate charging piles, the first One candidate charging station This can be further expressed as: ,in, Used to indicate the operating status of charging piles, including at least three states: idle, occupied, and faulty. Used to represent the estimated queuing time for the corresponding charging station. Used to indicate the real-time electricity price of the corresponding charging station. Used to indicate the congestion index of surrounding roads. This is used to represent the location of charging stations. By using a set of candidate charging stations, vehicle status, station status, queuing status, pricing information, and traffic environment information can be uniformly represented as the current status input.
[0112] For example, in one specific embodiment, a user initiates a charging request. The system has generated a current decision context, which includes three candidate charging stations: station A, station B, and station C. Simultaneously, the system has generated Zhang San's preference feature vector P. u The values are [0.85, 0.30, 0.70]. The first value, 0.85, represents the distance sensitivity α. uThe second term, 0.30, represents the price sensitivity β. u The third item, 0.70, represents the time sensitivity γ. u Specifically, it includes the following steps:
[0113] S1, Distance-guided filtering (based on distance sensitivity α) u =0.85), specifically including:
[0114] Due to distance sensitivity α u The value is 0.85, which falls within the high sensitivity range. According to the preset rules, when α... u When the value is greater than 0.7, the system sets a strict detour threshold τ. d Only stations with a detour rate of less than 5% are recommended.
[0115] Station A has a detour distance of 2 kilometers, while the original route length is 30 kilometers. Calculate its detour ratio δ. A 2 divided by 30 is approximately 6.7%. Judgment: 6.7% is greater than 5%, therefore the screening criteria are not met, and site A is eliminated.
[0116] Station B has a detour distance of 1 kilometer, while the original path length is 30 kilometers. Calculate its detour ratio δ. B 1 divided by 30 is approximately 3.3%. Judgment: 3.3% is less than or equal to 5%, meeting the screening criteria; site B passes.
[0117] Station C has a detour distance of 10 kilometers, while the original route length is 30 kilometers. Calculate its detour ratio δ. C 10 divided by 30 is approximately 33.3%. Judgment: 33.3% is greater than 5%, therefore the screening criteria are not met, and site C is eliminated.
[0118] After distance filtering, the candidate set was narrowed down to the first candidate set C1, which only contains site B.
[0119] S2, Price-Driven Filtering (Based on Price Sensitivity β) u =0.30), specifically including:
[0120] Due to price sensitivity β u The value is 0.30, which falls within the low sensitivity range. According to the preset rules, when β... u When the price is less than 0.5, the system sets a lenient price threshold, does not impose strict price restrictions, or sets a threshold that is much higher than the market average price, which is essentially equivalent to retaining all candidate resources that enter this stage.
[0121] Site B has a real-time electricity price of 0.8 yuan / kWh, which is within an acceptable range. Meeting the lenient pricing conditions, Site B is approved.
[0122] After price filtering, the second candidate set C2 still includes site B.
[0123] S3, Time-guided Filtering (based on time sensitivity γ) u =0.70), specifically including:
[0124] Due to time sensitivity γ u The value is 0.70, which falls within the medium-to-high sensitivity range. According to the preset rules, when γ... u When the value is greater than 0.6, the system sets a strict waiting time threshold τ. q We only recommend sites with a waiting time of less than 5 minutes.
[0125] The estimated waiting time for site B is 0 minutes. Since 0 minutes is less than or equal to 5 minutes, the filtering criteria are met, and site B passes.
[0126] After a period of filtering, the final candidate set C3 includes site B.
[0127] S4 generates resource recommendation parameters, specifically including:
[0128] The system sorts the stations in the final set C3 (only one station is listed here) and generates resource recommendation parameters, specifically including: the reason for recommending station B (recommendation text) is "We recommend station B to you. It is only 1 kilometer away from your route, and there is currently no queue. The estimated wait time is 0 minutes, and you can charge immediately." The estimated arrival time is 15:10; the estimated charging time is 30 minutes; the estimated cost is 40 yuan; and the navigation link is [click to navigate].
[0129] This embodiment utilizes distance, price, and time sensitivity parameters in the preference feature vector to perform segmented guided filtering on the candidate resource set. This decomposes the complex resource recommendation decision into a progressive filtering process, effectively reducing the cognitive load and decision-making difficulty for users when faced with multi-dimensional information, and enhancing the accuracy of the recommendation results.
[0130] In an exemplary embodiment, a segmented guided filtering operation is performed on the candidate resource set using the sensitivity parameters in the preference feature vector corresponding to the preset resource filtering conditions to generate the resource recommendation parameters. This includes: filtering a first candidate resource set from the candidate resource set that satisfies a detour constraint, wherein the detour constraint is a distance threshold determined based on the distance sensitivity; filtering a second candidate resource set from the first candidate resource set that satisfies a price constraint, wherein the price constraint is a price threshold determined based on the price sensitivity; filtering a third candidate resource set from the second candidate resource set that satisfies a time constraint, wherein the time constraint is a waiting time threshold determined based on the time sensitivity; sorting the candidate resources in the third candidate resource set to select the target resource from the sorting results; and generating recommendation parameters corresponding to the resource information of the target resource to obtain the resource recommendation parameters. The resource information includes at least one of the following: location information of the target resource, path adjustment information to the target resource, cost information of the target resource, and explanatory information for recommending the target resource.
[0131] Optionally, the detour constraint in this embodiment is a geospatial filtering condition set based on the user's distance sensitivity. It can be either a "maximum allowed detour ratio" or a "maximum allowed additional driving distance." When the user's distance sensitivity is high, the constraint is strict, retaining only resources close to the user's current path or destination; when sensitivity is low, the constraint is lenient, allowing for larger geographical offsets in exchange for other advantages (such as lower prices or faster speeds).
[0132] Optionally, the price constraint in this embodiment is an economic filtering condition set based on the user's price sensitivity. It can be either a "maximum acceptable unit price" or a "discount percentage relative to the average price." Users with high price sensitivity can only see low-priced resources, while users with low price sensitivity can see resources within a wider price range.
[0133] Optionally, the time constraint in this embodiment is an efficiency filtering condition set based on the user's time sensitivity. It can be either "maximum allowed waiting time" or "maximum allowed passage time". Users with high time sensitivity will only accept resources that are immediately available or allow fast passage, while users with low time sensitivity will be able to accept longer queuing or congestion times.
[0134] Optionally, in this embodiment, the first candidate set is a subset of resources filtered by distance. The second candidate set is a subset of resources filtered by price (derived from the first candidate set). The third candidate set is a subset of resources filtered by time (derived from the second candidate set), which is usually the final recommendation pool.
[0135] Optionally, the resource recommendation parameters in this embodiment are structured data that are ultimately presented to the user. They include not only the basic identifier (ID, location) of the target resource, but also dynamically generated auxiliary information, such as navigation path, estimated cost, waiting time, and explanatory language, which are designed to help users quickly understand and make decisions.
[0136] For example, in one specific embodiment, a user is driving, and the system needs to recommend charging resources for them. The candidate resource set S t It includes site A, site B, site C, and site D.
[0137] Preference feature vector P Li =[0.75, 0.60, 0.80], Distance sensitivity α u =0.75; Price sensitivity β u =0.60; Time sensitivity γ u =0.80;
[0138] S1, the first candidate resource set C1 is selected based on distance sensitivity, specifically including:
[0139] According to the preset rules, when α u When the value is 0.75 (in the middle to high range), set the maximum allowable detour ratio τ. d =10%.
[0140] Station A: Original route 30km, detour 2km. Detour percentage 2 / 30 ≈ 6.7%. 6.7% ≤ 10%, approved. Station B: Original route 30km, detour 5km. Detour percentage 5 / 30 ≈ 16.7%. 16.7% > 10%, eliminated. Station C: Original route 30km, detour 1km. Detour percentage 1 / 30 ≈ 3.3%. 3.3% ≤ 10%, approved. Station D: Original route 30km, detour 8km. Detour percentage 8 / 30 ≈ 26.7%. 26.7% > 10%, eliminated.
[0141] The result is C1 = {site A, site C}.
[0142] S2, based on price sensitivity, filters the second candidate resource set C2, specifically including:
[0143] According to the preset rules, when β u When the value is 0.60 (in the middle range), the price threshold is set to 90% of the current average price in C1. In C1, the electricity price at station A is 1.2 yuan, and the electricity price at station C is 0.9 yuan. The average price p = (1.2 + 0.9) / 2 = 1.05 yuan. The price threshold τ... p =1.05×0.9=0.945 yuan.
[0144] The electricity price at site A is 1.2 yuan. Since 1.2 > 0.945, it is eliminated.
[0145] The electricity price at station C is 0.9 yuan, 0.9 ≤ 0.945, so it passes.
[0146] C2 = {site C}.
[0147] S3, based on time sensitivity, filters the third candidate resource set C3, specifically including:
[0148] According to the preset rules, when γ u When the sensitivity is 0.80 (high sensitivity), set the maximum allowable waiting time τ. q =5 minutes.
[0149] Station C is expected to wait 2 minutes. 2≤5, pass.
[0150] C3 = {site C}.
[0151] S4, sorting and generating resource recommendation parameters, specifically including: There is only one site C in C3, which is directly selected as the target resource. The location information of site C is latitude and longitude {Lat:39.91, Lon:116.42}. Drive 200 meters to the right and turn onto the auxiliary road. The cost prompt is: current electricity price 0.9 yuan / kWh, estimated charging cost 45 yuan. The explanation is: "We recommend site C for you. Although it is slightly farther away, the price is below average, and there is currently no queue; the wait is only 2 minutes, making it cost-effective and time-saving."
[0152] This embodiment introduces a segmented guided screening mechanism, decoupling the complex resource recommendation decision into three independent screening stages: distance, price, and time. It dynamically generates the constraint thresholds for each stage using the sensitivity parameters in the preference feature vector, thereby realizing the process of gradually converging from the high-dimensional space to the optimal address. This effectively filters out redundant resources that do not meet the user's core needs, reducing the user's information processing burden and decision-making difficulty.
[0153] In an exemplary embodiment, after generating resource recommendation parameters based on the current decision context and the preference feature vector, the method further includes: displaying the resource recommendation parameters to the target object, and when the target object triggers the resource recommendation parameters, obtaining interactive feedback information of the target object on the resource recommendation parameters; and adjusting the preference feature vector using the interactive feedback information.
[0154] Optionally, in this embodiment, the interactive feedback information refers to the behavioral data or explicit evaluations generated by the target object (user) during interaction with the recommendation system. This data is used to reflect the user's satisfaction with the current recommendation strategy.
[0155] Optionally, the preference feature vector adjustment in this embodiment refers to the process of dynamically correcting the vector representing user preferences based on the obtained interaction feedback information. Specifically, it includes:
[0156] Positive adjustments: When users show high satisfaction (such as clicking on navigation or successfully charging), increase the weight of the corresponding dimension or confirm the effectiveness of the current sensitivity settings.
[0157] Negative adjustments: When users show hesitation or rejection (such as closing the recommendation page or choosing other resources), reduce the confidence of the dimensions on which the current recommendation strategy relies, or adjust the sensitivity to explore new preference ranges.
[0158] Iterative updates: This is a closed-loop process that ensures the model can adapt to the time-varying nature of user preferences and the context-dependent nature of the application.
[0159] Optionally, in this embodiment, the triggering resource recommendation parameter refers to an action in which the user engages in substantive interaction with the recommendation results, such as clicking the "Navigate Now" or "Schedule Charging" button, or swiping to select other recommended items. This action signifies that the user has moved from the "browsing" stage to the "decision-making" stage.
[0160] This embodiment utilizes interactive feedback information to adjust the preference feature vector, enabling real-time capture of users' explicit or implicit behavioral feedback on recommendation results, and dynamically correcting the user's preference feature vector accordingly.
[0161] The method for generating resource recommendation parameters in this application embodiment is explained below with reference to optional examples. This optional example describes a method and system for generating intelligent recommendation strategies for electric vehicles based on user behavior preferences and state awareness. It addresses problems in existing technologies such as static strategies, coarse preference modeling, insufficient fusion of dynamic environmental information, and low interaction efficiency.
[0162] This specific embodiment addresses the intelligent recommendation needs in electric vehicle charging scenarios. It comprehensively collects real-time vehicle status information, dynamic environmental information, and historical user behavior information. First, it constructs a user behavior preference model. Then, based on the obtained preference vector and real-time status information, it sequentially performs segmented strategy filtering and guidance according to three dimensions: distance, price, and time. Finally, it generates a personalized recommendation strategy for the current user and forms a feedback loop after the user completes the selection, which is used for subsequent model iteration and updates.
[0163] like Figure 3 The diagram shown is a flowchart of the electric vehicle intelligent recommendation strategy generation method based on user behavior preferences and state awareness in this embodiment, including the following steps:
[0164] S301, Multi-source Data Acquisition and Context Construction: Real-time acquisition of vehicle status, dynamic environmental information, and historical user behavior to construct the current decision context and generate a set of candidate charging stations and a set of candidate recommendation strategies. Specifically, this includes:
[0165] At the current decision-making time t, the system collects real-time vehicle status, charging pile operation status, and traffic environment information to construct a user context input sample x. t .
[0166] Define the user context input sample as: ,in, Used to indicate the vehicle's time. The state of charge of the battery. Used to indicate the latitude and longitude information of the vehicle's current location. Used to indicate the vehicle's current remaining driving range. This is used to represent the set of candidate charging stations obtained within a preset search radius. Used to represent the target user's historical behavior information.
[0167] The candidate charging pile set can be represented as ,in, Indicates the number of candidate charging stations, the first... One candidate charging station This can be further expressed as: ,in, Used to indicate the operating status of charging piles, including at least three states: idle, occupied, and faulty. Used to represent the estimated queuing time for the corresponding charging station. Used to indicate the real-time electricity price of the corresponding charging station. Used to indicate the congestion index of surrounding roads. This is used to indicate the location of charging stations. Using the above method, vehicle status, station status, queue status, pricing information, and traffic environment information can be uniformly represented as the current status input.
[0168] Furthermore, in the current context The system then generates a set of candidate recommendation strategies: ,in, Used to represent the number of candidate recommendation strategies, each candidate recommendation strategy It should include at least the target charging station, route adjustment information, price information, waiting time information, and corresponding recommended wording. Within this context, users can form a set of preference samples for any two candidate strategies.
[0169] S302, User Preference Modeling Based on Tiered DPO: A preference sample set is constructed using historical behavior data. A tiered weighted training method based on direct preference optimization of DPO is employed to train the user behavior preference model, extracting preference vectors representing user mileage, price, and time sensitivity. Specifically:
[0170] Preference Sample Construction: Collect users' historical charging behavior data (such as station selection, acceptance of recommendations, route changes, waiting, and acceptance of premium pricing) to construct a preference training sample set D. A single preference sample is denoted as (x, y). w ,y1), where, This represents the context information corresponding to a charging decision. Candidate recommendation strategies that represent user preferences This represents candidate recommendation strategies that the user does not prefer. DPO training typically uses a policy model to be trained and a frozen reference model simultaneously, and constructs a loss function based on the log probability difference between the candidate strategies chosen by the user and the candidate strategies rejected by the user.
[0171] Tiered Preference Mechanism: To differentiate the strength of user preferences, user acceptance behavior is divided into three levels: high willingness to accept, medium willingness to accept, and low willingness to accept, k∈{high, mid, low}, and assigned corresponding weights w. k and satisfy w high >w mid >w low , and ∑w k =1.
[0172] Model training and loss function: The Direct Preference Optimization (DPO) algorithm is used, combined with the policy model π to be trained. θ And the frozen reference model π ref Calculate the graded weighted loss function: , where L DPO (k) is the DPO loss term corresponding to the kth preference level.
[0173] S303, segmented intelligent guidance and strategy generation, specifically includes:
[0174] Based on the current context and user preference vector, a segmented guided selection process is implemented using distance, price, and time dimensions to generate personalized recommendation strategies and explanatory statements. Specifically, this includes: based on mileage sensitivity α... u Determine the detour threshold τ d (α u ), and filter out the detour ratio δ i ≤τ d (α u The first candidate set C1 is obtained from the sites listed. Based on price sensitivity β...u Determine the price threshold τ p (β u ), filter out the electricity price p from C1 i ≤τ p (β u The sites were selected to form the second candidate set C2. Based on the time sensitivity γ... u Determine the waiting time threshold τ q (γ u ), filter out the queuing time q from C2 i ≤τ q (γ u The sites in C3 are ranked, and the best result is selected as the target resource. Explanatory recommendation text is generated by combining key indicators from the screening process (such as expected waiting time of 2 minutes and cost savings of 20%), forming the final personalized recommendation strategy.
[0175] S304, Policy Output and Feedback Closed-Loop Optimization: This involves displaying the recommendation strategy and obtaining user interaction feedback, constructing new preference samples to update the historical dataset, and periodically retraining the preference model to achieve continuous adaptive optimization of the system. Specifically, this includes:
[0176] The generated recommendation strategy will be pushed to the vehicle's infotainment screen or mobile application interface.
[0177] Record user interaction behavior in real-world scenarios. t (Including selection, rejection, skip, etc.), as interactive feedback information.
[0178] Set the current context x t Candidate strategies and feedback behavior a t Transform into new preference training samples (x) t y w y l The updated dataset (p, k) is appended to the historical dataset D. Based on the updated dataset, the system retrains the preference model according to a preset period, thereby dynamically correcting the user preference vector P. u This enables continuous optimization and adaptive adjustment of the recommendation strategy.
[0179] This embodiment introduces a user behavior modeling method based on hierarchical preference training, which effectively distinguishes users' varying degrees of acceptance willingness. This avoids the coarse representation of user preferences found in traditional binary labeling, thus more accurately depicting users' true preferences across dimensions such as distance, price, and time, and improving the match between recommendation results and users' actual intentions. A segmented, dynamically guided recommendation strategy generation mechanism decomposes the complex recommendation decision-making process into three stages—distance, price, and time—for progressive filtering and guidance. This not only reduces the information burden and decision-making difficulty for users but also enhances the interpretability and interactivity of the recommendation process, thereby improving user acceptance rates. An intelligent recommendation architecture that integrates multi-source state information with real-time user preferences is constructed. This architecture comprehensively considers dynamic information such as vehicle status, charging pile status, traffic conditions, and real-time electricity prices, combined with user preferences, to generate personalized recommendation strategies. Through a feedback loop, the model is continuously optimized, resulting in recommendation strategies with stronger real-time performance, adaptability, and personalization.
[0180] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0181] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0182] It should be noted that, through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0183] This embodiment also provides a resource recommendation parameter generation apparatus, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0184] Figure 4 This is a structural block diagram of a resource recommendation parameter generation apparatus according to an embodiment of this application, such as... Figure 4 As shown, the device includes:
[0185] The first construction module 42 is used to construct the current decision context, wherein the current decision context is used to represent the comprehensive characteristics of the target vehicle's real-time vehicle status, resource dynamic information, and the target object's historical behavior information;
[0186] The first generation module 44 is used to generate the preference feature vector of the target object, wherein the preference feature vector is used to quantify the degree of importance the target object attaches to the preset resource screening conditions;
[0187] The second generation module 46 is used to generate resource recommendation parameters based on the current decision context and the preference feature vector, wherein the resource recommendation parameters are used to recommend target resources that serve the target vehicle to the target object.
[0188] It should be noted that the first building module 42 in this embodiment can be used to execute the above step S202, the first generation module 44 in this embodiment can be used to execute the above step S204, and the second generation module 46 in this embodiment can be used to execute the above step S206.
[0189] The embodiments provided in this application achieve a shift from static rule-based recommendation to dynamic personalized recommendation by constructing a multi-dimensional decision context that integrates real-time vehicle status, dynamic resource information, and historical behavior, and by quantifying and generating preference feature vectors that reflect the user's emphasis on selection criteria. This allows for the adaptive generation of accurate resource recommendation parameters based on the user's differentiated sensitivity across different dimensions. Therefore, it solves the technical problem of low accuracy in resource recommendation in related technologies, achieving a significant improvement in the accuracy of resource recommendation.
[0190] In an exemplary embodiment, the first construction module 42 constructs the current decision context in the following manner: when the target vehicle is detected to be in a resource-demanding state, it collects the resource usage status and operating status of the target vehicle to obtain the real-time status of the vehicle; it obtains resource information within a preset range according to the real-time status of the vehicle to obtain the resource dynamic information; it obtains the resource selection behavior of the target object within a historical time period to obtain the historical behavior information; and it sequentially performs a fusion operation and a structuring operation on the real-time status of the vehicle, the resource dynamic information, and the historical behavior information to obtain the current decision context.
[0191] In an exemplary embodiment, the resource dynamic information includes at least a set of candidate resources, wherein each candidate resource in the set includes at least one of the following information: the current resource operation status of the candidate resource, the estimated waiting time of the candidate resource, the real-time price of the candidate resource, the road conditions at the location of the candidate resource, and the location of the candidate resource.
[0192] In an exemplary embodiment, the first generation module 44 is configured to generate the preference feature vector of the target object in the following manner: when the target object initiates a resource request, the preference feature vector is obtained by performing forward propagation inference on the real-time state of the vehicle and the historical behavior information through a pre-trained target model; wherein, the target model is a model obtained by performing training operations on an initial model using a preference training sample set, the preference training sample set being generated based on the historical context, positive samples, and negative samples of the target object, the historical context being used to represent the historical resource selection behavior of the target object, the positive samples being used to represent samples in which the target object made historical resource selections, and the negative samples being used to represent samples in which the target object did not make historical resource selections.
[0193] In an exemplary embodiment, the above training operation includes: for each training sample in the preference training sample set, calculating the log probability difference between the initial model and the reference model on the positive sample and the negative sample, respectively, wherein the log probability difference is used to quantify the confidence difference of the model on the positive sample and the negative sample, and the reference model is a baseline model with fixed parameters; constructing a graded weighted loss function based on the log probability value, wherein the parameters in the graded weighted loss function are composed of preference optimization loss parameters corresponding to different preference levels; using the graded weighted loss function and adjusting the parameters of the initial model by gradient descent until the training of the initial model meets a preset convergence condition to obtain the target model.
[0194] In an exemplary embodiment, the second generation module 46 generates resource recommendation parameters based on the current decision context and the preference feature vector in the following manner: by using the sensitivity parameters in the preference feature vector corresponding to the preset resource screening conditions, a segmented guided screening operation is performed on the candidate resource set to generate the resource recommendation parameters, wherein the sensitivity parameters include distance sensitivity, price sensitivity and time sensitivity, and the candidate resource set includes candidate resources corresponding to the current decision context.
[0195] In an exemplary embodiment, the second generation module 46 generates the resource recommendation parameters by performing a segmented guided filtering operation on the candidate resource set using the sensitivity parameters in the preference feature vector corresponding to the preset resource filtering conditions, in the following manner: filtering a first candidate resource set that satisfies a detour constraint from the candidate resource set, wherein the detour constraint is a distance threshold determined based on the distance sensitivity; filtering a second candidate resource set that satisfies a price constraint from the first candidate resource set, wherein the price constraint is a price threshold determined based on the price sensitivity; filtering a third candidate resource set that satisfies a time constraint from the second candidate resource set, wherein the time constraint is a waiting time threshold determined based on the time sensitivity; sorting the candidate resources in the third candidate resource set to select the target resource from the sorting results; generating recommendation parameters corresponding to the resource information of the target resource, thereby obtaining the resource recommendation parameters, wherein the resource information includes at least one of the following: location information of the target resource, path adjustment information to the target resource, cost prompt information of the target resource, and explanatory information for recommending the target resource.
[0196] In an exemplary embodiment, the above-described apparatus is further configured to generate resource recommendation parameters based on the current decision context and the preference feature vector, then display the resource recommendation parameters to the target object, and when the target object triggers the resource recommendation parameters, obtain interactive feedback information of the target object on the resource recommendation parameters; and adjust the preference feature vector using the interactive feedback information.
[0197] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0198] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the steps in any of the above method embodiments when it is run.
[0199] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0200] According to another aspect of the embodiments of this application, a vehicle is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is configured to perform the steps of any of the method embodiments described above via the computer program. In an exemplary embodiment, the vehicle may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0201] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0202] According to another aspect of the embodiments of this application, a computer program product is also provided, which includes a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0203] Figure 5 A schematic block diagram of a computer system architecture for implementing embodiments of this application is shown. Figure 5As shown, the computer system includes a Central Processing Unit (CPU) 501, which performs various appropriate actions and processes based on programs stored in ROM 502 or loaded into RAM 503 from storage section 508. Random access memory 503 also stores various programs and data required for system operation. The CPU 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.
[0204] The following components are connected to I / O interface 505: input section 506 including keyboard, mouse, etc.; output section 507 including cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; storage section 508 including hard disk, etc.; and communication section 509 including network interface card, modem, etc. Communication section 509 performs communication processing via a network such as the Internet. Drive 510 is also connected to I / O interface 505 as needed. Removable media 511, such as disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 510 as needed so that computer programs read from them can be installed into storage section 508 as needed.
[0205] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions defined in the system of this application.
[0206] It should be noted that, Figure 5 The computer system of the vehicle shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0207] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0208] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for generating resource recommendation parameters, characterized in that, include: Construct a current decision context, wherein the current decision context is used to represent the comprehensive characteristics of the target vehicle's real-time vehicle status, resource dynamic information, and historical behavior information of the target object; Generate a preference feature vector for the target object, wherein the preference feature vector is used to quantify the degree of importance the target object attaches to preset resource selection conditions; Resource recommendation parameters are generated based on the current decision context and the preference feature vector, wherein the resource recommendation parameters are used to recommend target resources that serve the target vehicle to the target object.
2. The method according to claim 1, characterized in that, Construct the current decision context, including: When the target vehicle is detected to be in a resource-demanding state, the resource usage status and operating status of the target vehicle are collected to obtain the real-time status of the vehicle. Resource information within a preset range is obtained based on the real-time status of the vehicle to obtain the dynamic resource information; Obtain the resource selection behavior of the target object within a historical time period to obtain the historical behavior information; The real-time vehicle status, the dynamic resource information, and the historical behavior information are sequentially fused and structured to obtain the current decision context.
3. The method according to claim 2, characterized in that, The dynamic resource information includes at least a set of candidate resources, wherein each candidate resource in the set includes at least one of the following information: The current operating status of the candidate resource, the estimated waiting time of the candidate resource, the real-time price of the candidate resource, the road conditions at the location of the candidate resource, and the location of the candidate resource.
4. The method according to claim 1, characterized in that, Generating the preference feature vector of the target object includes: When the target object initiates a resource request, the preference feature vector is obtained by performing forward propagation inference on the real-time state of the vehicle and the historical behavior information through a pre-trained target model. The target model is a model obtained by training an initial model using a preference training sample set. The preference training sample set is generated based on the target object's historical context, positive samples, and negative samples. The historical context represents the target object's historical resource selection behavior, the positive samples represent samples where the target object made historical resource selections, and the negative samples represent samples where the target object did not make historical resource selections.
5. The method according to claim 4, characterized in that, The training operations include: For each training sample in the preference training sample set, the log probability difference between the initial model and the reference model on the positive sample and the negative sample is calculated respectively. The log probability difference is used to quantify the confidence difference of the model on the positive sample and the negative sample. The reference model is a baseline model with fixed parameters. A graded weighted loss function is constructed based on the logarithmic probability value, wherein the parameters in the graded weighted loss function are composed of preference optimization loss parameters corresponding to different preference levels; The target model is obtained by using the graded weighted loss function and adjusting the parameters of the initial model through gradient descent until the training of the initial model meets the preset convergence condition.
6. The method according to claim 1, characterized in that, Resource recommendation parameters are generated based on the current decision context and the preference feature vector, including: Using the sensitivity parameters in the preference feature vector corresponding to the preset resource filtering conditions, a segmented guided filtering operation is performed on the candidate resource set to generate the resource recommendation parameters. The sensitivity parameters include distance sensitivity, price sensitivity, and time sensitivity. The candidate resource set includes candidate resources corresponding to the current decision context.
7. The method according to claim 6, characterized in that, Using the sensitivity parameters in the preference feature vector corresponding to the preset resource filtering conditions, a segmented guided filtering operation is performed on the candidate resource set to generate the resource recommendation parameters, including: A first set of candidate resources that satisfies the detour constraint is selected from the candidate resource set, wherein the detour constraint is a distance threshold determined based on the distance sensitivity; A second set of candidate resources that meets the price constraint is selected from the first set of candidate resources, wherein the price constraint is a price threshold determined based on the price sensitivity; A third set of candidate resources that meets the time constraint is selected from the second set of candidate resources, wherein the time constraint is a waiting time threshold determined based on the time sensitivity; The candidate resources in the third candidate resource set are sorted to select the target resource from the sorting results; Generate recommendation parameters corresponding to the resource information of the target resource to obtain the resource recommendation parameters, wherein the resource information includes at least one of the following: the location information of the target resource, the path adjustment information to the target resource, the cost prompt information of the target resource, and the explanatory information for recommending the target resource.
8. The method according to claim 1, characterized in that, After generating resource recommendation parameters based on the current decision context and the preference feature vector, the method further includes: Display the resource recommendation parameters to the target object, and when the target object triggers the resource recommendation parameters, obtain the target object's interaction feedback information on the resource recommendation parameters; The preference feature vector is adjusted using the interactive feedback information.
9. A device for generating resource recommendation parameters, characterized in that, include: The first construction module is used to construct the current decision context, wherein the current decision context is used to represent the comprehensive characteristics of the target vehicle's real-time vehicle status, resource dynamic information, and the target object's historical behavior information; The first generation module is used to generate the preference feature vector of the target object, wherein the preference feature vector is used to quantify the degree of importance the target object attaches to preset resource screening conditions; The second generation module is used to generate resource recommendation parameters based on the current decision context and the preference feature vector, wherein the resource recommendation parameters are used to recommend target resources that serve the target vehicle to the target object.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 8.
12. A vehicle 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, it implements the steps of the method described in any one of claims 1 to 8.