A car charging pile layout optimization method based on multi-task learning

CN122926313APending Publication Date: 2026-10-16TIANJIN TIEFA TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611111018.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

当能源价格预测任务与用户心理测量任务共享同一参数空间时,不同路径产生的梯度方向冲突导致模型收敛困难,路径系数估计失真

Benefits of technology

第一,将广义多水平结构方程模型与Medusa令牌空间梯度调控机制融合,在多条因果路径共享参数时自动检测梯度冲突,对冲突方向执行分量裁剪,消除路径间梯度相互抵消现象,参数估计过程稳定收敛。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122926313A_ABST
    Figure CN122926313A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on multi-task learning's car charging pile layout optimization method, specifically includes: constructing GSEM, each causal path is a subtask;Individual data and the regional time series prediction data generated by ARIMAX are obtained, and embedded GSEM;GSEM likelihood function is decomposed into multiple subtask likelihood functions, each subtask contains shared parameter;The gradient of each subtask likelihood to shared parameter is calculated, and subtask gradient vector is obtained;Gradient vector is mapped to the Medusa token space formed by observation variable residual;Gradient cosine similarity is calculated in token space, conflict gradient is judged, and conflict component is subtracted;Modulated gradient is inversely mapped back to parameter space, shared parameter is updated, iteration is converged, and standardized effect value is output to adjust charging pile layout parameter.The application fuses GSEM and Medusa token space gradient regulation and control, eliminates multi-path gradient conflict, and improves layout decision precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of charging pile layout optimization technology, and in particular to a method for optimizing the layout of car charging piles based on multi-task learning. Background Technology

[0002] The layout planning of charging stations for new energy vehicles is directly related to user charging convenience and power grid load balance. Existing layout optimization methods mainly rely on macro-indicators such as population density, traffic flow, and the distribution of existing charging facilities, using cluster analysis or integer programming to determine the location of charging stations. These methods ignore users' psychological response mechanisms to charging prices and congestion pricing policies, resulting in a disconnect between the planning scheme and users' actual usage behavior.

[0003] Multi-task learning, capable of simultaneously optimizing multiple related objectives, has been introduced into the field of infrastructure planning in recent years. Some studies have attempted to construct structural equation models to analyze policy acceptance, but traditional structural equation models estimate each path independently, failing to consider the gradient competition problem among multiple causal paths when parameters are shared. When energy price prediction and user psychometric tasks share the same parameter space, conflicts in gradient directions generated by different paths lead to difficulties in model convergence and distorted path coefficient estimation.

[0004] The Medusa model mitigates multi-task conflicts through token space gradient modulation. Existing Medusa methods are mainly aimed at accelerating autoregressive generation in large language models and have not yet been applied to causal path estimation in structural equation models. Introducing gradient modulation mechanisms into the parameter iteration process of generalized multilevel structural equation models to achieve joint optimization of macro-time series prediction and micro-psychological measurement is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] One objective of this invention is to propose a method for optimizing the layout of electric vehicle charging stations based on multi-task learning. This invention introduces the GSEM multi-level structural equation framework and the Medusa token space gradient control mechanism to dynamically detect and modulate gradient conflicts of multiple causal paths, and constructs a continuous iterative parameter optimization process. It has the advantages of high path estimation accuracy, fast multi-task convergence speed, and strong stability of layout decisions.

[0006] A method for optimizing the layout of car charging stations based on multi-task learning according to an embodiment of the present invention includes the following steps: The following steps are performed: Construct a GSEM containing shared latent variables, continuously observed variables, ordered categorical observed variables, and several causal paths, each causal path being a subtask. Acquire individual survey data and regional time-series prediction data. Embed the regional time-series prediction data into the GSEM, which is generated by an ARIMAX model. Decompose the likelihood function of the GSEM into several subtask likelihood functions, each subtask corresponding to a causal path and containing shared parameters. Calculate the gradient of the likelihood function of each subtask with respect to the shared parameters, obtaining several subtask gradient vectors. Map each subtask gradient vector to a Medusa token space, which consists of the residual vectors of all observed variables in the GSEM. Calculate the cosine similarity between any two subtask gradient vectors in the Medusa token space. If the cosine similarity is less than zero, it is considered a conflicting gradient, and the conflicting component is subtracted from the current subtask gradient vector. Inversely map the modulated subtask gradient vector back to the parameter space, update the shared parameters, and repeat until the GSEM likelihood function converges. Output the standardized effect values ​​of each causal path and adjust the charging pile layout parameters based on these standardized effect values.

