Model parameter updating method and device based on vehicle network interaction and electronic equipment

By acquiring the characteristic representation parameters of the target terminal in the vehicle-to-grid interaction scenario, the prediction output and output deviation of the power dispatch model are determined, the update requirement parameters are divided and sent to the corresponding terminals, thus solving the data leakage problem when updating model parameters in the vehicle-to-grid interaction scenario and realizing the collaborative optimization of model parameters and data privacy protection.

CN121997001APending Publication Date: 2026-05-08STATE GRID BEIJING ELECTRIC POWER CO
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID BEIJING ELECTRIC POWER CO
Filing Date
2026-01-21
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

When updating model parameters in a vehicle-to-everything (V2X) interaction scenario, it is necessary to obtain data from multiple parameter subjects for collaborative analysis, which may lead to the risk of data leakage.

Method used

By acquiring the feature representation parameters of multiple target terminals in the vehicle-to-grid interaction scenario, the predicted output and output deviation of the power dispatch model are determined, the update requirement parameters are divided and sent to the corresponding terminals, so as to realize the independent update of model parameters and avoid data interaction.

Benefits of technology

It achieves a balance between collaborative optimization of model parameters and data privacy protection in vehicle-to-everything (V2X) interaction scenarios, reducing the risk of data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121997001A_ABST
    Figure CN121997001A_ABST
Patent Text Reader

Abstract

The invention discloses a model parameter updating method and device based on vehicle network interaction and electronic equipment. The method comprises the following steps: acquiring feature representation parameters corresponding to a plurality of target terminals respectively; according to the feature representation parameters corresponding to the plurality of target terminals, determining prediction output of the power dispatching model; determining a model output deviation according to the prediction output and a reference output of the power dispatching model; determining update demand parameters according to the model output deviation; dividing the update demand parameter into a plurality of sub-demand parameters to obtain update operation parameters corresponding to sub-models corresponding to the plurality of target terminals; and performing model parameter updating on the power dispatching model according to the updating operation parameters of the sub-models corresponding to the plurality of target terminals. According to the method and the device, the technical problem of data leakage caused by the fact that data of multi-party parameter main bodies needs to be acquired for collaborative analysis when model parameter updating is carried out in a vehicle network interaction scene in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information security technology, and more specifically, to a method, apparatus, and electronic device for updating model parameters based on vehicle-to-everything (V2X) interaction. Background Technology

[0002] In related technologies, power dispatching models are the core tools for power resource scheduling in vehicle-to-grid (V2G) scenarios. Updating model parameters ensures that the power dispatching model can optimize power resource allocation and efficient utilization based on actual conditions. However, updating model parameters in these technologies requires collaborative analysis of data from multiple stakeholders, leading to potential data leakage issues.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This invention provides a method, apparatus, and electronic device for updating model parameters based on vehicle-to-everything (V2X) interaction, to at least solve the technical problem in related technologies where updating model parameters in a V2X interaction scenario requires obtaining data from multiple parameter subjects for collaborative analysis, which leads to data leakage.

[0005] According to one aspect of the present invention, a method for updating model parameters based on vehicle-to-grid interaction is provided, comprising: acquiring feature representation parameters corresponding to multiple target terminals in a vehicle-to-grid interaction scenario, wherein the corresponding feature representation parameters are used to represent the terminal features of the corresponding target terminals; determining the prediction output of a power dispatch model based on the feature representation parameters corresponding to the multiple target terminals; determining the model output deviation of the power dispatch model based on the prediction output and the reference output of the power dispatch model, wherein the power dispatch model includes sub-models corresponding to multiple target terminals; determining update requirement parameters corresponding to the power dispatch model based on the model output deviation, wherein the update requirement parameters are used to represent the requirement characteristics of updating the model parameters of the power dispatch model; dividing the update requirement parameters into multiple sub-requirement parameters and distributing them to the corresponding target terminals to obtain update operation parameters corresponding to the sub-models corresponding to the multiple target terminals, wherein the corresponding update operation parameters are used to represent the operation characteristics of updating the model parameters of the sub-models of the corresponding target terminals; and updating the model parameters of the power dispatch model based on the update operation parameters of the sub-models corresponding to the multiple target terminals.

[0006] Optionally, before obtaining the feature representation parameters corresponding to multiple target terminals in the vehicle-to-grid interaction scenario, the process includes: determining the power grid terminal and multiple device terminals in the vehicle-to-grid interaction scenario; determining the matching index between the multiple device terminals based on the encrypted identifier parameters corresponding to each of the multiple device terminals; determining multiple terminal groups from the multiple device terminals based on the matching index between the multiple device terminals, wherein the multiple terminal groups respectively include a first terminal corresponding to an electric vehicle and a second terminal corresponding to a regional device; and determining the multiple target terminals based on the multiple terminal groups and the power grid terminal.

[0007] Optionally, before determining the matching index between the plurality of device terminals based on the encrypted identifier parameters corresponding to the plurality of device terminals respectively, the process includes: determining the timestamp and location coordinates corresponding to the plurality of device terminals respectively; determining the spatiotemporal identifier parameters corresponding to the plurality of device terminals based on the timestamp and location coordinates corresponding to the plurality of device terminals respectively, wherein the corresponding spatiotemporal identifier parameters are identifier parameters used to characterize the spatiotemporal features of the corresponding device terminals; and encrypting the spatiotemporal identifier parameters corresponding to the plurality of device terminals respectively to obtain the encrypted identifier parameters corresponding to the plurality of device terminals respectively.

[0008] Optionally, determining the predicted output of the power dispatch model based on the feature representation parameters corresponding to the plurality of target terminals includes: when the plurality of target terminals include a grid terminal, a first terminal corresponding to an electric vehicle, and a second terminal corresponding to a regional device, determining a first encrypted output based on the feature representation parameters corresponding to the first terminal; determining a second encrypted output based on the first encrypted output and the feature representation parameters corresponding to the second terminal; and determining the predicted output of the power dispatch model based on the second encrypted output and the feature representation parameters corresponding to the grid terminal.

[0009] Optionally, updating the model parameters of the power dispatching model based on the update operation parameters of the sub-models corresponding to the plurality of target terminals includes: determining the parameter update amount corresponding to the power dispatching model based on the update operation parameters corresponding to the plurality of target terminals; and updating the model parameters of the power dispatching model based on the parameter update amount.

[0010] Optionally, after updating the model parameters of the power dispatching model based on the update operation parameters of the sub-models corresponding to the plurality of target terminals, the method further includes: updating the model parameters of the power dispatching model to obtain update parameters, wherein the update parameters include a plurality of sub-update parameters; and distributing the plurality of sub-update parameters to the corresponding target terminals among the plurality of target terminals for updating the model parameters of the sub-models of the corresponding target terminals.

[0011] Optionally, the step of dividing the update requirement parameters into multiple sub-requirement parameters and distributing them to the corresponding target terminals to obtain update operation parameters corresponding to the sub-models of the multiple target terminals includes: determining the forward propagation data of the sub-models corresponding to the multiple target terminals; and, based on the forward propagation data of the sub-models corresponding to the multiple target terminals and the sub-requirement parameters corresponding to the multiple target terminals, performing back propagation based on the sub-models corresponding to the multiple target terminals to obtain update operation parameters corresponding to the sub-models of the multiple target terminals.

[0012] According to one aspect of the present invention, a model parameter update apparatus based on vehicle-to-grid interaction is provided, comprising: an acquisition module, configured to acquire feature representation parameters corresponding to multiple target terminals in a vehicle-to-grid interaction scenario, wherein the corresponding feature representation parameters are used to represent the terminal features of the corresponding target terminals; a first determination module, configured to determine the predicted output of a power dispatching model based on the feature representation parameters corresponding to the multiple target terminals; a second determination module, configured to determine the model output deviation of the power dispatching model based on the predicted output and the reference output of the power dispatching model, wherein the power dispatching model includes sub-models corresponding to multiple target terminals; and a third determination module, configured to... Based on the model output deviation, an update requirement parameter corresponding to the power dispatch model is determined, wherein the update requirement parameter is used to characterize the requirement characteristics of the power dispatch model to update model parameters; a fourth determining module is used to divide the update requirement parameter into multiple sub-requirement parameters and send them to the corresponding target terminals respectively to obtain update operation parameters corresponding to the sub-models of the multiple target terminals respectively, wherein the corresponding update operation parameters are used to characterize the operation characteristics of updating model parameters of the sub-models of the corresponding target terminals; a fifth determining module is used to update the model parameters of the power dispatch model based on the update operation parameters of the sub-models corresponding to the multiple target terminals respectively.

