A method, device, chip and terminal for optimizing power distribution based on V2G network

Through smart grid acquisition and screening of tram transaction data in the V2G network, federated learning is performed to optimize the global model, which solves the sustainability and stability issues of power distribution in V2G technology and improves the efficiency and accuracy of power distribution.

CN118336758BActive Publication Date: 2024-09-17CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410439210.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-12
Publication Date
2024-09-17
Estimated Expiration
2044-04-12

AI Technical Summary

Technical Problem

V2G technology lacks sustainability and stability in power distribution, especially when a large number of electric vehicles are charging or discharging at the same time, which may cause grid shocks, leading to voltage fluctuations or frequency deviations.

Method used

Obtain basic transaction data through the smart grid, set the initial weight of tram transaction information, conduct self-verification through data size and frequency of occurrence, screen out key data for federated learning optimization, and update the global model to adjust the power supply plan.

Benefits of technology

It improves the sustainability and stability of power distribution, optimizes the utilization efficiency and accuracy of transaction data, and solves the problem of power shortage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118336758B
    Figure CN118336758B
Patent Text Reader

Abstract

The embodiment of the present invention discloses a method, device, chip and terminal for optimizing power distribution based on a V2G network, which is applied to a V2G network in which a mobile terminal participates. The method first sets the initial weights of various tram transaction information, and then screens out key data in the basic transaction data according to the initial weights and attributes. The key data is used as training data required by the mobile terminal and is stored through a cloud storage server to improve the utilization efficiency and accuracy of transaction data in power distribution optimization. In addition, the mobile terminal performs federated learning based on the provided training data, optimizes and updates the local model of the mobile terminal, and then optimizes and updates the global model. Since the transaction data is closely related to electricity, this part also optimizes the power supply plan of the final output. Power distribution according to the power supply plan can solve the problem of power shortage and has good sustainability and stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power distribution, and in particular to a power distribution optimization method, device, chip and terminal based on a V2G network. Background Art

[0002] V2G (Vehicle-to-Grid) technology mainly involves the interaction between electric vehicles as clients and the power grid, including pure electric vehicles that support two-way power exchange to absorb electricity when the grid load is low and release electricity as an emergency power source when the grid load is high. Figure 1 As shown in the figure, taking a parking lot that provides a V2G network as an example, electric vehicles can access the V2G network through dedicated facilities in the parking lot and provide auxiliary services to the smart grid under the control of the local aggregator. Electric vehicles have three states: charging, discharging, and distributed discharging. Charging is initiated by the electric vehicle. In the charging state, electricity is transmitted from the smart grid to the electric vehicle. At this time, the electric vehicle needs to pay electricity fees to the smart grid. Discharging is initiated by the smart grid when the grid is overloaded during peak user demand hours. In the discharging state, electric vehicles can alleviate power shortages by discharging to the grid and can obtain economic rewards. Distributed discharging is initiated by one or more electric vehicles when the battery capacity is below a certain threshold. Unlike the charging state, electric vehicles with sufficient power will temporarily act as energy suppliers for electric vehicles with insufficient power. Electric vehicles with insufficient power need to pay electricity fees to energy suppliers.

[0003] Therefore, V2G technology shares the grid load to a certain extent and can temporarily solve the power shortage. However, adjusting power distribution only through grid load lacks sustainability and stability. For example, when a large number of electric vehicles are charging or discharging at the same time, it may cause an impact on the grid, resulting in voltage fluctuations or frequency deviations. Summary of the invention

[0004] Based on this, the present invention provides a power distribution optimization method, device, chip and terminal based on a V2G network, which can solve the problem of power shortage and has good sustainability and stability.

[0005] In a first aspect, a method for optimizing power distribution based on a V2G network is provided, which is applied to a V2G network in which a mobile terminal participates. The method comprises:

[0006] S1: The smart grid obtains basic transaction data in the target charging station, where the basic transaction data includes a variety of electric vehicle transaction information;

[0007] S2: Set the initial weight of each type of tram transaction information according to the data source;

[0008] S3: Obtaining attributes of each type of tram transaction information, wherein the attributes include the data size of each type of tram transaction information, the median of the data size, the occurrence frequency of each type of tram transaction information, and the median of the occurrence frequency;

[0009] S4: self-verify through the initial weight and attributes of each tram transaction information, screen out key data in the basic transaction data, upload the key data to the cloud storage server, and store it as target training data;

[0010] Among them, multiple mobile terminals using the target charging station service train local models based on the target training data stored in the cloud storage server, and use federated learning with the central server to update local model parameters;