[0007] Optionally, the construction of the GSEM specifically includes: Define a set of shared latent variables, each representing a psychological construct that cannot be directly observed; define a set of continuously observed variables, each associated with the shared latent variables via a linear function; define a set of ordinal categorical observed variables, each associated with the shared latent variables via a cumulative logit join function, each ordinal categorical observed variable containing at least two level threshold parameters; define a set of exogenous variables, each an exogenous variable being a macro-environmental indicator, where the values ​​of energy price exogenous variables are obtained by fitting the ARIMAX model to historical time-series data and then predicting one step ahead; establish a first-level path set, each first-level path linearly mapping a single exogenous variable to a single shared latent variable, with the weights of the first-level paths being factor loadings; establish a second-level path set, each second-level path linearly mapping a single shared latent variable to a single continuously observed variable, with the weights of the second-level paths being measurement coefficients; establish a third-level path set, each third-level path mapping a single shared latent variable to each level threshold of a single ordinal categorical observed variable via a cumulative logit function, with the third-level paths containing a set of estimable intercept parameters; A fourth-level path set is established, where each fourth-level path linearly maps a source shared latent variable to a target shared latent variable. The weights of the fourth-level paths are structural coefficients, and the directions of the fourth-level paths are pre-specified by the Theory of Planned Behavior. A fifth-level path set is established, where each fifth-level path linearly maps a single shared latent variable to a policy acceptance final variable, which is a continuous observation variable. The weights of the fifth-level paths are causal effect coefficients. All path weights and intercept parameters are initialized to zero-mean normally distributed random numbers. The initial values ​​of all shared latent variables are set to zero vectors. Missing values ​​in all observed variables are replaced with the arithmetic mean of the variables in the sample.

[0008] Optionally, embedding regional time-series prediction data into a GSEM includes the following steps: The process involves: acquiring historical energy price series for each region within a continuous time window, with the time granularity of the historical energy price series matching the collection period of the individual survey data; fitting an ARIMAX model to the historical energy price series for each region, with the exogenous variables of the ARIMAX model including the policy intensity index time series for that region; using the fitted ARIMAX model to predict the energy price value one time step forward, and using this predicted value as the exogenous variable value for that region; using the instantaneous value of the policy intensity index time series for each region at the survey time point as the observed value of the policy intensity index for that region, which is obtained from the local charging pile subsidy policy text through word frequency statistics; matching the predicted energy price value and the observed policy intensity index value for each region to the exogenous variable record for each individual according to their region, with all individuals within the same region sharing the same exogenous variable value; and concatenating the matched exogenous variable values ​​with the continuous and ordered categorical observed variables at the individual level to form a complete observation vector.

[0009] Optionally, the decomposition of the GSEM likelihood function into several sub-task likelihood functions, each sub-task corresponding to a causal path, and each sub-task containing shared parameters specifically include: Iterate through all first-level paths in the GSEM, creating a subtask object for each path. This subtask object stores the factor loading parameters for this path, which are shared parameters. Iterate through all second-level paths in the GSEM, creating a subtask object for each path. This subtask object stores the measurement coefficient parameters for this path, which are shared parameters. Iterate through all third-level paths in the GSEM, creating a subtask object for each path. This subtask object stores a set of rank threshold parameters for this path, which are shared parameters. Iterate through all fourth-level paths in the GSEM, creating a subtask object for each path. This subtask object stores the structural coefficient parameters for this path, which are shared parameters. Traverse all fifth-layer paths in the GSEM, creating a subtask object for each path. This subtask object stores the causal effect coefficient parameter for that path, which is used as a shared parameter. Calculate the subtask likelihood function value for each subtask object. The first and second layer subtasks use a normal distribution likelihood function, the third layer subtask uses a cumulative Logit distribution likelihood function, and the fourth and fifth layer subtasks use a multivariate normal distribution likelihood function. Multiply the likelihood function values ​​of all subtask objects to obtain the overall likelihood function value of the GSEM. Optionally, calculating the gradient of the likelihood function of each subtask with respect to the shared parameters includes the following steps: For each subtask object, the subtask likelihood function is converted to logarithmic form to obtain the subtask log-likelihood function. The first-order partial derivative is calculated for each shared parameter in the subtask log-likelihood function, with one partial derivative corresponding to one shared parameter. Each subtask object stores a set of partial derivatives. When the subtask object corresponds to the first or second level path, the partial derivative is calculated using the first-order derivative form of the normal distribution log-likelihood. When the subtask object corresponds to the third level path, the partial derivative is calculated using the first-order derivative form of the cumulative logit distribution log-likelihood. When the subtask object corresponds to the fourth or fifth level path, the partial derivative is calculated using the first-order derivative form of the multivariate normal distribution log-likelihood. The partial derivatives of all subtask objects with respect to the same shared parameter are collected, with each shared parameter corresponding to a gradient vector. The dimension of this gradient vector is equal to the number of subtasks containing the shared parameter.

[0010] Optionally, mapping each subtask gradient vector to the Medusa token space, where the Medusa token space is composed of the residual vectors of all observed variables in the GSEM, specifically includes: Extract the current values ​​of all observed variables from the GSEM, including continuous, ordered categorical, and exogenous variables. Calculate the residual for each observed variable, which equals the current value minus the predicted value of that observed variable under the current parameters of the GSEM. The predicted value is obtained through forward propagation. Concatenate the residuals of all observed variables into a one-dimensional vector in a fixed order. This one-dimensional vector is defined as a token vector in the Medusa token space. Construct a Jacobian matrix for each subtask. The rows of the Jacobian matrix correspond to the partial derivatives of the subtask's likelihood function with respect to shared parameters, the columns correspond to the residuals of each observed variable, and each element of the Jacobian matrix is ​​the partial derivative of the partial derivative with respect to the residual. Multiply the gradient vector of the subtask by the Jacobian matrix of that subtask on the left to obtain the gradient representation vector of that subtask in the Medusa token space. The dimension of the gradient representation vector is equal to the dimension of the observed variable residuals.