[0013] According to one aspect of the present invention, an electronic device is provided, characterized in that it includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the vehicle-to-everything (V2X) interaction-based model parameter update method described in any of the preceding claims.

[0014] According to one aspect of the present invention, a computer-readable storage medium is provided, wherein when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the model parameter update method based on vehicle-to-everything (V2X) interaction described above.

[0015] In this embodiment of the invention, acquiring the feature representation parameters of multiple target terminals in a vehicle-to-grid interaction scenario provides a realistic and scenario-appropriate data foundation for determining the output deviation of the power dispatch model. Determining the model output deviation based on these feature representation parameters accurately pinpoints the gap between the current model performance and actual needs. Determining update requirement parameters based on this model output deviation clarifies the core direction and specific scope of model parameter optimization. Dividing the update requirement parameters into multiple sub-requirement parameters and distributing them to the corresponding target terminals allows each target terminal to independently generate update operation parameters based solely on its own corresponding sub-requirement parameters, without needing to acquire feature data from other terminals or globally complete requirement information. This effectively reduces the risk of data leakage during model parameter updates. Furthermore, updating the model parameters based on these update operation parameters achieves a balance between collaborative optimization of model parameters and data privacy protection in a vehicle-to-grid interaction scenario. This solves the technical problem in related technologies where, during model parameter updates in a vehicle-to-grid interaction scenario, data from multiple parameter subjects needs to be acquired for collaborative analysis, leading to data leakage. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0017] Figure 1 This is a flowchart of a model parameter update method based on vehicle-to-everything (V2X) interaction according to an embodiment of the present invention;

[0018] Figure 2 This is a schematic diagram of the model parameter update method based on vehicle-to-grid interaction in an optional embodiment of the present invention;

[0019] Figure 3 This is a schematic diagram of a vertical federated learning framework in an optional embodiment of the present invention;

[0020] Figure 4 This is a schematic diagram of the LSH mapping principle in an optional embodiment of the present invention;

[0021] Figure 5 This is a structural block diagram of a model parameter update device based on vehicle-to-everything (V2X) interaction according to an embodiment of the present invention. Detailed Implementation

[0022] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention 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 the invention 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 a 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.

[0024] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:

[0025] L2 norm: also known as Euclidean norm, it represents the square root of the sum of the squares of the elements of a vector.

[0026] CKKS: An algorithm that supports homomorphic encryption, also known as homomorphic encryption algorithm, which can perform approximate arithmetic operations on real or complex vectors in an encrypted state.

[0027] Adam optimizer: An optimization algorithm that combines momentum gradient descent with adaptive learning rate. It dynamically adjusts the update step size of each parameter of the model by maintaining the first moment estimate (momentum) and the second moment estimate (adaptive learning rate).

[0028] ReLU: Rectified Linear Unit, used to introduce nonlinear features.

[0029] He initialization method: The model parameter initialization strategy designed for the ReLU activation function ensures that the variance of the activation values ​​of each layer remains consistent in the early stage of model training by initializing the weight parameters to random values ​​that follow a specific normal distribution, thus avoiding low training efficiency caused by improper parameter initialization.

[0030] p-stable distribution: A stable probability distribution. If a random vector is drawn from a p-stable distribution, the difference between the projections of any two vectors onto that random vector is identically distributed to the random variable whose Euclidean distance is multiplied by the same p-stable distribution.

[0031] LSH: Locality-Sensitive Hashing, a technique for mapping high-dimensional data to low-dimensional hash codes.

[0032] LSH function family: A set of hash functions that satisfy the locality sensitivity property.

[0033] Paillier: A partially homomorphic encryption algorithm based on the large integer factorization problem, supporting both additive homomorphism and scalar multiplication homomorphism.

[0034] Example 1

[0035] According to an embodiment of the present invention, an embodiment of a model parameter update method based on vehicle-to-everything (V2X) interaction is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0036] Figure 1 This is a flowchart of a model parameter update method based on vehicle-to-everything (V2X) interaction according to an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes the following steps:

[0037] S102, obtain the feature representation parameters corresponding to multiple target terminals in the vehicle-to-everything (V2X) interaction scenario, where the corresponding feature representation parameters are used to represent the terminal features of the corresponding target terminal;

[0038] This involves a vehicle-to-grid (V2G) interaction scenario, where electric vehicles (EVs) and the power grid interact to achieve bidirectional flow of information and energy (specifically electrical energy). In this scenario, EVs can not only consume electricity as a load on the grid but also feed electricity back to the grid when needed, achieving bidirectional energy flow. Simultaneously, V2G interaction also includes bidirectional information flow; for example, the charging status and battery information of EVs can be uploaded to the grid, while the grid can send electricity price information and charging facility status information to EVs.