[0011] S5: Execute S1 to S4 for K charging stations to obtain training model parameters of the K charging stations, wherein the training model parameters of any charging station include local model parameters obtained after multiple mobile terminals using the service of this charging station are updated through federated learning;

[0012] S6: Use the federated averaging algorithm to aggregate the training model parameters of the K charging stations. The aggregated training model parameters are used to update the global model, and the updated global model is sent back to all mobile terminals that use the charging station service.

[0013] S7: Repeat S1 to S6 to obtain the global model after multiple updates, so that each charging station obtains the global model after multiple updates and adjusts the power supply plan according to the global model after multiple updates.

[0014] Optionally, the initial weight of each type of tram transaction information is set according to the data source, including:

[0015] The initial weight relationship is adjusted as follows: the initial weight of the tram transaction information whose data source is the electric vehicle ≥ the initial weight of the tram transaction information whose data source is the charging station ≥ the initial weight of the tram transaction information whose data source is the smart grid.

[0016] Optionally, self-verification is performed through the initial weight and attributes of each tram transaction information, the formula is:

[0017] F = Verify(w″ i ,w′ i ,w i );

[0018] w i is the initial weight of the i-th tram transaction information, i=1,2,...,n, n means that the basic transaction data includes n types of tram transaction information;

[0019] Where, A represents the data size of the i-th tram transaction information, A = getMean(s1, s2, ..., s i ,…,s n ), represents the median of the data size among the data sizes of n types of tram transaction information;

[0020] Among them, f i represents the frequency of occurrence of the i-th tram transaction information, B = getMean(f1,f2,...,f i ,…,f n ), which represents the median of the frequency of occurrence among n types of tram transaction information;

[0021] If w″ i ≥w i ||w' i ≥w i , then the i-th tram transaction information is the key data;

[0022] If w″ i <w i &&w' i <w i , then the i-th tram transaction information is low-weight data.

[0023] Optionally, it also includes:

[0024] When the i-th tram transaction information is low-weight data, the i-th tram transaction information is returned to the local aggregator, and the data included in the i-th tram transaction information is processed by exponential weighted average;

[0025] According to the processed i-th tram transaction information, return to S3.

[0026] Optionally, a public key and a private key are generated by a hybrid secondary encryption algorithm, and the public key is sent to a cloud storage server, and the private key is sent to multiple mobile terminals that use the target charging station service.

[0027] Optionally, before uploading the target training data to the cloud storage server for storage in S5, the following steps are performed:

[0028] Encrypting the target training data so that the cloud storage server stores the encrypted ciphertext;

[0029] After uploading the target training data to the cloud storage server for storage in S5, the following steps are included:

[0030] Multiple mobile terminals using the target charging station service download the ciphertext from the cloud storage server through the private key.

[0031] Optionally, the hybrid secondary encryption algorithm includes asymmetric encryption and homomorphic encryption.

[0032] In a second aspect, a power distribution optimization device based on a V2G network is provided, which is applied to a V2G network in which a mobile terminal participates, and the device includes:

[0033] A basic data acquisition module, used to acquire basic transaction data in a target charging station, wherein the basic transaction data includes a variety of electric vehicle transaction information;

[0034] An initial weight setting module is used to set the initial weight of each type of tram transaction information according to the data source;

[0035] An attribute acquisition module, which acquires the attributes of each type of tram transaction information, wherein the attributes include the data size of each type of tram transaction information, the median of the data size, the occurrence frequency of each type of tram transaction information, and the median of the occurrence frequency;

[0036] A key data screening module is used to perform self-verification through the initial weight and attributes of each tram transaction information, screen out key data in the basic transaction data, upload the key data to the cloud storage server, and store it as target training data;

[0037] Among them, multiple mobile terminals using the target charging station service train local models based on the target training data stored in the cloud storage server, and use federated learning with the central server to update local model parameters;

[0038] A training model parameter acquisition module is used to sequentially execute the basic data acquisition module to the key data screening module on the K charging stations to obtain the training model parameters of the K charging stations, wherein the training model parameters of any charging station include the local model parameters obtained after multiple mobile terminals using the service of this charging station are updated through federated learning;

[0039] The global model update module is used to aggregate the training model parameters of K charging stations using the federated averaging algorithm. The aggregated training model parameters are used to update the global model, and the updated global model is sent back to all mobile terminals that use the charging station service.