[0011] Optionally, calculating the cosine similarity of the gradient vectors of any two subtasks in the Medusa token space includes the following steps: Extract the gradient representation vectors of two subtasks from the Medusa token space, denoted as the first vector and the second vector, respectively. Calculate the magnitude of the first vector, which is equal to the square root of the sum of the squares of its elements. Calculate the magnitude of the second vector, which is equal to the square root of the sum of the squares of its elements. Calculate the dot product of the first and second vectors, which is equal to the sum of the products of their corresponding elements. Divide the dot product by the product of the magnitudes of the first and second vectors to obtain the cosine similarity value. If the cosine similarity value is less than zero, a gradient conflict is determined between the first and second vectors; if the cosine similarity value is greater than or equal to zero, no gradient conflict is determined between the first and second vectors.

[0012] Optionally, the output of the standardized effect values ​​of each causal path, and the adjustment of the charging pile layout parameters based on the standardized effect values, specifically includes: The causal effect coefficient estimates for each fifth-layer path are read from the converged GSEM. Each causal effect coefficient estimate is divided by the sample standard deviation of the corresponding shared latent variable to obtain the standardized effect value. The shared latent variable with the largest standardized effect value is taken as the main influencing factor. When the main influencing factor is the cognitive bias of usage cost, the current charging unit price is multiplied by one-tenth of the standardized effect value and rounded down to obtain a price reduction value, which is then subtracted from the current charging unit price. When the main influencing factor is attitude, the current proportion of AC charging piles is multiplied by one-tenth of the standardized effect value and rounded up to obtain a proportion increase value, which is then added to the current proportion of AC charging piles. When the main influencing factor is subjective norms or perceived behavioral control, the current density of shared charging piles in the community is multiplied by one-tenth of the standardized effect value and rounded up to obtain a density increase value, which is then added to the current density. The updated charging unit price, AC charging pile proportion, and community shared charging pile density are output as the final layout plan.

[0013] The beneficial effects of this invention are: First, the generalized multilevel structural equation model is integrated with the Medusa token space gradient control mechanism. When multiple causal paths share parameters, gradient conflicts are automatically detected, and component pruning is performed on the conflict direction to eliminate the phenomenon of gradient cancellation between paths, and the parameter estimation process converges stably.

[0014] Second, a token space residual mapping strategy is adopted to uniformly express the gradients of continuous and ordered categorical observation variables in GSEM in the residual vector space, thereby avoiding the interference of differences in the gradient dimensions of variables at different scales on parameter updates and improving the accuracy of path coefficient estimation.

[0015] Third, by embedding ARIMAX macro-time series forecasts as exogenous variables into GSEM, cross-level joint modeling of the dynamic environment of energy prices and individual psychometric data can be achieved, enabling the charging pile layout scheme to proactively adapt to price fluctuation trends.

[0016] Fourth, based on the standardized effect value, the main influencing factors are automatically identified, and the charging unit price, the proportion of AC charging piles or the density of community shared charging piles are adjusted in a differentiated manner. The layout optimization results are policy interpretable and targeted.

[0017] Fifth, the entire estimation process requires no manual intervention in gradient weight tuning, conflict modulation operations only occur during the training phase, and there is zero additional overhead during the inference phase, making it suitable for batch charging pile planning tasks in multiple cities and policy scenarios. Attached Figure Description

[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a method for optimizing the layout of electric vehicle charging stations based on multi-task learning proposed in this invention. Figure 2 This is a schematic diagram of the GSEM five-layer path of the electric vehicle charging pile layout optimization method proposed in this invention based on multi-task learning. Figure 3 This is a schematic diagram of Medusa token spatial gradient modulation for a multi-task learning-based method for optimizing the layout of car charging stations proposed in this invention. Detailed Implementation

[0019] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0020] refer to Figures 1-3 A method for optimizing the layout of car charging stations based on multi-task learning includes the following steps: The following steps are performed: Construct a GSEM containing shared latent variables, continuously observed variables, ordered categorical observed variables, and several causal paths, each causal path being a subtask. Acquire individual survey data and regional time-series prediction data. Embed the regional time-series prediction data into the GSEM, which is generated by an ARIMAX model. Decompose the likelihood function of the GSEM into several subtask likelihood functions, each subtask corresponding to a causal path and containing shared parameters. Calculate the gradient of the likelihood function of each subtask with respect to the shared parameters, obtaining several subtask gradient vectors. Map each subtask gradient vector to a Medusa token space, which consists of the residual vectors of all observed variables in the GSEM. Calculate the cosine similarity between any two subtask gradient vectors in the Medusa token space. If the cosine similarity is less than zero, it is considered a conflicting gradient, and the conflicting component is subtracted from the current subtask gradient vector. Inversely map the modulated subtask gradient vector back to the parameter space, update the shared parameters, and repeat until the GSEM likelihood function converges. Output the standardized effect values ​​of each causal path and adjust the charging pile layout parameters based on these standardized effect values.