[0039] This involves multiple target terminals, which are various equipment terminals that participate in energy and information interaction in the vehicle-grid interaction scenario. These include the grid terminal (as an energy management and information release center), the first terminal corresponding to the electric vehicle (carrying the electric vehicle's own operation data collection, charging and discharging control, and other functions), and the second terminal corresponding to the regional equipment (that is, roadside units, such as charging piles in the grid area, which serve as energy and information interaction nodes in the local area corresponding to the grid).

[0040] This involves feature representation parameters, which are parameters used to characterize the terminal features of the corresponding target terminal. For example, the feature representation parameters of the first terminal corresponding to an electric vehicle may include the remaining battery power, charging and discharging power, battery temperature, driving range, etc., which can be specifically represented by the local feature vector of the electric vehicle. This indicates that the characteristic parameters of the second terminal corresponding to the regional equipment can include the charging pile's idle status, equipment operating power, ambient temperature and humidity, etc., and can be specifically represented by the local feature vector of the regional equipment. The characteristic parameters of a power grid terminal (specifically, a power grid server) can include data such as power grid voltage, current, load capacity, and power supply stability, which can be represented by the local feature vector of the power grid terminal.

[0041] By acquiring the feature representation parameters corresponding to multiple target terminals in the vehicle-to-grid interaction scenario, we can provide the power dispatching model with realistic and scenario-appropriate input data.

[0042] S104. Based on the characteristic representation parameters corresponding to multiple target terminals, determine the predicted output of the power dispatching model.

[0043] This involves a power dispatch model, which is an intelligent algorithm model adapted to vehicle-to-grid interaction scenarios for power dispatching. It includes sub-models corresponding to multiple target terminals.

[0044] This involves the prediction output, which is the output result of the power dispatch model based on the feature representation parameters of multiple target terminals.

[0045] The characteristic parameters of multiple target terminals can comprehensively reflect the actual status and needs of each terminal. Thus, the characteristic parameters of multiple target terminals can be input into the power dispatch model to obtain the predicted output, providing a reliable comparison basis for the subsequent determination of model output deviation.

[0046] S106, Based on the predicted output and the reference output of the power dispatch model, determine the model output deviation of the power dispatch model, wherein the power dispatch model includes sub-models corresponding to multiple target terminals respectively;

[0047] This includes a reference output, which is the standard output result of the power dispatch model under ideal conditions or based on real-world scenario data. It serves as a benchmark for measuring the accuracy of the model's predictions.

[0048] This involves model output bias, which is the difference between the predicted output and the reference output of the power dispatch model. It clearly defines the gap between the model's prediction results and the actual needs of the scenario, and can be determined by the following formula:

[0049]

[0050] Where L is the model output bias; y is the reference output; This is for predicting the output.

[0051] This involves multiple sub-models corresponding to different target terminals. These sub-models are subdivided components of the power dispatch model, corresponding one-to-one with each target terminal participating in vehicle-to-grid interaction. They include sub-models for the first terminal, the second terminal, and the power grid terminal. Specifically, taking a vertical federated split neural network as an example, the sub-model for the first terminal can be a sub-model for the electric vehicle client (including...). The second terminal's sub-model can be represented by a fully connected layer, and can be represented by a roadside unit sub-model (containing...). The sub-model of the power grid terminal can be represented by a fully connected layer, and the sub-model of the power grid terminal can be represented by a power grid server sub-model (containing a fully connected layer). (Each output layer) represents this.

[0052] Comparing the model's predicted output with the reference output under ideal conditions or real-world scenarios allows for precise quantification of the difference between the two, clarifying the gap between the model's predictions and actual needs. This provides a clear basis for determining the updated required parameters based on this deviation, ensuring that model parameter updates can specifically address the performance shortcomings in the collaborative operation of each sub-model, and improving the overall adaptability and prediction accuracy of the power dispatching model.

[0053] S108. Based on the model output deviation, determine the update requirement parameters corresponding to the power dispatch model. The update requirement parameters are used to characterize the demand characteristics of the power dispatch model for updating model parameters.

[0054] This involves update demand parameters, which are parameters used to characterize the demand characteristics of power dispatching models for updating model parameters. These parameters are calculated based on model output deviations and reflect the direction of power dispatching model parameter adjustments. They can be represented by gradients.

[0055] Determining update requirements based on model output deviation can accurately reflect the core requirements that characterize model parameter updates, and clarify the direction and optimization intensity of model parameter adjustments in power dispatching models.

[0056] S110, the update requirement parameters are divided into multiple sub-requirement parameters and sent to the corresponding target terminals respectively to obtain the update operation parameters corresponding to the sub-models of the multiple target terminals respectively. The corresponding update operation parameters are used to characterize the operation features of updating the model parameters of the sub-models of the corresponding target terminals.

[0057] This involves multiple sub-demand parameters, which are detailed parameters obtained by breaking down the global update demand parameters of the power dispatch model, and each corresponds one-to-one with multiple target terminals. Each sub-demand parameter only contains the parameter update requirements of the corresponding target terminal sub-model, without involving information related to other terminals. It can clearly define the adjustment direction, optimization scope and specific requirements of a single terminal sub-model, and is the key carrier for transforming the global update demand into local demands that each terminal can execute independently.

[0058] This involves updating operation parameters, which are operation feature parameters used to characterize the updating of model parameters of the sub-model of the corresponding target terminal. Specifically, the updating operation parameters are data used to adjust the model parameters by each target terminal through backpropagation calculation based on the received sub-requirement parameters and the forward propagation data of its own sub-model.

[0059] By breaking down the global update requirement parameters into sub-requirement parameters that correspond one-to-one with each target terminal, and only sending the required local update requirements to the corresponding terminal, it is possible to avoid each terminal accessing the relevant information of other terminals. Each target terminal calculates the update operation parameters through backpropagation based on the received sub-requirement parameters and the forward propagation data of its own sub-model. This ensures that the update operation parameters accurately match the parameter adjustment requirements of a single sub-model, achieving both the independence and specificity of the update operations of each sub-model, reducing data interaction between terminals, protecting data privacy and security, and providing a reliable basis for the overall parameter updates of the subsequent power dispatch model.

[0060] S112, update the model parameters of the power dispatching model according to the update operation parameters of the sub-models corresponding to multiple target terminals.

[0061] After obtaining the update operation parameters (i.e., the specific parameter adjustment data corresponding to each sub-model) of each target terminal (such as the first terminal corresponding to electric vehicles, the second terminal corresponding to regional equipment, and the power grid terminal), the overall parameter update amount of the power dispatch model is calculated based on these scattered local update data. Then, the global parameter optimization is performed on the power dispatch model composed of the collaborative sub-models to ensure that the overall performance of the model meets the actual operation requirements of vehicle-grid interaction, while avoiding direct interaction of raw data between terminals and ensuring data privacy and security.

[0062] Through the aforementioned steps S102-S112, feature representation parameters of multiple target terminals in the vehicle-to-grid interaction scenario are obtained. This provides a realistic and scenario-appropriate data foundation for determining the output deviation of the power dispatch model. Determining the model output deviation based on these feature representation parameters allows for accurate identification of the gap between the current model performance and actual needs. Based on this model output deviation, update requirement parameters are determined, clarifying the core direction and specific scope of model parameter optimization. Dividing the update requirement parameters into multiple sub-requirement parameters and distributing them to the corresponding target terminals allows each target terminal to independently generate update operation parameters based only on its own corresponding sub-requirement parameters, without needing to obtain feature data from other terminals or global complete requirement information. This effectively reduces the risk of data leakage during model parameter updates. The model parameters are then updated based on these update operation parameters, achieving a balance between collaborative optimization of model parameters and data privacy protection in the vehicle-to-grid interaction scenario. This solves the technical problem in related technologies where, during model parameter updates in the vehicle-to-grid interaction scenario, data from multiple parameter subjects needs to be obtained for collaborative analysis, leading to data leakage.

[0063] As an optional embodiment, before obtaining the feature representation parameters corresponding to multiple target terminals in the vehicle-to-grid interaction scenario, the method includes: determining the power grid terminal and multiple device terminals in the vehicle-to-grid interaction scenario; determining the matching index between multiple device terminals based on the encrypted identifier parameters corresponding to each of the multiple device terminals; determining multiple terminal groups from the multiple device terminals based on the matching index between the multiple device terminals, wherein the multiple terminal groups respectively include a first terminal corresponding to an electric vehicle and a second terminal corresponding to a regional device; and determining multiple target terminals based on the multiple terminal groups and the power grid terminal.

[0064] This involves a power grid terminal, which is the power grid management and dispatch terminal in the vehicle-to-grid interaction scenario. It is used to detect the power grid operation status and coordinate the collaborative operation of various equipment terminals. Specifically, the power grid terminal is a power grid server.

[0065] This involves multiple device terminals, which are other terminals in the vehicle-to-grid interaction scenario besides the grid terminal, participating in energy or information interaction, including the first terminal corresponding to electric vehicles and the second terminal corresponding to regional equipment.

[0066] This involves encrypted identifier parameters, which are obtained by encrypting the spatiotemporal identifier parameters of the device terminal (which can be generated based on timestamps and location coordinates). These parameters are used to achieve matching and identification between device terminals while protecting terminal privacy information, thus avoiding the leakage of original spatiotemporal information.

[0067] This involves a matching index between multiple device terminals, which is used to quantify the degree of matching between different device terminals.

[0068] This involves multiple terminal groups, which are groups obtained from multiple device terminals based on the matching index between device terminals. Each terminal group includes a first terminal corresponding to electric vehicles and a second terminal corresponding to regional devices.

[0069] This involves electric vehicles, which are new energy vehicles with charging and discharging functions in the vehicle-grid interaction scenario. They can obtain electricity from the grid as energy consumers, and can also feed back electricity to the grid as energy suppliers when needed. They are the key carriers for the bidirectional flow of energy between vehicles and the grid.

[0070] This involves a first terminal, which is a device terminal corresponding to the electric vehicle. It is integrated into or bound to the electric vehicle and is responsible for collecting characteristic data such as the battery status, charging and discharging power, and driving range of the electric vehicle, while responding to the dispatching instructions of the power grid or regional equipment.

[0071] This involves regional equipment, which refers to infrastructure equipment within the power grid area, namely roadside units, including charging piles, which can be used to provide energy replenishment and information exchange services for electric vehicles.

[0072] This involves a second terminal, which is a device terminal corresponding to the regional equipment. It can be used to collect characteristic parameters such as the operating status of local areas within the power grid area (e.g., the availability of charging piles and equipment power) and environmental data (e.g., temperature and humidity). It also undertakes the data interaction function with the corresponding first terminal and power grid terminal.

[0073] Because the matching index between multiple device terminals is determined based on the encrypted identifier parameters corresponding to each device terminal, and the encrypted identifier parameters are encrypted data that are only used to determine the correlation between terminals and will not leak the original spatiotemporal privacy, the privacy information of the participating entities is isolated and protected in the process of identifying multiple target terminals, thereby avoiding data leakage between multiple participating entities.

[0074] As an optional embodiment, before determining the matching index between multiple device terminals based on the encrypted identifier parameters corresponding to each of the multiple device terminals, the method includes: determining the timestamps and location coordinates corresponding to each of the multiple device terminals; determining the spatiotemporal identifier parameters corresponding to each of the multiple device terminals based on the timestamps and location coordinates corresponding to each of the multiple device terminals, wherein the corresponding spatiotemporal identifier parameters are identifier parameters used to characterize the spatiotemporal features of the corresponding device terminals; and encrypting the spatiotemporal identifier parameters corresponding to each of the multiple device terminals to obtain the encrypted identifier parameters corresponding to each of the multiple device terminals.

[0075] This involves timestamps, which are used to record the specific time points when a device terminal generates data, participates in information interaction or energy interaction in the vehicle-to-grid interaction scenario. The timestamps can be accurate to the second or millisecond level and can clearly characterize the temporal attributes of the device terminal's participation in vehicle-to-grid interaction. They are the core basis for judging the correlation between different device terminals in the time dimension.

[0076] This involves location coordinates, which are used to determine the specific geographical location of a device terminal in physical space and can be represented by latitude and longitude. For example, for the first terminal corresponding to an electric vehicle, it represents the real-time location of the vehicle; for the second terminal corresponding to a regional device, it represents the fixed deployment location of the device, which is the core basis for determining the spatial correlation between different device terminals.

[0077] This includes spatiotemporal identification parameters, which are parameters that characterize the temporal (when to participate in the interaction) and spatial (where to participate in the interaction) identifiers of the device terminal.

[0078] The timestamps and location coordinates of multiple device terminals can capture the core temporal and spatial information of each device terminal's participation in vehicle-to-everything (V2X) interaction, thereby obtaining spatiotemporal identification parameters. This allows for the effective differentiation of different terminal devices from a spatiotemporal perspective. Furthermore, by encrypting the spatiotemporal identification parameters, encrypted identification parameters are obtained, which can prevent the leakage of original spatiotemporal information. This provides a reliable and privacy-protected foundation for the subsequent secure calculation of the matching index between device terminals based on the encrypted identification parameters, ensuring that sensitive data is not exposed throughout the terminal matching process.

[0079] As an optional embodiment, the predicted output of the power dispatch model is determined based on the feature representation parameters corresponding to multiple target terminals, including: when the multiple target terminals include a grid terminal, a first terminal corresponding to an electric vehicle, and a second terminal corresponding to a regional device, determining a first encrypted output based on the feature representation parameters corresponding to the first terminal; determining a second encrypted output based on the first encrypted output and the feature representation parameters corresponding to the second terminal; and determining the predicted output of the power dispatch model based on the second encrypted output and the feature representation parameters corresponding to the grid terminal.

[0080] This involves a first encrypted output, which is the output result obtained by the first terminal corresponding to the electric vehicle through local calculations performed locally by its corresponding sub-model (such as the electric vehicle client sub-model) based on its own characteristic representation parameters (such as remaining battery power and charging / discharging power), and then encrypted. This first encrypted output is the product of encrypted processing of the core characteristic data of the first terminal, which not only retains the key information required for model calculation, but also avoids the direct exposure of the original characteristic data of the first terminal, providing privacy and security intermediate data support for subsequent collaborative calculations with the second terminal.

[0081] This involves a second encrypted output. This second encrypted output is the result obtained after the second terminal corresponding to the regional device receives the first encrypted output, combines it with its own characteristic parameters (such as the charging pile's idle state and operating power), performs collaborative calculations through its corresponding sub-model (such as the roadside unit sub-model), and then encrypts the calculation results again. This second encrypted output integrates the encrypted intermediate data from the first terminal and the local characteristic data from the second terminal, maintaining encryption throughout the process. This achieves collaborative fusion of data from both ends while preventing the leakage of original data and intermediate calculation data from both ends, providing a secure analysis basis for subsequent final calculations with the power grid terminal.

[0082] The first terminal calculates and encrypts its own characteristic parameters using a local sub-model to obtain the first encrypted output. This preserves key information from the model calculation while preventing the exposure of its original data. The second terminal receives the first encrypted output and, in conjunction with its own characteristic parameters, performs collaborative calculations and encrypts the output again to obtain the second encrypted output. This enables secure data fusion between the two terminals without leaking the original data or intermediate calculation results. The power grid terminal determines the predicted output of the power dispatch model based on the second encrypted output and its own characteristic parameters. This integrates the core data from the three terminals to complete the model calculation, ensuring the effectiveness of collaborative data analysis while blocking direct interaction of the original data throughout the process through encryption, thus ensuring data privacy and security during the model's predicted output process.

[0083] As an optional embodiment, the power dispatching model is updated based on the update operation parameters of the sub-models corresponding to the multiple target terminals, including: determining the parameter update amount corresponding to the power dispatching model based on the update operation parameters corresponding to the multiple target terminals; and updating the model parameters of the power dispatching model based on the parameter update amount.

[0084] This involves the degree to which the parameter update amount updates the model parameters of the power dispatching model. Specifically, when the update operation parameter is the global gradient G, it can be determined in the following way:

[0085] First, the global gradient is clipped to prevent gradient explosion, using the following formula:

[0086]

[0087] in, The global gradient after clipping; It is the L2 norm of the global gradient G. This is the preset cropping threshold.

[0088] Subsequently, the first-order moment estimate of the Adam optimizer is updated. and second-order moment estimation (All are vectors, and have the same dimension as the parameters):

[0089]

[0090]

[0091] in, and These are the hyperparameters of the Adam optimizer, which control the exponential decay rate of the first-order moment estimate and the second-order moment estimate, respectively. This represents a multiplication operation, where t is the number of iterations.

[0092] Then, deviation correction is performed:

[0093]

[0094]

[0095] Finally, calculate the parameter update amount. The formula is:

[0096]

[0097] in, It is the learning rate; It is a constant added for numerical stability; its specific value is very small and is used to prevent division by zero errors.

[0098] By aggregating the update operation parameters of multiple target terminal sub-models, the parameter update amount of the power dispatch model can be determined. This allows the parameter adjustment requirements of each local terminal to be integrated into a globally unified optimization basis, clarifying the adjustment range and direction of the overall model parameters. Based on this parameter update amount, the power dispatch model can be updated globally, ensuring that the local optimization requirements of each sub-model are consistent with the overall performance improvement target of the model. This avoids model performance fluctuations caused by conflicts in local parameter adjustments, and achieves accurate and coordinated optimization of power dispatch model parameters.

[0099] As an optional embodiment, after updating the model parameters of the power dispatching model based on the update operation parameters of the sub-models corresponding to the multiple target terminals, the method further includes: updating the model parameters of the power dispatching model to obtain update parameters, wherein the update parameters include multiple sub-update parameters; and distributing the multiple sub-update parameters to the corresponding target terminals among the multiple target terminals for updating the model parameters of the sub-models of the corresponding target terminals.

[0100] This involves multiple sub-update parameters, which are local parameter update data obtained by splitting the power dispatch model according to the sub-model corresponding to each target terminal after the global parameter update of the power dispatch model. Each sub-update parameter corresponds to a sub-model of the multiple target terminals.

[0101] Each sub-update parameter contains only the parameter adjustment information required for the corresponding sub-model, clearly defining the specific parameter modifications, adjustment ranges, and numerical changes for that sub-model. It is a concrete representation of the global update parameters in each local sub-model. Its core function is to accurately distribute the global optimization results of the model to each target terminal, enabling each terminal to independently complete the parameter iteration of its own sub-model based solely on the corresponding sub-update parameters, without needing to obtain the complete global parameters or update data from other terminals. This ensures the consistency between each sub-model and the global model while further strengthening data privacy protection.

[0102] As an optional embodiment, the update requirement parameters are divided into multiple sub-requirement parameters, which are then distributed to the corresponding target terminals to obtain update operation parameters corresponding to the sub-models of the multiple target terminals. This includes: determining the forward propagation data of the sub-models corresponding to the multiple target terminals; and, based on the forward propagation data of the sub-models corresponding to the multiple target terminals and the sub-requirement parameters corresponding to the multiple target terminals, performing back propagation based on the sub-models corresponding to the multiple target terminals to obtain the update operation parameters corresponding to the sub-models of the multiple target terminals.

[0103] This involves forward propagation data, which is intermediate data generated and stored by the sub-models corresponding to multiple target terminals during the forward propagation process. This data includes key information such as input features, weight parameters, and activation function output values ​​for each layer of the sub-model. These data are calculated sequentially by the sub-models based on the feature representation parameters they receive (such as battery state data of electric vehicles and operating status data of regional equipment), recording the flow and transformation of data within the sub-models. This also provides the necessary foundation for accurate gradient calculation during subsequent backpropagation, ensuring that the updated operation parameters precisely match the actual operating state of the sub-models.

[0104] This involves backpropagation, which is the process of calculating the gradient of the loss function with respect to the parameters of each layer from the output layer to the input layer, based on calculation rules such as the chain rule, given the sub-demand parameters (specifically, gradient shares).

[0105] Backpropagation is performed based on the sub-models corresponding to multiple target terminals. This allows for the quantification of the deviation between the sub-model parameters and the update requirements, thereby generating update operation parameters for adjusting the sub-model parameters. This ensures that the parameter adjustments of each sub-model can accurately respond to the global update requirements, while also eliminating the need to rely on the original data from other terminals, thus protecting data privacy and security.

[0106] Based on the above embodiments and optional embodiments, an optional implementation method is provided, which is described in detail below.

[0107] In related technologies, power dispatching models are the core tools for power resource scheduling in vehicle-to-grid (V2G) scenarios. Updating model parameters ensures that the power dispatching model can optimize power resource allocation and efficient utilization based on actual conditions. However, updating model parameters in these technologies requires collaborative analysis of data from multiple stakeholders, leading to potential data leakage issues.

[0108] There is currently no effective solution to the above problems.

[0109] In view of this, an optional embodiment of the present invention provides a model parameter update method based on vehicle-to-network interaction, which can effectively solve the above-mentioned technical problems.

[0110] Figure 2 This is a schematic diagram of the model parameter update method based on vehicle-to-grid interaction in an optional embodiment of the present invention, as shown below. Figure 2 As shown, a detailed description follows.

[0111] S1, obtain the feature representation parameters corresponding to multiple target terminals in the vehicle-to-everything (V2X) interaction scenario, where the corresponding feature representation parameters are used to represent the terminal features of the corresponding target terminal;

[0112] Specifically, before S1, including:

[0113] S11, identify the power grid terminal and multiple device terminals in the vehicle-to-grid interaction scenario;

[0114] For example, the power grid terminal can be a power grid server, and the multiple device terminals can be terminals corresponding to electric vehicles and roadside units, respectively.

[0115] Prior to S11, it also included:

[0116] 1) Construction of power dispatch model framework:

[0117] Figure 3 This is a schematic diagram of a vertical federated learning framework in an optional embodiment of the present invention, such as... Figure 3 As shown, in this scenario, multiple target terminals act as participants, with the power grid server serving as the coordinator. The goal of federated learning is explicitly stated as predicting the daily charging and discharging power of electric vehicles based on multi-source data. Taking the power dispatch model as an example, the vertical federated split neural network in the machine learning model includes:

[0118] Electric vehicle client sub-model (including) (one fully connected layer)

[0119] Roadside unit sub-model (including) (one fully connected layer)

[0120] Power grid server sub-model (including) (One output layer).

[0121] in, This represents the total number of layers in the electric vehicle client sub-model. This represents the total number of layers in the roadside unit sub-model. This represents the total number of layers in the power grid server sub-model.

[0122] These three sub-models are responsible for processing local vehicle features (battery sequence, etc.), processing regional aggregate features (charging pile idle status, etc.), and outputting the final prediction results, respectively.

[0123] 2) Key parameter generation:

[0124] To support subsequent encrypted calculations, two sets of key parameters need to be generated.

[0125] First, generate a CKKS homomorphic encryption key pair. This encryption method is suitable for approximate calculations of floating-point vectors. The generated public key is denoted as... The private key is recorded as , The aggregated results are stored solely by the power grid server, ensuring that only the power grid can ultimately see them.

[0126] Secondly, a Paillier homomorphic encryption key pair is generated for the secure sample alignment stage. This encryption method is suitable for precise addition homomorphic computation of integers. The public key is denoted as... The private key is recorded as .

[0127] 3) Federated learning and optimization parameter settings:

[0128] All hidden layer activation functions use ReLU. Initialize global model parameters. It employs a He initialization method specifically designed for ReLU activation functions. The total number of communication rounds for federated learning is set. and base learning rate Adam was chosen as the adaptive optimizer, and its initial hyperparameters were set. , , and gradient clipping threshold .

[0129] 4) Generation of Locality Sensitive Hash Parameters:

[0130] To generate a family of Locality Sensitive Hash Functions (LSH) for the privacy-preserving sample alignment process, we employ LSH based on the p-stable distribution, which possesses a crucial property: if a vector is randomly drawn from the p-stable distribution... Then for two vectors in space and Their projection difference on the random vector The distributions of vectors, and their Euclidean distance multiplied by a random variable from the same p-stable distribution, are identically distributed. This property applies very well to vectors in Euclidean space and is highly consistent with this scenario.