[0040] The power supply scheme adjustment module is used to repeatedly execute the basic data acquisition module to the global model update module in sequence to obtain the global model after multiple updates, so that each charging station obtains the global model after multiple updates and adjusts the power supply scheme according to the global model after multiple updates.

[0041] In a third aspect, a chip is provided, comprising a first processor, configured to call and run a computer program from a first memory, so that a device equipped with the chip executes the various steps of the V2G network-based power distribution optimization method as described above.

[0042] In a fourth aspect, a terminal is provided, comprising a second memory, a second processor, and a computer program stored in the second memory and executable on the second processor, wherein the second processor implements the various steps of the V2G network-based power distribution optimization method as described above when executing the computer program.

[0043] The above-mentioned V2G network-based power distribution optimization method, device, chip and terminal first set the initial weights of various tram transaction information, and then filter out the key data in the basic transaction data according to the initial weights and attributes. The key data is used as training data required by the mobile terminal and stored through the cloud storage server to improve the utilization efficiency and accuracy of transaction data in power distribution optimization. In addition, the mobile terminal performs federated learning based on the provided training data, optimizes and updates the local model of the mobile terminal, and then optimizes and updates the global model. Since the transaction data is closely related to electricity, this part also optimizes the final output power supply plan. Power distribution according to the power supply plan can solve the problem of power shortage and has good sustainability and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 This is a schematic diagram of the actual application of a V2G network according to an embodiment of the present invention;

[0046] Figure 2 A schematic diagram of a basic flow chart of a method for optimizing power distribution based on a V2G network according to an embodiment of the present invention;

[0047] Figure 3 A schematic diagram of a practical application of a V2G network in which a mobile terminal participates according to an embodiment of the present invention;

[0048] Figure 4 A schematic diagram of a data processing flow for key generation according to an embodiment of the present invention;

[0049] Figure 5 A schematic diagram of a data processing flow for generating ciphertext according to an embodiment of the present invention;

[0050] Figure 6 A schematic diagram of a data processing flow for decryption on a mobile terminal according to an embodiment of the present invention;

[0051] Figure 7This is a basic structural block diagram of a power distribution optimization device based on a V2G network according to an embodiment of the present invention;

[0052] Figure 8 A basic structural block diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0054] In some of the processes described in the specification and claims of the present invention and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0056] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0057] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0058] like Figure 2As shown, the embodiment of the present invention provides a power distribution optimization method based on a V2G network, which is applied to Figure 3 The V2G network in which the mobile terminal participates is shown. When the mobile terminal participates in the V2G network, the transaction data generated under the charging state, discharging state and distributed discharging state of the electric vehicle can be uploaded to the mobile terminal, so that the embodiment of the present invention learns the mobile terminal data through the following steps to optimize the power distribution problem. The power distribution optimization method based on the V2G network of the embodiment of the present invention includes but is not limited to the following steps:

[0059] S1: The smart grid obtains basic transaction data in a target charging station, where the basic transaction data includes a variety of electric vehicle transaction information.

[0060] like Figure 3 As shown, when electric vehicles are charged, discharged, or distributedly discharged at a charging station, basic transaction data will be generated in the payment system of the target charging station.

[0061] The basic transaction data used in the embodiments of the present invention include, by way of example, the total number of times the vehicle is charged, the start time of charging the vehicle, the end time of charging the vehicle, the mileage of the vehicle, the payment information of the vehicle (id, unit price of electricity, payment method, payment status, etc.), basic user information (user_id, license plate number, vehicle model), the number of charging piles, the evaluation of the charging piles, the failure rate of the charging piles, the utilization rate of the charging piles, the number of maintenance times for the charging piles, the status of the charging piles, the load on the power grid during use, the charging period, etc.

[0062] In the above step S1 and the following steps S12 to S5, the embodiment of the present invention first processes the basic transaction data of a charging station.

[0063] S2: Set the initial weight of each type of tram transaction information according to the data source.

[0064] In the embodiment of the present invention, based on the V2G network participated by the mobile terminal, the data sources of the basic transaction data include electric vehicles, charging stations, and smart grids. Therefore, in the above step S2, different initial weights are set for the electric vehicle transaction information with different data sources, including:

[0065] The initial weight relationship is adjusted as follows: the initial weight of the tram transaction information whose data source is the electric vehicle ≥ the initial weight of the tram transaction information whose data source is the charging station ≥ the initial weight of the tram transaction information whose data source is the smart grid.