[0021] In this embodiment, constructing a GSEM specifically includes: Define a set of shared latent variables, each representing a psychological construct that cannot be directly observed; define a set of continuously observed variables, each associated with the shared latent variables via a linear function; define a set of ordinal categorical observed variables, each associated with the shared latent variables via a cumulative logit join function, each ordinal categorical observed variable containing at least two level threshold parameters; define a set of exogenous variables, each an exogenous variable being a macro-environmental indicator, where the values ​​of energy price exogenous variables are obtained by fitting the ARIMAX model to historical time-series data and then predicting one step ahead; establish a first-level path set, each first-level path linearly mapping a single exogenous variable to a single shared latent variable, with the weights of the first-level paths being factor loadings; establish a second-level path set, each second-level path linearly mapping a single shared latent variable to a single continuously observed variable, with the weights of the second-level paths being measurement coefficients; establish a third-level path set, each third-level path mapping a single shared latent variable to each level threshold of a single ordinal categorical observed variable via a cumulative logit function, with the third-level paths containing a set of estimable intercept parameters; A fourth-level path set is established, where each fourth-level path linearly maps a source shared latent variable to a target shared latent variable. The weights of the fourth-level paths are structural coefficients, and the directions of the fourth-level paths are pre-specified by the Theory of Planned Behavior. A fifth-level path set is established, where each fifth-level path linearly maps a single shared latent variable to a policy acceptance final variable, which is a continuous observation variable. The weights of the fifth-level paths are causal effect coefficients. All path weights and intercept parameters are initialized to zero-mean normally distributed random numbers. The initial values ​​of all shared latent variables are set to zero vectors. Missing values ​​in all observed variables are replaced with the arithmetic mean of the variables in the sample.

[0022] Here, a set of shared latent variables is defined, each representing a psychological construct that cannot be directly observed, specifically including: Four shared latent variables are defined: the first, named "Attitude," represents the user's overall evaluation tendency towards charging behavior of new energy vehicles; the second, named "Subjective Norms," ​​represents the degree to which the user's perceived social pressure or the expectations of others influence their charging decisions; the third, named "Perceived Behavioral Control," represents the user's subjective judgment of the resources and obstacles required to complete their charging behavior; and the fourth, named "Usage Cost Perception Bias," represents the degree of deviation between the user's actual expenditure on charging prices and congestion fees and their psychological expectations. Each shared latent variable is assigned a continuously taking real variable, ranging from negative infinity to positive infinity. The initial value of each shared latent variable is set to zero. In each iteration step, the updated value of the shared latent variable is jointly determined by the mapping value of the exogenous variable through the first-level path and the mapping value of the source latent variable passed through the fourth-level path.

[0023] Specifically, a set of continuously observed variables is defined, and each continuously observed variable is associated with a shared latent variable through a linear function. Shared latent variables are psychological constructs that cannot be directly observed. They are indirectly estimated through multiple observed variables and are simultaneously predicted by multiple exogenous variables in the model, thus influencing multiple final variables. Three continuous observed variables are set. The first continuous observed variable is named the willingness to pay value, which represents the maximum amount that a user is willing to pay for a single charging session, in yuan. The second continuous observation variable is named the number of times a user charges per week, which represents the number of times a user actually charges in the past seven days. The third continuous observation variable is named the annual household income, representing the user's household's total income in the previous year, in ten thousand yuan. A shared latent variable is assigned to each continuous observation variable: the willingness to pay is associated with the cognitive bias of usage cost, the number of times charging per week is associated with attitude, and the annual household income is associated with perceived behavioral control. A linear function is constructed for each continuous observation variable, containing an intercept term and a measurement coefficient. The measurement coefficient is multiplied by the current value of the shared latent variable and added to the intercept term to obtain the predicted value of that continuous observation variable. The measurement coefficient of each continuous observation variable is used as a shared parameter and updated during iteration. The intercept term of each continuous observation variable is used as a fixed parameter, initialized to the arithmetic mean of the variable in the sample and then remaining unchanged.

[0024] Each exogenous variable, specifically a macroeconomic environmental indicator, includes: Two exogenous variables are defined: the first exogenous variable is named the energy price forecast, and the second exogenous variable is named the policy intensity index. Energy price forecasts are obtained by fitting historical energy price time-series data to the ARIMAX model and then making a forward prediction. The exogenous variables of the ARIMAX model include the policy intensity index time series. The policy intensity index is obtained by calculating the word frequency statistics of local charging pile subsidy policy texts. The steps of word frequency statistics are as follows: extract keywords related to subsidy amount, number of constructions, and preferential use in the policy text, calculate the proportion of the number of times the keywords appear to the total number of words, multiply the proportion by 100 and round it to obtain the policy intensity index.

[0025] In this embodiment, embedding regional time series prediction data into GSEM includes the following steps: The process involves: acquiring historical energy price series for each region within a continuous time window, with the time granularity of the historical energy price series matching the collection period of the individual survey data; fitting an ARIMAX model to the historical energy price series for each region, with the exogenous variables of the ARIMAX model including the policy intensity index time series for that region; using the fitted ARIMAX model to predict the energy price value one time step forward, and using this predicted value as the exogenous variable value for that region; using the instantaneous value of the policy intensity index time series for each region at the survey time point as the observed value of the policy intensity index for that region, which is obtained from the local charging pile subsidy policy text through word frequency statistics; matching the predicted energy price value and the observed policy intensity index value for each region to the exogenous variable record for each individual according to their region, with all individuals within the same region sharing the same exogenous variable value; and concatenating the matched exogenous variable values ​​with the continuous and ordered categorical observed variables at the individual level to form a complete observation vector.