[0131] Number of initial hash functions and the width of the hash bucket The LSH function family is defined as follows:

[0132]

[0133] 5) Parameter distribution:

[0134] The power grid server will initialize the global model parameters. CKKS public key Paillier public key and the LSH function family The broadcast is sent to all participants who have completed identity verification, namely legitimate electric vehicle clients and roadside units (RSUs).

[0135] S12, determine the timestamps and location coordinates corresponding to multiple device terminals respectively;

[0136] S13, Based on the timestamps and location coordinates corresponding to the multiple device terminals respectively, determine the spatiotemporal identification parameters corresponding to the multiple device terminals respectively, wherein the corresponding spatiotemporal identification parameters are identification parameters used to characterize the spatiotemporal features of the corresponding device terminals;

[0137] For example, for the terminal corresponding to the i-th electric vehicle among multiple device terminals (i.e., the first terminal), from its local dataset Extract identifiers for sample alignment, including timestamps accurate to the second. and latitude and longitude coordinates (That is, location coordinates), and decompose latitude and longitude coordinates into two scalars. and Then combined into a vector Next, the terminal corresponding to the electric vehicle uses the LSH function family. Generate a dimensional fuzzy hash signature vector (That is, spatiotemporal identification parameters):

[0138]

[0139] Each of them It is an integer representing the position of the input vector at the th position. Bucket indexes under each hash function.

[0140] Similarly, the first Each roadside unit from its dataset Extract timestamp and the center coordinates of its coverage area (That is, position coordinates), combined into a vector and generate its dimensional LSH signature vector (That is, spatiotemporal identification parameters).

[0141] S14, encrypt the spatiotemporal identifier parameters corresponding to the multiple device terminals respectively, to obtain the encrypted identifier parameters corresponding to the multiple device terminals respectively;

[0142] For example, each device terminal uses the Paillier public key. The corresponding LSH signature vectors are encrypted to obtain the encryption identifier parameters. Wherein:

[0143] electric vehicles The corresponding terminal, for the first The encryption formula for 3D signatures is:

[0144]

[0145] in, It is the encrypted first Dimensional signature; It is a Paillier public key used for identifier alignment between terminals; It is a generator. It's the modulus. It is a random number selected during encryption. It is based on the modulus A defined set of multiplicative groups.

[0146] The electric vehicle will use the encrypted signature vector Send to the power grid server. Roadside unit. Perform the same operation to convert the encrypted signature vector Send to the power grid.

[0147] S15, determine the matching index between multiple device terminals based on the encrypted identifier parameters corresponding to each of the multiple device terminals;