[0066] Exemplarily, the data source is the electric vehicle transaction information of electric vehicles, such as the total number of charging times of the vehicle, the start time of charging of the vehicle, the end time of charging of the vehicle, etc., and the initial weights of these types of electric vehicle transaction information are set to 1; the data source is the electric vehicle transaction information of the charging station, such as the number of charging piles, the evaluation of the charging piles, the failure rate of the charging piles, etc., and the initial weights of these types of electric vehicle transaction information are set to 0.9; the data source is the electric vehicle transaction information of the smart grid, such as the load of the grid during use, the charging period, etc., and the initial weights of these types of electric vehicle transaction information are set to 0.8.

[0067] The embodiment of the present invention adjusts the weight relationship of the tram transaction information according to the data source, which is consistent with the distribution of each data in the basic transaction data. Moreover, it can be understood that through the above steps, the initial weight of the transaction data with the same source is the same.

[0068] S3: Acquire attributes of each type of tram transaction information, wherein the attributes include the data size of each type of tram transaction information, the median of the data size, the occurrence frequency of each type of tram transaction information, and the median of the occurrence frequency.

[0069] It should be noted that, taking the total number of vehicle charging times C, the mileage of the vehicle M, the number of charging piles N, the utilization rate of the charging piles U, and the charging period P in the basic transaction data as an example, C is the first type of tram transaction information, M is the second type of tram transaction information, N is the third type of tram transaction information, U is the fourth type of tram transaction information, and P is the fifth type of tram transaction information. Through the above step s3, the data size of the first type of tram transaction information C is s1, the data size of the second type of tram transaction information M is s2, the data size of the third type of tram transaction information N is s3, the data size of the fourth type of tram transaction information U is s4, and the data size of the fifth type of tram transaction information P is s5. Assuming that s1>s2>s3>s4>s5, the data size of the third type of tram transaction information N is the median of the data sizes of the above five types of tram transaction information. The frequency of occurrence of the first type of tram transaction information C is f1 times, the frequency of occurrence of the second type of tram transaction information M is f2 times, the frequency of occurrence of the third type of tram transaction information N is f3 times, the frequency of occurrence of the fourth type of tram transaction information U is f4 times, and the frequency of occurrence of the fifth type of tram transaction information P is f5 times. Assuming f1>f2>f3>f4>f5, the frequency of occurrence of the third type of tram transaction information N is the median of the frequency of occurrence of the above five types of tram transaction information.

[0070] S4: self-verify through the initial weights and attributes of each tram transaction information, screen out key data in the basic transaction data, upload the key data to the cloud storage server, and store it as target training data.

[0071] In the V2G network, the interaction between electric vehicles as clients and the power grid is frequent, resulting in a large amount of transaction data. There are problems such as valuable data being wasted and defective data being used. Therefore, as Figure 2 and Figure 3 shown, in the embodiment of the present invention, the key data in the basic transaction data is screened and classified through the above step S4, and the data with a large amount and strong data analyzability is uploaded to the cloud storage server for mobile use, improving the utilization efficiency and accuracy of transaction data in power distribution optimization. At the same time, sufficient storage space is also provided for the local storage of electric vehicles to record updated data.

[0072] One implementation manner of the above step S4 is:

[0073] Perform self-verification through the initial weight and attributes of each electric vehicle transaction information, and the formula is:

[0074] F = Verify(w″ i , w′ i , w i );

[0075] w i is the initial weight of the i-th electric vehicle transaction information, i = 1, 2,..., n, and n represents that the basic transaction data includes n types of electric vehicle transaction information;

[0076] Among them, represents the data size of the i-th electric vehicle transaction information, A = getMean(s1, s2,..., s i ,…, s n ), represents the median of the data sizes in the data sizes of n types of electric vehicle transaction information;

[0077] Among them, f i represents the occurrence frequency of the i-th electric vehicle transaction information, B = getMean(f1, f2,..., f i ,…, f n ), represents the median of the occurrence frequencies in the occurrence frequencies of n types of electric vehicle transaction information;

[0078] If w″ i ≥ w i || w′ i ≥ wi, then the i-th electric vehicle transaction information is key data;

[0079] If w″ i < w i && w′ i < wi, then the i-th electric vehicle transaction information is low-weight data.

[0080] The key data obtained in the above steps are uploaded to the cloud storage server and stored as target training data, and Figure 2 and Figure 3 As shown, in an embodiment of the present invention, multiple mobile terminals using the target charging station service respectively train local models based on the target training data stored in the cloud storage server, and perform federated learning in conjunction with the central server to update local model parameters.

[0081] Exemplarily, the federated learning is performed in conjunction with the central server to update the local model parameters of multiple mobile terminals served by the target charging station, and the implementation steps are as follows:

[0082] 1. Initialize a basic neural network model on the central server.

[0083] 2. Each mobile user loads local data and prepares it in a format that TFF can process, and uses the TensorFlowFederated framework to build and train a local model.

[0084] 3. Send the trained model parameters to the central server regularly.

[0085] 4. The central server accepts model parameters from each mobile terminal and aggregates all parameters using the Federated Averaging algorithm.

[0086] 5. The aggregated model parameters update the global model and are sent back to each participant.

[0087] In one embodiment, when the i-th tram transaction information is low-weight data, the i-th tram transaction information is returned to the local aggregator, and the data included in the i-th tram transaction information is processed by exponential weighted average;

[0088] According to the processed i-th tram transaction information, return to S3.

[0089] In a specific application, assuming that in t interactions between an electric vehicle as a client and the power grid, the i-th electric vehicle transaction information includes a valid data sequence v1, v2, v3, ... v t , any valid data sequence v after processing i The exponentially weighted average of i , EMA i =α*x i +(1-α)*EMA i-1 , where x i For this valid data sequence v iThe effective value of α is that the larger the α is, the greater the impact of the latest data is; the smaller α is, the greater the impact of past data is. Local data should be continuously updated, and redundant historical data should not be stored as much as possible. Therefore, in one embodiment, α is 0.9, and the initial value EMA1=x1. Thus, the local data stored in the local aggregator, i.e., the processed i-th tram transaction information, is more sensitive to recent data, better reflects data trends, identifies turning points and inflection points, and can be used to predict data trends.

[0090] S5: Execute S1 to S4 for K charging stations to obtain training model parameters of the K charging stations, wherein the training model parameters of any charging station include local model parameters obtained after multiple mobile terminals using the service of this charging station are updated through federated learning.

[0091] S6: Use the federated averaging algorithm to aggregate the training model parameters of K charging stations. The aggregated training model parameters are used to update the global model, and the updated global model is sent back to all mobile terminals that use the charging station service.

[0092] S7: Repeat S1 to S6 to obtain the global model after multiple updates, so that each charging station obtains the global model after multiple updates and adjusts the power supply plan according to the global model after multiple updates.

[0093] The power supply scheme adjusted in the above step S7 can be used to construct power distribution optimization of smart cities, including adjusting the charging and discharging strategy of electric vehicles, power distribution of photovoltaic energy storage systems, etc.

[0094] Through the above steps S1 to S7, the embodiment of the present invention optimizes the information utilization and improvement scheme of power distribution through federated learning, and solves the problem of insufficient utilization of effective data in the transaction process by classifying and processing the relevant data generated by automobile transactions. After classification, the data can be divided into low-weight data local to the electric vehicle and key data uploaded to the mobile terminal, and then learning is performed based on the key data in the mobile terminal to optimize the power distribution problem.

[0095] In addition, the embodiment of the present invention also uses a hybrid algorithm of homomorphic encryption and asymmetric encryption to encrypt data when uploading it to the mobile terminal, thereby improving the security of user privacy. A detailed implementation of the above step S5 includes:

[0096] First, a public key and a private key are generated by a hybrid secondary encryption algorithm, and the public key is sent to a cloud storage server, and the private key is sent to multiple mobile terminals that use the target charging station service. Then, before uploading the target training data to the cloud storage server for storage in S5, it includes: encrypting the target training data so that the cloud storage server stores the encrypted ciphertext; after uploading the target training data to the cloud storage server for storage in S5, it includes: multiple mobile terminals that use the target charging station service download the ciphertext from the cloud storage server through the private key.

[0097] Among them, the hybrid secondary encryption algorithm includes asymmetric encryption and homomorphic encryption.

[0098] Take the hybrid secondary encryption algorithm of asymmetric encryption and homomorphic encryption as an example, Figure 4 As shown, the embodiment of the present invention also shows a data processing flow for key generation, that is, the above-mentioned generation of a public key and a private key by a hybrid secondary encryption algorithm, and sending the public key to a cloud storage server, and sending the private key to multiple mobile terminals using the target charging station service, and the implementation steps include:

[0099] 1. Use the Sieve of Eratosthenes algorithm to generate an initial set of prime number candidates, and use the Miller-Rabin primality detection algorithm to perform primality testing to ensure that the data set is all prime numbers, and store them in a prime number library for direct use when generating keys, thereby saving time.

[0100] 2. Randomly select two large prime numbers m and n from the prime number database, satisfying gcd(mn,(m-1)(n-1))=1 and m and n are relatively prime, and let ε=m*n.