[0026] In this embodiment, the likelihood function of GSEM is decomposed into several sub-task likelihood functions, each sub-task corresponding to a causal path, and each sub-task contains shared parameters, specifically including: Iterate through all first-level paths in the GSEM, creating a subtask object for each path. This subtask object stores the factor loading parameters for this path, which are shared parameters. Iterate through all second-level paths in the GSEM, creating a subtask object for each path. This subtask object stores the measurement coefficient parameters for this path, which are shared parameters. Iterate through all third-level paths in the GSEM, creating a subtask object for each path. This subtask object stores a set of rank threshold parameters for this path, which are shared parameters. Iterate through all fourth-level paths in the GSEM, creating a subtask object for each path. This subtask object stores the structural coefficient parameters for this path, which are shared parameters. Traverse all fifth-level paths in the GSEM, creating a subtask object for each path. This subtask object stores the causal effect coefficient parameter for that path, which is used as a shared parameter. Calculate the subtask likelihood function value for each subtask object. The first and second level subtasks use a normal distribution likelihood function, the third level subtask uses a cumulative Logit distribution likelihood function, and the fourth and fifth level subtasks use a multivariate normal distribution likelihood function. Multiply the likelihood function values ​​of all subtask objects to obtain the overall likelihood function value of the GSEM. In this embodiment, calculating the gradient of the likelihood function of each subtask with respect to the shared parameter includes the following steps: For each subtask object, the subtask likelihood function is converted to logarithmic form to obtain the subtask log-likelihood function. The first-order partial derivative is calculated for each shared parameter in the subtask log-likelihood function, with one partial derivative corresponding to one shared parameter. Each subtask object stores a set of partial derivatives. When the subtask object corresponds to the first or second level path, the partial derivative is calculated using the first-order derivative form of the normal distribution log-likelihood. When the subtask object corresponds to the third level path, the partial derivative is calculated using the first-order derivative form of the cumulative logit distribution log-likelihood. When the subtask object corresponds to the fourth or fifth level path, the partial derivative is calculated using the first-order derivative form of the multivariate normal distribution log-likelihood. The partial derivatives of all subtask objects with respect to the same shared parameter are collected, with each shared parameter corresponding to a gradient vector. The dimension of this gradient vector is equal to the number of subtasks containing the shared parameter.

[0027] In this embodiment, the gradient vector of each subtask is mapped to the Medusa token space, which is composed of the residual vectors of all observed variables in the GSEM. Specifically, it includes: Extract the current values ​​of all observed variables from the GSEM, including continuous, ordered categorical, and exogenous variables. Calculate the residual for each observed variable, which equals the current value minus the predicted value of that observed variable under the current parameters of the GSEM. The predicted value is obtained through forward propagation. Concatenate the residuals of all observed variables into a one-dimensional vector in a fixed order. This one-dimensional vector is defined as a token vector in the Medusa token space. Construct a Jacobian matrix for each subtask. The rows of the Jacobian matrix correspond to the partial derivatives of the subtask's likelihood function with respect to shared parameters, the columns correspond to the residuals of each observed variable, and each element of the Jacobian matrix is ​​the partial derivative of the partial derivative with respect to the residual. Multiply the gradient vector of the subtask by the Jacobian matrix of that subtask on the left to obtain the gradient representation vector of that subtask in the Medusa token space. The dimension of the gradient representation vector is equal to the dimension of the observed variable residuals.

[0028] In this embodiment, calculating the cosine similarity of the gradient vectors of any two subtasks in the Medusa token space includes the following steps: Extract the gradient representation vectors of two subtasks from the Medusa token space, denoted as the first vector and the second vector, respectively. Calculate the magnitude of the first vector, which is equal to the square root of the sum of the squares of its elements. Calculate the magnitude of the second vector, which is equal to the square root of the sum of the squares of its elements. Calculate the dot product of the first and second vectors, which is equal to the sum of the products of their corresponding elements. Divide the dot product by the product of the magnitudes of the first and second vectors to obtain the cosine similarity value. If the cosine similarity value is less than zero, a gradient conflict is determined between the first and second vectors; if the cosine similarity value is greater than or equal to zero, no gradient conflict is determined between the first and second vectors.

[0029] In this embodiment, the standardized effect value of each causal path is output, and the charging pile layout parameters are adjusted according to the standardized effect value, specifically including: The causal effect coefficient estimates for each fifth-layer path are read from the converged GSEM. Each causal effect coefficient estimate is divided by the sample standard deviation of the corresponding shared latent variable to obtain the standardized effect value. The shared latent variable with the largest standardized effect value is taken as the main influencing factor. When the main influencing factor is the cognitive bias of usage cost, the current charging unit price is multiplied by one-tenth of the standardized effect value and rounded down to obtain a price reduction value, which is then subtracted from the current charging unit price. When the main influencing factor is attitude, the current proportion of AC charging piles is multiplied by one-tenth of the standardized effect value and rounded up to obtain a proportion increase value, which is then added to the current proportion of AC charging piles. When the main influencing factor is subjective norms or perceived behavioral control, the current density of shared charging piles in the community is multiplied by one-tenth of the standardized effect value and rounded up to obtain a density increase value, which is then added to the current density. The updated charging unit price, AC charging pile proportion, and community shared charging pile density are output as the final layout plan.