[0148] S16. Based on the matching index between multiple device terminals, multiple terminal groups are determined from the multiple device terminals. The multiple terminal groups include the first terminal corresponding to the electric vehicle and the second terminal corresponding to the regional device.

[0149] Specifically, this includes: based on the encryption identifier parameters corresponding to multiple device terminals, processing any pair of encryption identifier parameters among the multiple device terminals. Perform an equality check (specifically, this can be done using the DGK protocol based on the power grid server) to obtain an encrypted equality indicator. Wherein, the matching index of the d-th dimension .

[0150] Then, the Paillier algorithm is used to aggregate all dimensions, with the following formula:

[0151]

[0152] in, The matching index is the result of aggregating all dimensions in the encrypted form, where k is the total number of dimensions.

[0153] Decryption The matching index after decryption and aggregation of all dimensions is obtained. ,like If the sample alignment is successful, then the sample alignment is considered successful. The matching threshold (i.e., the number of identical dimensions).

[0154] Finally, a sample-aligned index set is constructed. (That is, multiple terminal groups).

[0155] Figure 4 This is a schematic diagram of the LSH mapping principle in an optional embodiment of the present invention, such as... Figure 4 As shown.

[0156] Specifically, after data A and B are mapped using the same LSH function, the resulting hash codes can still be used to estimate the similarity between A and B before the mapping. This involves converting high-dimensional feature vectors into low-dimensional hash codes, making the hash codes of similar objects as close as possible. This results in a greater probability of mapping them to the same hash bucket in the low-dimensional space, while the hash codes of two dissimilar objects have only a small probability of mapping to the same hash bucket.

[0157] Based on the above, LSH matching can be used to align samples, that is, if two vectors fall into the same bucket under most hash functions, they are considered to be similar.

[0158] S17. Based on multiple terminal groups and power grid terminals, determine multiple target terminals.

[0159] S2, based on the feature representation parameters corresponding to multiple target terminals, determine the predicted output of the power dispatching model;

[0160] Specifically, S2 includes:

[0161] S21, when there are multiple target terminals including a power grid terminal, a first terminal corresponding to an electric vehicle and a second terminal corresponding to a regional device, determine the first encrypted output based on the feature characterization parameters corresponding to the first terminal;

[0162] Taking the electric vehicle terminal (i.e., the first terminal) as an example, the first encrypted output can be obtained by forward calculation based on the feature representation parameters corresponding to the first terminal, as follows:

[0163] for For each aligned sample (i.e., each of the multiple terminal groups), the electric vehicle Use its local feature vector (That is, the feature representation parameters of the first terminal) are used as input, and forward propagation is performed to the local sub-model corresponding to the electric vehicle (the front of the global model). The output of the layer is used to obtain intermediate activation values. The local sub-model corresponding to the electric vehicle is the electric vehicle terminal model. The specific calculation process is as follows:

[0164]

[0165]

[0166] in, This is the result of the linear transformation of the l-th layer; For the weight parameters of the l-th layer of the local sub-model of the electric vehicle; For the local sub-model of electric vehicles The activation value of the layer; For the local sub-model of electric vehicles Layer bias parameters; To modify the linear unit activation function (used to introduce nonlinear features into the model); ,and .

[0167] Electric vehicles use public keys Activation value of the last layer Encryption is performed to obtain ciphertext. (That is, the first encrypted output):

[0168]

[0169] Then, Send to the associated roadside unit (That is, the second terminal).

[0170] S22, based on the first encrypted output and the feature representation parameters corresponding to the second terminal, determine the second encrypted output;

[0171] Taking the roadside unit (i.e., the second terminal) as an example, the second encrypted output can be obtained by forward computation based on the first encrypted output and the feature representation parameters corresponding to the second terminal, as follows:

[0172] roadside unit Received ciphertext Then, it is compared with its own local feature vector. (That is, the feature representation parameters of the second terminal) are fused. Roadside unit sub-model (from the first...) Layer to The following calculations are performed on the layer:

[0173]

[0174]

[0175] in, This is the linear transformation result of the roadside unit sub-model; These are the weight parameters output by the electric vehicle sub-model corresponding to the roadside unit sub-model; These are the weight parameters for the local feature vector corresponding to the roadside unit sub-model; These are the bias parameters for the roadside unit sub-model; This represents the activation value of the roadside unit sub-model.

[0176] because Encrypted to The roadside cells need to utilize the homomorphic properties of CKKS to perform linear part computation on the ciphertext. The specific formula for linear part computation is as follows:

[0177]

[0178] in, This is the ciphertext result obtained after linear computation is performed on the ciphertext by the roadside unit; Indicates multiplication operation, This indicates ciphertext addition.

[0179] Since CKKS does not support exact homomorphic computation of non-polynomial functions, but has very good homomorphic multiplication properties, square functions are used. As an approximate alternative to ReLU.

[0180] The roadside unit performs homomorphic squaring on the linear result:

[0181]

[0182] in, This indicates a multiplication operation.

[0183] Finally, the roadside unit will encrypt the result. (That is, the second encrypted output) is sent to the power grid server (that is, the power grid terminal).

[0184] S23. Based on the second encrypted output and the characteristic representation parameters corresponding to the power grid terminal, determine the predicted output of the power dispatching model.

[0185] Specifically, the power grid server (i.e., the power grid terminal) uses a private key. Decrypt the received ciphertext:

[0186]

[0187] in, For the second encrypted output The plaintext result obtained after decryption;

[0188] based on The power grid server then completes the remaining layers of the model (the... The forward computation from the layer to the output layer yields the final predicted output. (That is, the predicted output of the power dispatch model), the specific calculation process is as follows:

[0189]

[0190]

[0191] in, For the remaining layers of the model (the first layer) The linear transformation result from the output layer to the output layer; These are the weight parameters corresponding to the remaining layers of the model; These are the bias parameters corresponding to the remaining layers of the model.

[0192] S3, based on the predicted output and the reference output of the power dispatch model, determine the model output deviation of the power dispatch model, wherein the power dispatch model includes sub-models corresponding to multiple target terminals respectively;

[0193] Specifically, the power grid server uses real tags. (That is, referring to the output), calculate the loss based on the loss function. For regression tasks, mean squared error loss is used:

[0194]

[0195] in, This represents the model's output bias.

[0196] S4. Based on the model output deviation, determine the update requirement parameters corresponding to the power dispatch model. The update requirement parameters are used to characterize the demand characteristics of the power dispatch model for updating model parameters.

[0197] Specifically, the power grid server first calculates the losses. For the output layer input gradient (That is, update the required parameters):

[0198]

[0199] in, This is for gradient calculation.

[0200] S5, divide the update requirement parameters into multiple sub-requirement parameters and send them to the corresponding target terminals respectively to obtain the update operation parameters corresponding to the sub-models of the multiple target terminals respectively. The corresponding update operation parameters are used to characterize the operation features of updating the model parameters of the sub-models of the corresponding target terminals.

[0201] The update requirement parameters are divided into multiple sub-requirement parameters, which are then distributed to the corresponding target terminals. Specifically, to protect gradient privacy, the power grid server uses additive secret sharing to... Split into Each share (i.e., multiple sub-demand parameters), specifically, will Split into A random share.

[0202] First come, first served random vectors Ensure that each one is consistent with Same dimension, and calculate the first Individual shares:

[0203]

[0204] And the following equation holds true:

[0205]

[0206] The server (i.e., the grid server) will share Securely sent to the In this scenario, there are several participants (including electric vehicles, roadside units, and servers). .

[0207] Specifically, S5 includes:

[0208] S51, determine the forward propagation data of the sub-models corresponding to multiple target terminals respectively;

[0209] S52, based on the forward propagation data of the sub-models corresponding to the multiple target terminals and the sub-requirement parameters corresponding to the multiple target terminals, back propagation is performed based on the sub-models corresponding to the multiple target terminals to obtain the update operation parameters corresponding to the sub-models corresponding to the multiple target terminals.

[0210] Specifically, each participant (i.e., multiple target terminals, including electric vehicles, roadside units, and servers) uses its tiered share. (That is, sub-requirement parameters), according to the backpropagation rule, collaboratively calculate the gradient share of the loss with respect to their respective local model parameters (that is, update operation parameters).

[0211] Backpropagation begins at the output layer, with each participant independently using the same global model parameters and intermediate results stored locally during forward propagation (i.e., forward propagation data, such as...). value).