[0101] 3. From the Euler function ψ(ε)=ψ(m)*ψ(n)=(m-1)(n-1), we can get η=lcm(m-1,n-1), where lcm represents the least common multiple.

[0102] 4. Take a prime number α from the prime number database that is relatively prime to η and smaller than η, satisfying the following conditions: 1<α<η and gcd(α,η)=1, where gcd represents the greatest common divisor.

[0103] 5. The private key exponent δ satisfies: 1<δ<η and α*δmodη≡1. Thus, the first pair of keys is generated, and pk1=(α,ε), sk1=(δ,ε).

[0104] 6. Random integer calculate in

[0105] 7. Generate the second pair of keys, sk2=(η,λ).

[0106] 8. Distribute public keys pk1 and pk2 to the cloud storage server.

[0107] 9. The private keys sk1 and sk2 are synchronized from the local to the mobile terminal, which can be transmitted by Bluetooth or USB.

[0108] like Figure 5 As shown, the embodiment of the present invention also shows a data processing flow for generating ciphertext, that is, the above-mentioned encryption of the target training data so that the cloud storage server stores the encrypted ciphertext, and its implementation steps include:

[0109] 1. The vehicle safety system performs the following operations on the plaintext message P: randomly select ρ to satisfy 0≤ρ<ε and Calculate ciphertext 0≤P<ε.

[0110] 2. Secondary encryption, calculation of ciphertext 0≤C1<ε.

[0111] 3. Store the hybrid encrypted ciphertext on the cloud storage server.

[0112] like Figure 6 As shown, the embodiment of the present invention also shows a data processing flow of mobile terminal decryption, that is, the above-mentioned multiple mobile terminals using the target charging station service download the ciphertext from the cloud storage server through the private key, and the implementation steps include:

[0113] 1. The cloud storage server transmits the ciphertext C2 to the mobile terminal.

[0114] 2. The mobile terminal calculates P' = C2 δ modε performs the first decryption to obtain the Paillier ciphertext.