[0030] Example 1: A city plans to build a number of charging stations in its main urban area to cope with the increasing number of new energy vehicles. Initial planning focused on population density and traffic flow, but after operation, it was found that some charging stations had low utilization rates, while long queues formed at popular charging stations during peak hours. User surveys showed that many car owners complained about the high cost of charging and that congestion fees discouraged them from entering the city center. This indicates that policy acceptance and perceived costs significantly impacted actual charging behavior. Relying solely on macro indicators cannot explain these micro-level psychological differences, leading to a disconnect between the planned deployment and actual user needs.

[0031] This method first collects two types of data in the city: one is individual-level survey data, including weekly charging frequency, annual household income, willingness to pay, and ratings on charging satisfaction and policy support for 530 car owners; the other is regional-level time-series data, namely the monthly energy prices and policy intensity indices of each administrative district over the past two years. Using the ARIMAX model, energy prices are projected one month in advance to obtain the predicted electricity price for each district. Taking one typical district as an example, the predicted electricity price will rise from the current 0.58 yuan per kilowatt-hour to 0.63 yuan per kilowatt-hour.

[0032] When constructing the GSEM, cost perception bias, attitude, subjective norms, and perceived behavioral control were set as shared latent variables. Continuous observation variables included willingness to pay and weekly charging frequency; ordered categorical observation variables included satisfaction level (low, medium, high), policy support level, and congestion fee acceptance level. Exogenous variables were the predicted energy price (0.63 yuan per kWh) and the policy intensity index (0.72). After establishing the five-layer path, all parameters were initialized with zero-mean normal randomization, and missing values ​​were replaced with the sample mean.

[0033] The likelihood function is decomposed into 15 subtasks (5 first-level paths, 3 second-level paths, 3 third-level paths, 2 fourth-level paths, and 2 fifth-level paths). The gradient of each subtask is calculated. For example, the initial gradient of the first-level path "energy price → usage cost perception bias" is -0.12, while the gradient of the second-level path "usage cost perception bias → willingness to pay" is 0.09. The angle between the two paths on shared parameters is greater than 90 degrees. The gradient vectors are mapped to the Medusa token space, where the token vectors are concatenated from the residuals of all observed variables. A cosine similarity of -0.34 indicates a conflicting gradient. The conflicting component is subtracted from the positive gradient to obtain a modulated gradient of 0.02. After inverse mapping, the shared parameters are updated. After 47 iterations, the GSEM likelihood function converges.

[0034] Standardized effect values ​​were output: the standardized effect value of the cost perception bias on policy acceptance was 0.56, attitude was 0.31, subjective norms were 0.18, and perceived behavioral control was 0.15. The cost perception bias, with the largest effect value, was selected as the main influencing factor. The current charging price of 0.58 yuan per kWh was multiplied by one-tenth of 0.56 (0.056) and rounded down to 0.05 yuan, resulting in a reduced price of 0.53 yuan per kWh. Simultaneously, due to the secondary effect of attitude, the proportion of AC charging piles was increased from 30% to 33%. The density of shared charging piles in communities was increased from 2.4 per square kilometer to 2.7 per square kilometer.

[0035] The above scheme was compared with three traditional methods in a simulation environment. Traditional method one is based solely on population density clustering, traditional method two is based on traffic flow integer programming, and traditional method three uses only structural equation modeling without introducing gradient control. Evaluation indicators included average pile utilization rate over one month, peak-hour queuing time, and overall user satisfaction (out of 100). The table below lists the comparison results.

[0036] Table 1: Performance Comparison of Different Layout Optimization Methods in a Certain City

[0037] The data in the table above shows that the average utilization rate of charging stations using the traditional method one is only 43%, with a peak queue time of 14.2 minutes and a user satisfaction score of 62. This is because it completely ignores users' psychological responses, and the distribution of charging stations is out of sync with actual demand. The traditional method two, by incorporating traffic flow, increases the utilization rate to 51%, reduces the queue time to 11.5 minutes, and achieves a satisfaction score of 68. However, it still does not solve the problem of cost perception bias, as users sensitive to congestion fees during peak hours still avoid charging in the city center. The traditional method three uses a structural equation model but does not perform gradient modulation. Parameter estimation is affected by multiple conflicting paths, resulting in a utilization rate of only 55%, a queue time of 9.8 minutes, and a satisfaction score of 73. For example, the gradients of the two paths "energy price → perception bias" and "perception bias → acceptance" cancel each other out on shared latent variables, leading to convergence to a local suboptimal point.