[0212] From the propagation from layer to layer The specific formula for calculating the gradient share (i.e., the update operation parameters) for a layer is as follows:

[0213]

[0214] in, For the i-th participant (i.e., the i-th target terminal) The gradient share corresponding to the layer (i.e., the update operation parameters); Indicates the multiplication operation; These are globally known model parameters; It is the input of this layer stored locally during forward propagation (i.e., forward propagation data); It is the derivative of the activation function.

[0215] For ReLU, It is an indicator function that satisfies .

[0216] S6 updates the model parameters of the power dispatching model based on the update operation parameters of the sub-models corresponding to multiple target terminals.

[0217] Specifically, S6 includes:

[0218] S61, based on the update operation parameters corresponding to multiple target terminals respectively, determine the parameter update amount corresponding to the power dispatch model;

[0219] Based on the update operation parameters, the loss is calculated for the model parameters of each participant's local model. and Gradient share:

[0220]

[0221]

[0222] in, For the i-th participant Gradient share; For the i-th participant Gradient share; It is the activation value of the previous layer stored locally during forward propagation.

[0223] After all participants have completed the calculation of their local gradient shares, they will apply them to the same parameter. gradient share The gradient is sent to the power grid server. The server then uses the homomorphism secretly shared by addition to recover the complete gradient of the parameter:

[0224]

[0225] Continue doing this with the gradients of all parameters until you obtain the complete global gradient. Due to a single share It is random, so the power grid server cannot infer any independent gradient information of any participant from it.

[0226] The power grid server obtains the complete global gradient. Then, gradient clipping is performed first to prevent gradient explosion:

[0227]

[0228] in, gradient The global gradient after gradient clipping; It is the gradient L2 norm, This is the preset cropping threshold.

[0229] The server then updates the first-moment estimate of the Adam optimizer. and second-order moment estimation (All are vectors, and have the same dimension as the parameters):

[0230]

[0231]

[0232] in, This indicates a multiplication operation.

[0233] Then, deviation correction is performed:

[0234]

[0235]

[0236] and These are the hyperparameters of the Adam optimizer, which control the exponential decay rate of the first-order moment estimate and the second-order moment estimate, respectively.

[0237] Finally, calculate the parameter update amount. :

[0238]

[0239] in, It's the learning rate. It is a small constant added for numerical stability.

[0240] S62 updates the model parameters of the power dispatching model based on the parameter update amount.

[0241] After updating the power dispatch model parameters based on the update operation parameters of the sub-models corresponding to multiple target terminals, the process also includes:

[0242] The power dispatch model is updated to obtain updated parameters, which include multiple sub-update parameters. These sub-update parameters are then distributed to the corresponding target terminals among multiple target terminals to update the model parameters of the sub-models of the corresponding target terminals.

[0243] Specifically, the power grid server uses update volume Update the global model parameters:

[0244]

[0245] For the updated parameters, the server will consider them as parameters belonging to the local sub-models of each party. The new model parameters are sent to the corresponding participants (electric vehicles, roadside units). Upon receiving the new model parameters, each participant replaces its local model parameters, completing this round of updates.

[0246] Through the above complete process, under the premise of strictly protecting the data privacy of all parties, it is possible to efficiently utilize the heterogeneous data scattered among vehicles, roads, and networks and collaboratively train a high-performance vehicle-to-network interaction business model. The whole process reflects the deep integration and adaptive optimization of multiple privacy protection technologies.

[0247] The above optional implementation methods can achieve at least the following beneficial effects:

[0248] (1) Compared with related technologies, this invention addresses the problem of sample identifiers being difficult to match accurately due to device errors or network delays in longitudinal federated learning by proposing a fuzzy alignment mechanism based on local sensitive hashing and homomorphic encryption. The participants (electric vehicles and roadside units) first perform local sensitive hashing on the spatiotemporal identifiers to generate fuzzy features, and then encrypt the hash values ​​using the Paillier (partially homomorphic) encryption algorithm and upload them to the power grid server. The power grid calculates the similarity and identifies the common sample set in the encrypted state, effectively overcoming the matching failure caused by clock asynchrony and positioning drift, while ensuring that the privacy information in the identifiers is not leaked.

[0249] (2) Compared with related technologies, in order to ensure the security of intermediate results during model training, this invention designs a forward propagation protocol for a split neural network based on CKKS homomorphic encryption, dividing the neural network into three segments. First, the vehicle side uses local data to calculate the intermediate activation values ​​of the hidden layer, and then uses the CKKS algorithm to encrypt and send them to the roadside unit. The roadside unit combines its own regional features in the encrypted state to complete the subsequent calculation and transmit the results to the power grid server. After the server decrypts, it calculates the loss function, so that the original data features and intermediate results of all parties are protected in encrypted form throughout the entire model training process.

[0250] (3) Compared with related technologies, in order to reduce the risk of privacy leakage in the gradient exchange process and improve the convergence efficiency under non-independent and identically distributed data, the present invention introduces a backpropagation mechanism that combines secure multi-party computation (MPC) with adaptive optimization. The gradient calculation task is distributed to each participant through secret sharing. Then, each party calculates its own gradient components based on local data and jointly recovers the complete gradient through a secure aggregation protocol. The learning rate and gradient pruning threshold are dynamically adjusted by combining adaptive optimization algorithm, which improves the stability and convergence speed of model training while protecting the privacy of gradient calculation.

[0251] (4) Compared with related technologies, this invention systematically integrates fuzzy matching, homomorphic encryption and secure multi-party computation, and innovatively constructs a full-link privacy protection framework that simultaneously covers sample alignment, ciphertext forward propagation and secure gradient computation. It breaks through the limitations of single technologies and achieves the fusion of data features of all parties without disclosing any original information and intermediate results. This enables effective collaboration of data from vehicles, roads and networks, solves the data privacy exposure problem of traditional centralized modeling, and provides reliable technical support for vehicle-network interaction services.

[0252] (5) Compared with related technologies, this invention addresses the applicability of longitudinal federated learning in dynamic vehicle networking environments by employing a locality-sensitive hashing fuzzy alignment mechanism instead of the traditional exact matching scheme. This significantly improves the sample alignment success rate by tolerating extremely minor deviations in identifiers, preventing the loss of usable data due to network latency. Furthermore, the CKKS homomorphic encryption algorithm, due to its support for floating-point ciphertext computation and batch processing advantages of packet encoding, ensures secure computation during the forward propagation process while also considering the computational efficiency of the neural network. Compared with single differential privacy or traditional homomorphic encryption schemes, it better balances the strength of privacy protection, encryption computation efficiency, and the practicality of the model.

[0253] (6) Compared with related technologies, this invention designs a gradient update mechanism driven by secure multi-party computation and adaptive optimization. It achieves privacy protection in the gradient computation process through distributed secret sharing. Combined with dynamic learning rate adjustment and gradient pruning technology, it effectively addresses the non-independent and identically distributed characteristics of vehicle network data. Under the premise of avoiding gradient leakage, it improves the convergence speed and generalization ability of the model, and provides an innovative idea for solving the contradiction between stability and security in complex scenarios of vertical federated learning.

[0254] 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 the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. 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 the present invention.

[0255] 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 the present invention, 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 of the various embodiments of the present invention.

[0256] Example 2

[0257] According to embodiments of the present invention, an apparatus for implementing the above-described vehicle-to-grid (V2G) model parameter update method is also provided. Figure 5 This is a structural block diagram of a model parameter update device based on vehicle-to-everything (V2X) interaction according to an embodiment of the present invention, such as... Figure 5 As shown, the device includes: an acquisition module 502, a first determination module 504, a second determination module 506, a third determination module 508, a fourth determination module 510, and a fifth determination module 512. The device will be described in detail below.