[0115] 3. Using Decrypt(P') = P δ modε=P is used to verify the correctness of the first decryption.

[0116] 4. The mobile terminal then calculates P”=φ(P' η modε 2 )*λmodε performs a second decryption to obtain the plaintext P".

[0117] 5. Use Decrypt(P”)=P’modε to verify the correctness of the second decryption.

[0118] In order to solve the above technical problems, the embodiment of the present invention also provides a power distribution optimization device based on a V2G network. Please refer to 7 for details. Figure 7 The basic structural block diagram of the power distribution optimization device based on the V2G network is provided for this implementation, including:

[0119] A basic data acquisition module, used to acquire basic transaction data in a target charging station, wherein the basic transaction data includes a variety of electric vehicle transaction information;

[0120] An initial weight setting module is used to set the initial weight of each type of tram transaction information according to the data source;

[0121] An attribute acquisition module, which acquires the attributes of each type of tram transaction information, wherein the attributes include the data size of each type of tram transaction information, the median of the data size, the occurrence frequency of each type of tram transaction information, and the median of the occurrence frequency;

[0122] A key data screening module is used to perform self-verification through the initial weight and attributes of each tram transaction information, screen out key data in the basic transaction data, upload the key data to the cloud storage server, and store it as target training data;

[0123] Among them, multiple mobile terminals using the target charging station service train local models based on the target training data stored in the cloud storage server, and use federated learning with the central server to update local model parameters;

[0124] A training model parameter acquisition module is used to sequentially execute the basic data acquisition module to the key data screening module on the K charging stations to obtain the training model parameters of the K charging stations, wherein the training model parameters of any charging station include the local model parameters obtained after multiple mobile terminals using the service of this charging station are updated through federated learning;

[0125] The global model update module is used to aggregate the training model parameters of K charging stations using the federated averaging algorithm. The aggregated training model parameters are used to update the global model, and the updated global model is sent back to all mobile terminals that use the charging station service.

[0126] The power supply scheme adjustment module is used to repeatedly execute the basic data acquisition module to the global model update module in sequence to obtain the global model after multiple updates, so that each charging station obtains the global model after multiple updates and adjusts the power supply scheme according to the global model after multiple updates.

[0127] To solve the above technical problems, an embodiment of the present invention further provides a chip, which can be a general-purpose processor or a dedicated processor. The chip includes a processor, and the processor is used to support the terminal to execute the above related steps, such as calling and running a computer program from a memory, so that the device equipped with the chip is executed to implement the power distribution optimization method based on the V2G network in the above various embodiments.

[0128] Optionally, in some examples, the chip further includes a transceiver, which is used to accept the control of the processor and to support the terminal to execute the above-mentioned related steps to implement the power distribution optimization method based on the V2G network in the above-mentioned embodiments.

[0129] Optionally, the chip may also include a storage medium.

[0130] It should be noted that the chip can be implemented using the following circuits or devices: one or more field programmable gate arrays (FPGA), programmable logic devices (PLD), controllers, state machines, gate logic, discrete hardware components, any other suitable circuits, or any combination of circuits that can perform the various functions described throughout this application.

[0131] The present invention also provides a terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the power distribution optimization method based on the V2G network as described in the above-mentioned embodiments are implemented.

[0132] Please refer to Figure 8 , Figure 8 The basic structural block diagram of a terminal shown in FIG. 1 includes a processor, a non-volatile storage medium, a memory, and a network interface connected via a system bus. The non-volatile storage medium of the terminal stores an operating system, a database, and a computer-readable instruction. The database may store a control information sequence. When the computer-readable instruction is executed by the processor, the processor may implement a method for optimizing power distribution based on a V2G network. The processor of the terminal is used to provide computing and control capabilities to support the operation of the entire terminal. The memory of the terminal may store computer-readable instructions. When the computer-readable instruction is executed by the processor, the processor may execute a method for optimizing power distribution based on a V2G network. The network interface of the terminal is used to connect and communicate with the terminal. It can be understood by those skilled in the art that the structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal to which the scheme of the present application is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0133] It will be understood by those skilled in the art that the "terminal" and "terminal device" used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capabilities, and devices with receiving and transmitting hardware, which are electronic devices with receiving and transmitting hardware capable of performing two-way communications on a two-way communication link. Such electronic devices may include: cellular or other communication devices, which have a single-line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications Service), which may combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / intranet access, a web browser, a notepad, a calendar and / or a GPS (Global Positioning System) receiver; conventional laptop and / or palmtop computers or other devices, which have and / or include a conventional laptop and / or palmtop computer or other device with a radio frequency receiver. The "terminal" and "terminal device" used herein may be portable, transportable, installed in a vehicle (air, sea and / or land), or adapted and / or configured to operate locally, and / or in a distributed form, at any other location on the earth and / or in space. The "terminal" and "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playing terminal, such as a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playing function, or a smart TV, a set-top box and other devices.

[0134] The present invention also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, enables the one or more processors to execute the steps of the V2G network-based power distribution optimization method described in the above-mentioned embodiments.

[0135] This embodiment also provides a computer program, which can be distributed on a computer-readable medium and executed by a computing device to implement at least one step of the V2G network-based power distribution optimization method described in the above embodiments; and in some cases, at least one of the steps shown or described can be executed in an order different from that described in the above embodiments.

[0136] This embodiment further provides a computer program product, including a computer readable device, on which the computer program shown above is stored. In this embodiment, the computer readable device may include the computer readable storage medium shown above.

[0137] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0138] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0139] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0140] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A method for optimizing power distribution based on a V2G network, characterized in that: Applied to a V2G network in which a mobile terminal participates, the method includes: S1: The smart grid obtains basic transaction data in the target charging station, where the basic transaction data includes a variety of electric vehicle transaction information; S2: Set the initial weight of each type of tram transaction information according to the data source; S3: Obtaining attributes of each type of tram transaction information, wherein the attributes include the data size of each type of tram transaction information, the median of the data size, the occurrence frequency of each type of tram transaction information, and the median of the occurrence frequency; S4: self-verify through the initial weight and attributes of each tram transaction information, screen out key data in the basic transaction data, upload the key data to the cloud storage server, and store it as target training data; Among them, multiple mobile terminals using the target charging station service train local models based on the target training data stored in the cloud storage server, and use federated learning with the central server to update local model parameters; S5: Execute S1 to S4 for K charging stations to obtain training model parameters of the K charging stations, wherein the training model parameters of any charging station include local model parameters obtained after multiple mobile terminals using the service of this charging station are updated through federated learning; S6: Use the federated averaging algorithm to aggregate the training model parameters of the K charging stations. The aggregated training model parameters are used to update the global model, and the updated global model is sent back to all mobile terminals that use the charging station service. S7: Repeat S1 to S6 to obtain the global model after multiple updates, so that each charging station obtains the global model after multiple updates and adjusts the power supply plan according to the global model after multiple updates.