[0038] This invention utilizes Medusa token space dynamic detection to prune conflicting gradients, ensuring shared parameters are updated in a direction beneficial to both tasks. The final utilization rate reached 68%, a 13 percentage point improvement over the traditional method three; queuing time was reduced to 5.3 minutes, a 4.5-minute reduction compared to the traditional method three; and user satisfaction reached 86 points, a 13-point improvement. Specifically, among 530 surveyed car owners, the proportion who considered charging "at an acceptable price" increased from 41% before implementation to 67%; the proportion indicating "willingness to charge in the city center during peak hours" increased from 28% to 52%. Simultaneously, after adjusting the energy price forecast from 0.63 yuan, simulations showed that the average charging load distribution variation coefficient in the area decreased from 0.31 to 0.19 over the next three months, indicating a more balanced spatial distribution of charging demand. These data fully validate the practical effectiveness of this invention in resolving multi-path gradient conflicts and improving the accuracy of layout decisions.

[0039] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for optimizing the layout of electric vehicle charging stations based on multi-task learning, characterized in that, Includes the following steps: Construct a GSEM containing shared latent variables, continuously observed variables, ordered categorical observed variables, and several causal paths, each causal path being a subtask; acquire individual survey data and regional time-series prediction data, embedding the regional time-series prediction data into the GSEM, which is generated by an ARIMAX model; decompose the likelihood function of the GSEM into several subtask likelihood functions, each subtask corresponding to a causal path, and each subtask containing shared parameters; calculate the gradient of the likelihood function of each subtask with respect to the shared parameters, obtaining several subtask gradient vectors; Each subtask gradient vector is mapped to the Medusa token space, which consists of the residual vectors of all observed variables in the GSEM. The cosine similarity between any two subtask gradient vectors is calculated in the Medusa token space. If the cosine similarity is less than zero, it is determined to be a conflicting gradient, and the conflicting component is subtracted from the current subtask gradient vector. The modulated subtask gradient vectors are inversely mapped back to the parameter space, the shared parameters are updated, and this process is repeated until the GSEM likelihood function converges. The standardized effect values ​​of each causal path are then output, and the charging pile layout parameters are adjusted based on the standardized effect values.

2. The method for optimizing the layout of electric vehicle charging stations based on multi-task learning according to claim 1, characterized in that, The construction of the GSEM specifically includes: Define a set of shared latent variables, each representing a psychological construct that cannot be directly observed; define a set of continuously observed variables, each associated with the shared latent variables via a linear function; define a set of ordinal categorical observed variables, each associated with the shared latent variables via a cumulative logit join function, each ordinal categorical observed variable containing at least two level threshold parameters; define a set of exogenous variables, each an exogenous variable being a macro-environmental indicator, where the values ​​of energy price exogenous variables are obtained by fitting the ARIMAX model to historical time-series data and then predicting one step ahead; establish a first-level path set, each first-level path linearly mapping a single exogenous variable to a single shared latent variable, with the weights of the first-level paths being factor loadings; establish a second-level path set, each second-level path linearly mapping a single shared latent variable to a single continuously observed variable, with the weights of the second-level paths being measurement coefficients; establish a third-level path set, each third-level path mapping a single shared latent variable to each level threshold of a single ordinal categorical observed variable via a cumulative logit function, with the third-level paths containing a set of estimable intercept parameters; A fourth-level path set is established, where each fourth-level path linearly maps a source shared latent variable to a target shared latent variable. The weights of the fourth-level paths are structural coefficients, and the directions of the fourth-level paths are pre-specified by the Theory of Planned Behavior. A fifth-level path set is established, where each fifth-level path linearly maps a single shared latent variable to a policy acceptance final variable, which is a continuous observation variable. The weights of the fifth-level paths are causal effect coefficients. All path weights and intercept parameters are initialized to zero-mean normally distributed random numbers. The initial values ​​of all shared latent variables are set to zero vectors. Missing values ​​in all observed variables are replaced with the arithmetic mean of the variables in the sample.

3. The method for optimizing the layout of electric vehicle charging stations based on multi-task learning according to claim 2, characterized in that, Embedding regional time-series prediction data into a GSEM includes the following steps: The process involves: acquiring historical energy price series for each region within a continuous time window, with the time granularity of the historical energy price series matching the collection period of the individual survey data; fitting an ARIMAX model to the historical energy price series for each region, with the exogenous variables of the ARIMAX model including the policy intensity index time series for that region; using the fitted ARIMAX model to predict the energy price value one time step forward, and using this predicted value as the exogenous variable value for that region; using the instantaneous value of the policy intensity index time series for each region at the survey time point as the observed value of the policy intensity index for that region, which is obtained from the local charging pile subsidy policy text through word frequency statistics; matching the predicted energy price value and the observed policy intensity index value for each region to the exogenous variable record for each individual according to their region, with all individuals within the same region sharing the same exogenous variable value; and concatenating the matched exogenous variable values ​​with the continuous and ordered categorical observed variables at the individual level to form a complete observation vector.