[0258] The acquisition module 502 is used to acquire feature representation parameters corresponding to multiple target terminals in a vehicle-to-grid interaction scenario, wherein the corresponding feature representation parameters are used to represent the terminal features of the corresponding target terminals; the first determination module 504, connected to the acquisition module 502, is used to determine the predicted output of the power dispatching model based on the feature representation parameters corresponding to the multiple target terminals; the second determination module 506, connected to the first determination module 504, is used to determine the model output deviation of the power dispatching model based on the predicted output and the reference output of the power dispatching model, wherein the power dispatching model includes sub-models corresponding to the multiple target terminals; the third determination module 508, connected to the second determination module 506, is used to determine the model output deviation based on the model output deviation. The first determination module 508 is connected to the second determination module 510. It divides the update requirement parameters into multiple sub-requirement parameters and distributes them to the corresponding target terminals to obtain update operation parameters corresponding to the sub-models of the multiple target terminals. The corresponding update operation parameters characterize the operation characteristics of updating the model parameters of the sub-models of the corresponding target terminals. The second determination module 512 is connected to the third determination module 510. It updates the model parameters of the power dispatch model based on the update operation parameters of the sub-models corresponding to the multiple target terminals.

[0259] It should be noted that the above-mentioned acquisition module 502, first determination module 504, second determination module 506, third determination module 508, fourth determination module 510, and fifth determination module 512 correspond to steps S102 to S112 in the implementation of the model parameter update method based on vehicle-to-everything (V2X) interaction. The multiple modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in the above embodiment 1.

[0260] Example 3

[0261] According to another aspect of the present invention, an electronic device is also provided, comprising: a processor; and a memory for storing processor-executable instructions, wherein the processor is configured to execute instructions to implement the vehicle-to-everything (V2X) interaction-based model parameter update method of any of the above embodiments.

[0262] Example 4

[0263] According to another aspect of the present invention, a computer-readable storage medium is also provided, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform any of the above-described vehicle-to-grid interaction-based model parameter update methods.

[0264] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0265] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0266] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0267] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0268] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0269] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0270] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for updating model parameters based on vehicle-to-everything (V2X) interaction, characterized in that, include: In the context of vehicle-to-everything (V2X) interaction, feature representation parameters are obtained for each of the multiple target terminals, wherein the corresponding feature representation parameters are used to represent the terminal features of the corresponding target terminal. Based on the feature representation parameters corresponding to the multiple target terminals, the predicted output of the power dispatching model is determined; Based on the predicted output and the reference output of the power dispatch model, the model output deviation of the power dispatch model is determined, wherein the power dispatch model includes sub-models corresponding to multiple target terminals respectively; Based on the model output deviation, update requirement parameters corresponding to the power dispatch model are determined, wherein the update requirement parameters are used to characterize the demand characteristics of the power dispatch model for updating model parameters; The update requirement parameters are divided into multiple sub-requirement parameters, which are then sent to the corresponding target terminals to obtain update operation parameters corresponding to the sub-models of the multiple target terminals. The corresponding update operation parameters are used to characterize the operation features of updating the model parameters of the sub-models of the corresponding target terminals. The power dispatch model is updated based on the update operation parameters of the sub-models corresponding to the multiple target terminals.

2. The method according to claim 1, characterized in that, Before obtaining the feature representation parameters corresponding to multiple target terminals in the vehicle-to-everything (V2X) interaction scenario, the following steps are included: Identify the power grid terminal and multiple device terminals in the vehicle-to-grid interaction scenario; Based on the encrypted identifier parameters corresponding to the plurality of device terminals, a matching index is determined among the plurality of device terminals; Based on the matching index between the plurality of device terminals, a plurality of terminal groups are determined from the plurality of device terminals, wherein the plurality of terminal groups respectively include a first terminal corresponding to an electric vehicle and a second terminal corresponding to a regional device; Based on the plurality of terminal groups and the power grid terminal, the plurality of target terminals are determined.

3. The method according to claim 2, characterized in that, Before determining the matching index between the multiple device terminals based on the encrypted identifier parameters corresponding to each of the multiple device terminals, the following steps are included: Determine the timestamps and location coordinates corresponding to the plurality of device terminals respectively; Based on the timestamps and location coordinates corresponding to the plurality of device terminals, spatiotemporal identification parameters corresponding to the plurality of device terminals are determined, wherein the corresponding spatiotemporal identification parameters are identification parameters used to characterize the spatiotemporal features of the corresponding device terminals; The spatiotemporal identifier parameters corresponding to each of the multiple device terminals are encrypted to obtain encrypted identifier parameters corresponding to each of the multiple device terminals.

4. The method according to claim 1, characterized in that, The step of determining the predicted output of the power dispatching model based on the feature representation parameters corresponding to the multiple target terminals includes: When the plurality of target terminals include a power grid terminal, a first terminal corresponding to an electric vehicle, and a second terminal corresponding to a regional device, a first encrypted output is determined based on the feature characterization parameters corresponding to the first terminal. Based on the first encrypted output and the feature representation parameters corresponding to the second terminal, the second encrypted output is determined; Based on the second encrypted output and the feature representation parameters corresponding to the power grid terminal, the predicted output of the power dispatch model is determined.

5. The method according to claim 1, characterized in that, The step of updating the power dispatch model parameters based on the update operation parameters of the sub-models corresponding to the multiple target terminals includes: Based on the update operation parameters corresponding to the multiple target terminals, the parameter update amount corresponding to the power dispatch model is determined; The power dispatch model parameters are updated based on the parameter update amount.

6. The method according to claim 5, characterized in that, After updating the model parameters of the power dispatching model based on the update operation parameters of the sub-models corresponding to the multiple target terminals, the process further includes: The power dispatch model is updated to obtain updated parameters, wherein the updated parameters include multiple sub-update parameters; The multiple sub-update parameters are respectively sent to the corresponding target terminals among the multiple target terminals, so as to update the model parameters of the sub-model of the corresponding target terminal.

7. The method according to any one of claims 1 to 6, characterized in that, The step of dividing the update requirement parameters into multiple sub-requirement parameters and distributing them to the corresponding target terminals to obtain update operation parameters corresponding to the sub-models of the multiple target terminals includes: Determine the forward propagation data of the sub-models corresponding to the plurality of target terminals respectively; Based on the forward propagation data of the sub-models corresponding to the multiple target terminals, and the sub-requirement parameters corresponding to the multiple target terminals, back propagation is performed based on the sub-models corresponding to the multiple target terminals to obtain the update operation parameters corresponding to the sub-models corresponding to the multiple target terminals.

8. A model parameter update device based on vehicle-to-everything (V2X) interaction, characterized in that, include: The acquisition module is used to acquire feature representation parameters corresponding to multiple target terminals in the vehicle-to-everything (V2X) interaction scenario, wherein the corresponding feature representation parameters are used to represent the terminal features of the corresponding target terminals. The first determining module is used to determine the predicted output of the power dispatching model based on the feature representation parameters corresponding to the multiple target terminals respectively. The second determining module is used to determine the model output deviation of the power dispatching model based on the predicted output and the reference output of the power dispatching model, wherein the power dispatching model includes sub-models corresponding to multiple target terminals respectively; The third determining module is used to determine the update requirement parameters corresponding to the power dispatch model based on the model output deviation, wherein the update requirement parameters are used to characterize the demand characteristics of the power dispatch model for updating model parameters; The fourth determining module is used to divide the update requirement parameters into multiple sub-requirement parameters and send them to the corresponding target terminals respectively to obtain update operation parameters corresponding to the sub-models of the multiple target terminals respectively. The corresponding update operation parameters are used to characterize the operation features of updating the model parameters of the sub-models of the corresponding target terminals. The fifth determining module is used to update the model parameters of the power dispatching model based on the update operation parameters of the sub-models corresponding to the multiple target terminals.

9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the model parameter update method based on vehicle-to-everything (V2X) interaction as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the model parameter update method based on vehicle-to-everything (V2X) interaction as described in any one of claims 1 to 7.