2. The power distribution optimization method based on V2G network according to claim 1, characterized in that: The initial weight of each type of tram transaction information is set according to the data source, including: The initial weight relationship is adjusted as follows: the initial weight of the tram transaction information whose data source is the electric vehicle ≥ the initial weight of the tram transaction information whose data source is the charging station ≥ the initial weight of the tram transaction information whose data source is the smart grid.

3. The power distribution optimization method based on V2G network according to claim 1, characterized in that: Self-verification is performed through the initial weight and attributes of each tram transaction information, and the formula is: F=Verify(w″ i ,w′ i ,w i ); w i is the initial weight of the i-th tram transaction information, i=1,2,...,n, n means that the basic transaction data includes n types of tram transaction information; Among them, s i represents the data size of the i-th tram transaction information, A = getMean(s1,s2,...,s i ,…,s n ), represents the median of the data size among the data sizes of n types of tram transaction information; Among them, f i represents the frequency of occurrence of the i-th tram transaction information, getMean(f1,f2,...,f i ,…,f n ), which represents the median of the frequency of occurrence among n types of tram transaction information; If w″ i ≥w i ||w′ i ≥w i , then the i-th tram transaction information is the key data; If w″ i <w i &&w′ i <w i , then the i-th tram transaction information is low-weight data.

4. The power distribution optimization method based on V2G network according to claim 3, characterized in that: Also includes: When the i-th tram transaction information is low-weight data, the i-th tram transaction information is returned to the local aggregator, and the data included in the i-th tram transaction information is processed by exponential weighted average; According to the processed i-th tram transaction information, return to S3.

5. The V2G network-based power distribution optimization method according to claim 1, characterized in that: A public key and a private key are generated through a hybrid secondary encryption algorithm, and the public key is sent to a cloud storage server, and the private key is sent to multiple mobile terminals that use the target charging station service.

6. The V2G network-based power distribution optimization method according to claim 5, characterized in that: Before uploading the target training data to the cloud storage server for storage in S5, the following steps are included: Encrypting the target training data so that the cloud storage server stores the encrypted ciphertext; After uploading the target training data to the cloud storage server for storage in S5, the following steps are included: Multiple mobile terminals using the target charging station service download the ciphertext from the cloud storage server through the private key.

7. The V2G network-based power distribution optimization method according to claim 5, characterized in that: The hybrid secondary encryption algorithm includes asymmetric encryption and homomorphic encryption.

8. A power distribution optimization device based on a V2G network, characterized in that: Applicable to a V2G network in which a mobile terminal participates, the device includes: A basic data acquisition module, used to acquire basic transaction data in a target charging station, wherein the basic transaction data includes a variety of electric vehicle transaction information; An initial weight setting module is used to set the initial weight of each type of tram transaction information according to the data source; An attribute acquisition module, which acquires the attributes of each type of tram transaction information, wherein the attributes include the data size of each type of tram transaction information, the median of the data size, the occurrence frequency of each type of tram transaction information, and the median of the occurrence frequency; A key data screening module is used to perform self-verification through the initial weight and attributes of each tram transaction information, screen out key data in the basic transaction data, upload the key data to the cloud storage server, and store it as target training data; Among them, multiple mobile terminals using the target charging station service train local models based on the target training data stored in the cloud storage server, and use federated learning with the central server to update local model parameters; A training model parameter acquisition module is used to sequentially execute the basic data acquisition module to the key data screening module on the K charging stations to obtain the training model parameters of the K charging stations, wherein the training model parameters of any charging station include the local model parameters obtained after multiple mobile terminals using the service of this charging station are updated through federated learning; The global model update module is used to aggregate the training model parameters of K charging stations using the federated averaging algorithm. The aggregated training model parameters are used to update the global model, and the updated global model is sent back to all mobile terminals that use the charging station service. The power supply scheme adjustment module is used to repeatedly execute the basic data acquisition module to the global model update module in sequence to obtain the global model after multiple updates, so that each charging station obtains the global model after multiple updates and adjusts the power supply scheme according to the global model after multiple updates.

9. A chip, characterized in that: include: The first processor is used to call and run a computer program from a first memory, so that a device equipped with the chip executes each step of the V2G network-based power distribution optimization method as described in any one of claims 1 to 7.

10. A terminal, characterized in that: The method comprises a second memory, a second processor, and a computer program stored in the second memory and executable on the second processor, wherein the second processor implements the steps of the V2G network-based power distribution optimization method as described in any one of claims 1 to 7 when executing the computer program.