4. The method for optimizing the layout of car charging stations based on multi-task learning according to claim 3, characterized in that, The likelihood function of GSEM is decomposed into several sub-task likelihood functions, each sub-task corresponding to a causal path, and each sub-task contains shared parameters, specifically including: Traverse all first-level paths in GSEM and create a subtask object for each first-level path. This subtask object stores the factor loading parameters for this path, and the factor loading parameters are shared parameters. Traverse all second-level paths in GSEM and create a subtask object for each second-level path. This subtask object stores the measurement coefficient parameters for this path, and the measurement coefficient parameters are shared parameters. Traverse all third-level paths in GSEM and create a subtask object for each third-level path. This subtask object stores a set of level threshold parameters for this path, and this set of level threshold parameters is used as shared parameters. Traverse all fourth-level paths in GSEM and create a subtask object for each fourth-level path. This subtask object stores the structural coefficient parameters of this path, and the structural coefficient parameters are shared parameters. Traverse all fifth-level paths in GSEM, create a subtask object for each fifth-level path, and store the causal effect coefficient parameter for this path. The causal effect coefficient parameter is used as a shared parameter. Calculate the subtask likelihood function value for each subtask object. The first and second level subtasks use the normal distribution likelihood calculation function, the third level subtask uses the cumulative Logit distribution likelihood calculation function, and the fourth and fifth level subtasks use the multivariate normal distribution likelihood calculation function. Multiply the likelihood function values ​​of all subtask objects to obtain the overall likelihood function value of GSEM.

5. The method for optimizing the layout of car charging stations based on multi-task learning according to claim 4, characterized in that, The calculation of the gradient of the likelihood function of each subtask with respect to the shared parameters includes the following steps: For each subtask object, the subtask likelihood function is converted to logarithmic form to obtain the subtask log-likelihood function. The first-order partial derivative is calculated for each shared parameter in the subtask log-likelihood function, with one partial derivative corresponding to one shared parameter. Each subtask object stores a set of partial derivatives. When the subtask object corresponds to the first or second level path, the partial derivative is calculated using the first-order derivative form of the normal distribution log-likelihood. When the subtask object corresponds to the third level path, the partial derivative is calculated using the first-order derivative form of the cumulative logit distribution log-likelihood. When the subtask object corresponds to the fourth or fifth level path, the partial derivative is calculated using the first-order derivative form of the multivariate normal distribution log-likelihood. The partial derivatives of all subtask objects with respect to the same shared parameter are collected, with each shared parameter corresponding to a gradient vector. The dimension of this gradient vector is equal to the number of subtasks containing the shared parameter.

6. The method for optimizing the layout of car charging stations based on multi-task learning according to claim 5, characterized in that, The step of mapping each subtask gradient vector to the Medusa token space, which is composed of the residual vectors of all observed variables in the GSEM, specifically includes: Extract the current values ​​of all observed variables from the GSEM, including continuous, ordered categorical, and exogenous variables. Calculate the residual for each observed variable, which equals the current value minus the predicted value of that observed variable under the current parameters of the GSEM. The predicted value is obtained through forward propagation. Concatenate the residuals of all observed variables into a one-dimensional vector in a fixed order. This one-dimensional vector is defined as a token vector in the Medusa token space. Construct a Jacobian matrix for each subtask. The rows of the Jacobian matrix correspond to the partial derivatives of the subtask's likelihood function with respect to shared parameters, the columns correspond to the residuals of each observed variable, and each element of the Jacobian matrix is ​​the partial derivative of the partial derivative with respect to the residual. Multiply the gradient vector of the subtask by the Jacobian matrix of that subtask on the left to obtain the gradient representation vector of that subtask in the Medusa token space. The dimension of the gradient representation vector is equal to the dimension of the observed variable residuals.

7. The method for optimizing the layout of electric vehicle charging stations based on multi-task learning according to claim 6, characterized in that, The calculation of the cosine similarity between the gradient vectors of any two subtasks in the Medusa token space includes the following steps: Extract the gradient representation vectors of two subtasks from the Medusa token space, denoted as the first vector and the second vector, respectively. Calculate the magnitude of the first vector, which is equal to the square root of the sum of the squares of its elements. Calculate the magnitude of the second vector, which is equal to the square root of the sum of the squares of its elements. Calculate the dot product of the first and second vectors, which is equal to the sum of the products of their corresponding elements. Divide the dot product by the product of the magnitudes of the first and second vectors to obtain the cosine similarity value. If the cosine similarity value is less than zero, a gradient conflict is determined between the first and second vectors. If the cosine similarity value is greater than or equal to zero, no gradient conflict is determined between the first and second vectors.

8. The method for optimizing the layout of electric vehicle charging stations based on multi-task learning according to claim 7, characterized in that, The standardized effect values ​​of each causal path are output, and the charging pile layout parameters are adjusted based on the standardized effect values, specifically including: The causal effect coefficient estimates for each fifth-layer path are read from the converged GSEM. Each causal effect coefficient estimate is divided by the sample standard deviation of the corresponding shared latent variable to obtain the standardized effect value. The shared latent variable with the largest standardized effect value is taken as the main influencing factor. When the main influencing factor is the cognitive bias of usage cost, the current charging unit price is multiplied by one-tenth of the standardized effect value and rounded down to obtain a price reduction value, which is then subtracted from the current charging unit price. When the main influencing factor is attitude, the current proportion of AC charging piles is multiplied by one-tenth of the standardized effect value and rounded up to obtain a proportion increase value, which is then added to the current proportion of AC charging piles. When the main influencing factor is subjective norms or perceived behavioral control, the current density of shared charging piles in the community is multiplied by one-tenth of the standardized effect value and rounded up to obtain a density increase value, which is then added to the current density. The updated charging unit price, AC charging pile proportion, and community shared charging pile density are output as the final layout plan.