Method for constructing identification model for bus of electric vehicle charging pile, and system

By generating the electric vehicle charging pile bus identification data set and building a model based on one-dimensional convolution and improving self-attention mechanism, the problems of small data set size, model output deviation from charging characteristics, and high computational complexity in the existing technology are solved, and high accuracy and low-cost electric vehicle charging pile bus identification is achieved.

WO2025108475A1PCT designated stage expired Publication Date: 2025-05-30GUIZHOU POWER GRID CO LTD

Patent Information

Application Number
PCT/CN2024/134035
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-24
Filing Date
2024-11-24
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The existing electric vehicle charging pile bus identification model construction has problems such as small data set size, model output deviates from charging characteristics, and high computational complexity, which is difficult to meet the practical application needs.

Method used

By obtaining the user bus-type active power data and the active power data of the electric vehicle charging pile, combining probability statistics to generate the electric vehicle charging pile bus identification data set, and building a model based on the one-dimensional convolution-improved self-attention mechanism combined with adaptive template embedding, preprocessing and model training are carried out.

Benefits of technology

On the premise of ensuring model accuracy, the data acquisition cost is reduced and the identification accuracy of electric vehicle charging piles is improved, so that the identification results are in line with the working characteristics of electric vehicle charging piles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024134035_30052025_PF_FP_ABST
    Figure CN2024134035_30052025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention are a method for constructing an identification model for a bus of an electric vehicle charging pile, and a system. The method comprises: obtaining user bus type active power data and electric vehicle charging pile active power data, and generating an electric vehicle charging pile bus identification dataset by using probability and statistics; performing preprocessing on the electric vehicle charging pile bus identification dataset; constructing an identification model for a bus of an electric vehicle charging pile on the basis of a one-dimensional convolution + improved self-attention mechanism combined architecture and adaptive template embedding, and completing model training and construction by means of the preprocessed data. Data collection costs can be greatly reduced while ensuring the precision of the identification model for a bus of an electric vehicle charging pile; the identification accuracy of electric vehicle charging pile can be effectively improved, and the identification result can be made to conform to operational characteristics of the electric vehicle charging pile.
Need to check novelty before this filing date? Find Prior Art

Description

A method and system for constructing a bus identification model for electric vehicle charging piles Technical Field

[0001] The present invention relates to the technical field of electric vehicle charging pile bus identification model construction, and in particular to an electric vehicle charging pile bus identification model construction method and system. Background Art

[0002] With the advancement of automobile production technology, the number of electric vehicles in use has increased year by year. The adjustable nature of electric vehicle charging provides more room for demand-side response. The electric vehicle charging pile bus identification model is a method that uses user bus-type active power data to identify the charging active power of electric vehicle charging piles. It can effectively monitor and manage the operating status of electric vehicle charging piles, providing data support for the optimized scheduling of power systems and the intelligent control of electric vehicle charging. However, the construction of existing electric vehicle charging pile bus identification models still has the following major problems:

[0003] (1) The construction of a dataset that includes both user bus active power data and the corresponding electric vehicle charging pile charging active power data relies on the deployment of a large number of measurement devices for collection, which is costly. This results in a small dataset size and makes it difficult to construct an accurate electric vehicle charging pile bus identification model.

[0004] (2) The existing electric vehicle charging pile bus identification model directly estimates the electric vehicle charging pile power waveform in a way that fluctuates greatly and lacks a correction method that combines the mathematical model of electric vehicle charging characteristics, resulting in the identification results output by the model deviating from the normal charging characteristics of the electric vehicle charging pile.

[0005] (3) The existing electric vehicle charging pile bus identification model has a weak ability to capture the detailed characteristics of the input bus power waveform and the long-term timing correlation relationship, and the computational complexity is high, which makes it difficult to meet the needs of practical applications. Summary of the Invention

[0006] The purpose of this section is to summarize some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of this application to avoid obscuring the purpose of this section, the abstract and the title of the invention, and such simplifications or omissions should not be used to limit the scope of the present invention.

[0007] In view of the above existing problems, the present invention is proposed.

[0008] Therefore, the present invention provides a method and system for constructing an electric vehicle charging pile bus identification model, which can solve the problems mentioned in the background technology.

[0009] To solve the above technical problems, the present invention provides the following technical solution: a method for constructing an electric vehicle charging pile bus identification model, comprising:

[0010] Obtain user bus active power data and electric vehicle charging pile active power data, and combine probability statistics to generate an electric vehicle charging pile bus identification data set;

[0011] Preprocessing the electric vehicle charging pile bus identification data set;

[0012] An electric vehicle charging pile bus identification model is built based on the one-dimensional convolution-improved self-attention mechanism joint structure and adaptive template embedding, and the model training and construction are completed in combination with the preprocessed data.

[0013] As a preferred solution of the method for constructing an electric vehicle charging pile bus identification model according to the present invention, the method of generating an electric vehicle charging pile bus identification data set by combining probability statistics includes:

[0014] The charging start time is obtained based on the questionnaire survey of residents’ car use, and a Gaussian mixture probability model P(x begin |θ begin )as follows:

[0015] Among them, θ begin is the probability statistical value set of the Gaussian distribution function of all charging start times, is the statistical value set of the Gaussian distribution function of the i-th charging start time, is the mean of the Gaussian distribution function of the i-th charging start time, is the standard deviation of the Gaussian distribution function of the i-th charging start time, n begin is the number of Gaussian distribution functions for the start of charging time, Refers to the weighted value of the Gaussian distribution function of the i-th start charging time, x begin The charging start time;

[0016] The probability value of the start charging time obtained from the survey is calculated at each moment, and the difference between the estimated probability value and the true probability value of the start charging time Gaussian mixture probability model is minimized to obtain θ begin and

[0017] As a preferred solution of the method for constructing an electric vehicle charging pile bus identification model according to the present invention, the method of generating an electric vehicle charging pile bus identification data set by combining probability statistics further comprises:

[0018] Randomly extract the user bus active power data of a single day and the active power data of the electric vehicle charging pile during a single charging process;

[0019] Randomly select the sampling time of bus-type active power data, input the charging start time Gaussian mixture probability model to obtain the charging start probability at the current sampling time;

[0020] Then, sampling is performed according to the probability of starting charging;

[0021] If the sampling result is charging start, the active power data of the electric vehicle charging pile in the single charging process is superimposed on the user bus type active power data with the sampling time as the starting point;

[0022] If the sampling result indicates that charging does not start, the next bus-type active power data sampling time is randomly selected until a sampling result indicating that charging starts is obtained;

[0023] Repeat the above process Num times to obtain an electric vehicle charging pile bus identification dataset with a total of Num days of samples.

[0024] As a preferred solution of the electric vehicle charging pile bus identification model construction method of the present invention, wherein: the preprocessing of the electric vehicle charging pile bus identification data set includes: data set division, standardization and sliding window cutting,

[0025] The data set division includes randomly extracting R from the electric vehicle charging pile bus identification data set with Num days of samples. train % of the samples are used to generate the electric vehicle charging pile bus identification training set, and the remaining samples are used to generate the electric vehicle charging pile bus identification verification set;

[0026] The standardization includes statistically subtracting the average value μ of the electric vehicle charging pile bus identification training set and the validation set from the data of the electric vehicle charging pile bus identification training set. train , and then with the standard deviation σ train Divide;

[0027] The sliding window cutting includes using a sliding window with a width of W sampling points to cut the bus data of the electric vehicle charging pile bus identification training set and the corresponding electric vehicle charging pile active power data with a step size of S to form the electric vehicle charging pile bus identification training set; then using a sliding window with the same width of W sampling points to cut the bus data of the electric vehicle charging pile bus identification verification set and the corresponding electric vehicle charging pile active power data with a step size of S to form the electric vehicle charging pile bus identification verification set.

[0028] As a preferred solution of the electric vehicle charging pile bus identification model construction method described in the present invention, the one-dimensional convolution-improved self-attention mechanism joint structure includes: the input user bus type active power data is first subjected to a one-dimensional convolution layer for detail feature extraction, and then the improved self-attention mechanism with a learnable bottleneck structure is added to realize the output mapping of the detail feature to the electric vehicle charging pile active power data, wherein the one-dimensional convolution value o(p,t) at the p-th position in the t-th channel is calculated as follows:

[0029] Among them, num C is the number of channels of input data, num F is the number of convolution kernels, length represents the position offset of the convolution kernel on the input data, str refers to the sliding step size of the convolution calculation, Fea(p·str+length,u) represents the vector from position p·str to position p·str+length in the u-th channel of the input data, and Ker(v,u,t) refers to the convolution vector corresponding to the u-th input channel and the t-th output channel in the v-th convolution kernel;

[0030] The calculation formula A(Q, K, V) of the improved self-attention mechanism is as follows:

[0031] Among them, Q, K, and V are the input feature query vector, feature key vector, and eigenvalue vector respectively, E is the dimension transformation matrix of the bottleneck structure, and d k is the dimension of the feature key vector, z j Input the j-th dimension value of the vector z to the softmax function, m is the number of dimensions of z, z l Input the j-th dimension of the vector z to the softmax function.

[0032] As a preferred solution of the method for constructing the electric vehicle charging pile bus identification model of the present invention, the adaptive template embedding includes: first splicing the output of the electric vehicle charging pile bus identification model within a single day, and then generating an adaptive template B according to the following formula:

[0033] Among them, B(g) refers to the g-th value of the adaptive template, and g refers to the count value of the model output continuously greater than zero after splicing.

[0034] As a preferred solution of the method for constructing an electric vehicle charging pile bus identification model according to the present invention, the electric vehicle charging pile bus identification model based on the one-dimensional convolution-improved self-attention mechanism joint structure and adaptive template embedding includes:

[0035] The model training first normalizes the spliced ​​data, as shown in the following formula:

[0036] Among them, Output refers to the output of the spliced ​​electric vehicle charging pile bus identification model. norm Refers to the normalized output of the electric vehicle charging pile bus identification model, Min out Refers to the minimum value of Output, Max out Refers to the maximum value of Output;

[0037] Then, the parameters of the electric vehicle charging pile bus identification model are obtained by minimizing the following loss function. The loss function Loss is shown as follows: Loss = Loss pred +Loss temp

[0038] Among them, Loss pred Refers to the regression loss term, Loss temp Refers to the template matching loss item, num train Output is the number of sample points for electric vehicle charging pile bus identification in a single day. w Refers to the output value of the bus identification model of the w-th electric vehicle charging pile in a single day, Real w Refers to the actual value of the active power data of the wth electric vehicle charging pile in a single day, num temp Refers to the number of sample points for estimating the working status of electric vehicle charging piles in a single day. Refers to the value of the h-th electric vehicle charging pile bus identification model estimated power greater than 0 after normalization, and B(h) refers to the h-th value of the adaptive template;

[0039] The above-mentioned judgment on whether to stop training based on the performance of the validation set refers to calculating the Loss value of the validation set and recording the minimum Loss value Loss. min , if the consecutive epoch cycle Loss min If there is no update, stop training; otherwise, continue training.

[0040] An electric vehicle charging pile bus identification model construction system is characterized by comprising: a data set acquisition and calculation module, a preprocessing module, and a model construction and training module.

[0041] A data set acquisition and calculation module, which is used to acquire user bus type active power data and electric vehicle charging pile active power data, and generate an electric vehicle charging pile bus identification data set in combination with probability statistics;

[0042] A preprocessing module, the preprocessing module is used to preprocess the electric vehicle charging pile bus identification data set;

[0043] The model construction and training module is used to build an electric vehicle charging pile bus identification model based on the one-dimensional convolution-improved self-attention mechanism joint structure and adaptive template embedding, and complete model training and construction in combination with the preprocessed data.

[0044] A computer device includes a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the above method when executing the computer program.

[0045] A computer-readable storage medium stores a computer program thereon, wherein the computer program implements the steps of the method described above when executed by a processor.

[0046] Beneficial effects of the present invention: The present invention proposes a method and system for constructing an electric vehicle charging pile bus identification model, which obtains user bus-type active power data and electric vehicle charging pile active power data, and generates an electric vehicle charging pile bus identification data set in combination with probability statistics; preprocesses the electric vehicle charging pile bus identification data set; builds an electric vehicle charging pile bus identification model based on a one-dimensional convolution-improved self-attention mechanism joint structure and adaptive template embedding, and completes model training and construction in combination with the preprocessed data. The data acquisition cost can be greatly reduced while ensuring the accuracy of the electric vehicle charging pile bus identification model; the identification accuracy of the electric vehicle charging pile can be effectively improved, so that the identification result conforms to the working characteristics of the electric vehicle charging pile; based on one-dimensional convolution to capture the detailed information of the input power waveform, the self-attention mechanism with improved bottleneck structure is introduced to have both lightweight and long-term time series correlation characteristics extraction capabilities, thereby improving the accuracy of electric vehicle charging pile bus identification. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort. Among them:

[0048] FIG1 is a flow chart of a method and system for constructing a bus identification model for an electric vehicle charging pile provided by one embodiment of the present invention;

[0049] FIG2 is a structural diagram of an electric vehicle charging pile bus identification model of a method and system for constructing an electric vehicle charging pile bus identification model provided by one embodiment of the present invention;

[0050] FIG3 is an internal structure diagram of a computer device of a method and system for constructing an electric vehicle charging pile bus identification model provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0051] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the following detailed description of the specific embodiments of the present invention is given in conjunction with the accompanying drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in this field without creative work should fall within the scope of protection of the present invention.

[0052] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0053] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.

[0054] The present invention is described in detail with reference to schematic diagrams. For ease of illustration, cross-sectional views of device structures may be partially enlarged and not to scale when describing embodiments of the present invention. Furthermore, the schematic diagrams are merely illustrative and should not limit the scope of the present invention. Furthermore, in actual production, the three-dimensional dimensions of length, width, and depth should be included.

[0055] In the description of the present invention, it should be noted that the terms "upper, lower, inner, and outer" and other references to orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first, second, or third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0056] In this disclosure, unless otherwise specified or limited, the terms "mounted," "connected," and "connected" should be interpreted broadly. For example, they may refer to fixed, removable, or integral connections. They may also refer to mechanical, electrical, or direct connections, indirect connections through an intermediary, or internal communication between two components. Those skilled in the art will understand the specific meanings of these terms in this disclosure.

[0057] Example 1

[0058] 1-3 , which are the first embodiment of the present invention, provide a method and system for constructing an electric vehicle charging pile bus identification model, including:

[0059] Obtain user bus active power data and electric vehicle charging pile active power data, and combine probability statistics to generate an electric vehicle charging pile bus identification data set;

[0060] In this embodiment of the application, the user bus active power data collected by the smart meter and the active power data of the electric vehicle charging pile collected separately by the measurement terminal are combined to generate an electric vehicle charging pile bus identification data set based on the charging probability statistics obtained from massive survey data. The sampling interval between the smart meter and the measurement terminal is no more than 1 minute, and the smart meter data is accompanied by a record of the sampling time;

[0061] Among them, combined with probability statistics, the electric vehicle charging pile bus identification dataset is generated, including:

[0062] The charging start time is obtained based on the questionnaire survey of residents’ car use, and a Gaussian mixture probability model P(x begin |θ begin )as follows:

[0063] Among them, θ begin is the probability statistical value set of the Gaussian distribution function of all charging start times, is the statistical value set of the Gaussian distribution function of the i-th charging start time, is the mean of the Gaussian distribution function of the i-th charging start time, is the standard deviation of the Gaussian distribution function of the i-th charging start time, n begin is the number of Gaussian distribution functions for the start of charging time, Refers to the weighted value of the Gaussian distribution function of the i-th start charging time, x begin The charging start time;

[0064] It should be noted that the probability value of the start charging time obtained from the survey is calculated at each moment, and θ is obtained by minimizing the difference between the estimated probability value and the true probability value of the Gaussian mixture probability model of the start charging time. begin and In the specific implementation process, begin The option is 5;

[0065] Furthermore, by combining probability statistics, the electric vehicle charging pile bus identification dataset is generated, which also includes:

[0066] Furthermore, the active power data of the user bus type and the active power data of the electric vehicle charging pile during a single charging process are randomly extracted on a single day;

[0067] Furthermore, the sampling time of bus-type active power data is randomly selected and input into the Gaussian mixture probability model of the start charging time to obtain the probability of starting charging at the current sampling time;

[0068] Furthermore, sampling is performed according to the probability of starting charging;

[0069] It should be noted that if the sampling result is the start of charging, the active power data of the electric vehicle charging pile in the single charging process will be superimposed on the user bus type active power data with the sampling time as the starting point;

[0070] It should be noted that if the sampling result indicates that charging does not start, the sampling time of the next bus-type active power data is randomly selected until a sampling result indicating that charging starts is obtained;

[0071] Furthermore, the above process is repeated Num times to obtain a total of Num days of samples of electric vehicle charging pile bus identification data set. In the specific implementation process, Num can be set to 1000.

[0072] Furthermore, the electric vehicle charging pile bus identification dataset is preprocessed;

[0073] Among them, the preprocessing of the electric vehicle charging pile bus identification dataset includes: dataset division, standardization and sliding window cutting,

[0074] Furthermore, the data set partitioning includes randomly extracting R train % of the samples are used to generate the electric vehicle charging pile bus identification training set, and the remaining samples are used to generate the electric vehicle charging pile bus identification verification set; in the specific implementation process, R train Select 80;

[0075] Furthermore, the standardization includes statistically subtracting the average value μ of the electric vehicle charging pile bus identification training set from the data of the electric vehicle charging pile bus identification training set and the validation set. train , and then with the standard deviation σ train Divide;

[0076] Furthermore, the sliding window cutting includes using a sliding window with a width of W sampling points to cut the bus data of the electric vehicle charging pile bus identification training set and the corresponding electric vehicle charging pile active power data with a step size of S to form the electric vehicle charging pile bus identification training set; and then using a sliding window with the same width of W sampling points to cut the bus data of the electric vehicle charging pile bus identification verification set and the corresponding electric vehicle charging pile active power data with a step size of S to form the electric vehicle charging pile bus identification verification set.

[0077] In the embodiment of the present application, both W and S are set to 512.

[0078] Furthermore, an electric vehicle charging pile bus identification model is built based on the one-dimensional convolution-improved self-attention mechanism joint structure and adaptive template embedding, and the model training and construction are completed in combination with the preprocessed data.

[0079] The joint structure based on one-dimensional convolution and improved self-attention mechanism includes: the input user bus type active power data first passes through the one-dimensional convolution layer to extract detailed features, and then the improved self-attention mechanism with a learnable bottleneck structure is added to realize the output mapping of the detailed features to the active power data of the electric vehicle charging pile. The calculation formula of the one-dimensional convolution value o(p,t) at the p-th position in the t-th channel is as follows:

[0080] Among them, num C is the number of channels of input data, num F is the number of convolution kernels, length represents the position offset of the convolution kernel on the input data, str refers to the sliding step size of the convolution calculation, Fea(p·str+length,u) represents the vector from position p·str to position p·str+length in the u-th channel of the input data, and Ker(v,u,t) refers to the convolution vector corresponding to the u-th input channel and the t-th output channel in the v-th convolution kernel;

[0081] Furthermore, the calculation formula A(Q, K, V) of the improved self-attention mechanism is as follows:

[0082] Among them, Q, K, and V are the input feature query vector, feature key vector, and eigenvalue vector respectively, E is the dimension transformation matrix of the bottleneck structure, and d k is the dimension of the feature key vector, z j Input the j-th dimension value of the vector z to the softmax function, m is the number of dimensions of z, z l Input the j-th dimension of the vector z to the softmax function.

[0083] Furthermore, the adaptive template embedding includes: first splicing the output of the electric vehicle charging pile bus identification model within a single day, and then generating the adaptive template B as follows:

[0084] Among them, B(g) refers to the g-th value of the adaptive template, and g refers to the count value of the model output continuously greater than zero after splicing.

[0085] Furthermore, the model training first normalizes the spliced ​​data, as shown in the following formula:

[0086] Among them, Output refers to the output of the spliced ​​electric vehicle charging pile bus identification model. norm Refers to the normalized output of the electric vehicle charging pile bus identification model, Min out Refers to the minimum value of Output, Max out Refers to the maximum value of Output;

[0087] Furthermore, the parameters of the electric vehicle charging pile bus identification model are obtained by minimizing the following loss function. The loss function Loss is shown as follows: Loss = Loss pred +Loss temp

[0088] Among them, Loss pred Refers to the regression loss term, Loss temp Refers to the template matching loss item, num train Output is the number of sample points for electric vehicle charging pile bus identification in a single day. w Refers to the output value of the bus identification model of the w-th electric vehicle charging pile in a single day, Real w Refers to the actual value of the active power data of the wth electric vehicle charging pile in a single day, num temp Refers to the number of sample points for estimating the working status of electric vehicle charging piles in a single day. Refers to the value of the h-th electric vehicle charging pile bus identification model estimated power greater than 0 after normalization, and B(h) refers to the h-th value of the adaptive template;

[0089] Furthermore, judging whether to stop training based on the performance of the validation set means calculating the Loss value of the validation set and recording the minimum Loss value Loss min , if the consecutive epoch cycle Loss min If there is no update, the training is stopped, otherwise the training continues. In the specific implementation process, the epoch can be set to 5.

[0090] In a preferred embodiment, a system for building a bus identification model for an electric vehicle charging pile includes: a data set acquisition and calculation module, a preprocessing module, and a model building and training module.

[0091] The data set acquisition and calculation module is used to obtain the user bus type active power data and the active power data of the electric vehicle charging pile, and generate the electric vehicle charging pile bus identification data set by combining probability statistics;

[0092] A preprocessing module is used to preprocess the electric vehicle charging pile bus identification data set;

[0093] The model construction and training module is used to build an electric vehicle charging pile bus identification model based on the one-dimensional convolution-improved self-attention mechanism joint structure and adaptive template embedding, and complete model training and construction in combination with preprocessed data.

[0094] The above-mentioned unit modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of the above-mentioned modules.

[0095] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in Figure 3. The computer device includes a processor, memory, a communication interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner may be achieved through WiFi, a carrier network, NFC (near field communication), or other technologies. When the computer program is executed by the processor, a method for constructing an electric vehicle charging pile bus identification model is implemented. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen. The input device of the computer device may be a touch layer covering the display screen, or may be a key, trackball, or touchpad provided on the computer device housing, or may be an external keyboard, touchpad, or mouse.

[0096] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0097] Obtain user bus active power data and electric vehicle charging pile active power data, and combine probability statistics to generate an electric vehicle charging pile bus identification data set;

[0098] Preprocessing of electric vehicle charging pile bus identification dataset;

[0099] An electric vehicle charging pile bus identification model is built based on the one-dimensional convolution-improved self-attention mechanism joint structure and adaptive template embedding, and the model training and construction are completed in combination with preprocessed data.

[0100] Example 2

[0101] 2 , which shows an embodiment of the present invention, provides a method and system for constructing an electric vehicle charging pile bus identification model. To verify the beneficial effects of the present invention, a comparative experiment is conducted to conduct scientific demonstration.

[0102] In the specific implementation process, the structural diagram of the electric vehicle charging pile bus identification model is shown in Figure 2. The numerical values ​​in the brackets of the one-dimensional convolution layer mean the number of convolution kernels, the convolution kernel size, and the sliding step size, respectively. The numerical values ​​in the brackets of the improved self-attention mechanism layer mean the input feature vector dimension and the number of self-attention heads, respectively. The one-dimensional convolution module is composed of three one-dimensional convolution layers stacked with ReLU activation functions. The first one-dimensional convolution layer contains 16 convolution kernels of size 1×7, the second one-dimensional convolution layer contains 32 convolution kernels of size 1×5, and the third one-dimensional convolution layer contains 64 convolution kernels of size 1×3. Except for the last one-dimensional convolution layer with a sliding step size of 1, the other two layers are both 2. The improved self-attention mechanism module consists of three layers of improved self-attention mechanism layers. Except for the first layer with an input feature dimension of 251, the other two layers are both 1024, and the number of self-attention heads of the three improved self-attention mechanism layers is 8.

[0103] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

[0104] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The scheme in the embodiment of the present application can be implemented in various computer languages, for example, object-oriented programming language Java and literal translation scripting language JavaScript, etc.

[0105] The present application is described with reference to the flow chart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart flow or multiple flows and / or one box or multiple boxes of the block diagram.

[0106] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0107] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0108] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0109] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A method for constructing an electric vehicle charging pile bus identification model, characterized in that: include: Obtain the user bus type active power data and the electric vehicle charging pile active power data, and generate the electric vehicle charging pile bus identification data set by combining probability statistics; Preprocessing the electric vehicle charging pile bus identification data set; An electric vehicle charging pile bus identification model is built based on the one-dimensional convolution-improved self-attention mechanism joint structure and adaptive template embedding, and the model training and construction are completed in combination with the preprocessed data.

2. The electric vehicle charging pile bus identification model construction method according to claim 1, characterized in that: The method of combining probability statistics to generate an electric vehicle charging pile bus identification data set includes: The charging start time is obtained based on the questionnaire survey of residents’ car use, and a Gaussian mixture probability model P(x begin |θ begin )as follows: Among them, θ begin is the probability statistical value set of the Gaussian distribution function of all charging start times, is the statistical value set of the Gaussian distribution function of the i-th charging start time, is the mean of the Gaussian distribution function of the i-th charging start time, is the standard deviation of the Gaussian distribution function of the i-th charging start time, n begin is the number of functions of the Gaussian distribution of the start charging time, Refers to the weighted value of the Gaussian distribution function of the i-th charging start time, x begin Start charging time; The probability value of the start charging time obtained from the survey is calculated at each moment, and the difference between the estimated probability value and the true probability value of the start charging time Gaussian mixture probability model is minimized to obtain θ begin and 3. The electric vehicle charging pile bus identification model construction method according to claim 2, characterized in that: The method of combining probability statistics to generate an electric vehicle charging pile bus identification data set also includes: Randomly extract the user bus active power data of a single day and the active power data of the electric vehicle charging pile during a single charging process; Randomly select the sampling time of bus type active power data, input the Gaussian mixture probability model of the start charging time to obtain the probability of starting charging at the current sampling time; Then sampling is performed according to the probability of starting charging; If the sampling result is the start of charging, the active power data of the electric vehicle charging pile in the single charging process is superimposed on the user bus type active power data with the sampling time as the starting point; If the sampling result is not to start charging, the next sampling time of bus type active power data is randomly selected until the sampling result of starting charging is obtained; Repeat the above process Num times to obtain an electric vehicle charging pile bus identification dataset with a total of Num days of samples.

4. The electric vehicle charging pile bus identification model construction method according to claim 3, characterized in that: The preprocessing of the electric vehicle charging pile bus identification data set includes: data set division, standardization and sliding window cutting, The data set division includes randomly extracting R from the electric vehicle charging pile bus identification data set with Num days of samples. train % of the samples are used to generate the electric vehicle charging pile bus identification training set, and the remaining samples are used to generate the electric vehicle charging pile bus identification verification set; The standardization includes statistically subtracting the average value μ of the electric vehicle charging pile bus identification training set and the validation set from the data of the electric vehicle charging pile bus identification training set. train , and then with the standard deviation σ train Divide; The sliding window cutting includes using a sliding window with a width of W sampling points to cut the bus data of the electric vehicle charging pile bus identification training set and the corresponding electric vehicle charging pile active power data with a step size of S to form an electric vehicle charging pile bus identification training set; and then using a sliding window with the same width of W sampling points to cut the bus data of the electric vehicle charging pile bus identification verification set and the corresponding electric vehicle charging pile active power data with a step size of S to form an electric vehicle charging pile bus identification verification set.

5. The electric vehicle charging pile bus identification model construction method according to claim 4, characterized in that: The joint structure based on one-dimensional convolution-improved self-attention mechanism includes: the input user bus type active power data is first subjected to a one-dimensional convolution layer for detail feature extraction, and then the output mapping of the detail feature to the active power data of the electric vehicle charging pile is realized by adding an improved self-attention mechanism with a learnable bottleneck structure, wherein the calculation formula of the one-dimensional convolution value o(p, t) at the p-th position in the t-th channel is as follows: Among them, num C is the number of channels of input data, num F is the number of convolution kernels, length represents the position offset of the convolution kernel on the input data, str refers to the sliding step size of the convolution calculation, and Fea(p·str+length,u) represents the distance from position p·str to position in the uth channel of the input data. p·str+length vector, Ker(v,u,t) refers to the convolution vector corresponding to the u-th input channel and the t-th output channel in the v-th convolution kernel; The calculation formula A(Q, K, V) of the improved self-attention mechanism is as follows: Among them, Q, K, and V are the input feature query vector, feature key vector, and eigenvalue vector respectively, E is the dimension transformation matrix of the bottleneck structure, and d k is the dimension of the feature key vector, z j The j-th dimension value of the input vector z to the softmax function, m is the dimension of z, z l Input the j-th dimension of the vector z to the softmax function.

6. The electric vehicle charging pile bus identification model construction method according to claim 5, characterized in that: The adaptive template embedding includes: first splicing the output of the electric vehicle charging pile bus identification model within a single day, and then generating an adaptive template B according to the following formula: Among them, B(g) refers to the g-th value of the adaptive template, and g refers to the count value of the model output that is continuously greater than zero after splicing.

7. The electric vehicle charging pile bus identification model construction method according to claim 6, characterized in that: The electric vehicle charging pile bus identification model based on the one-dimensional convolution-improved self-attention mechanism joint structure and adaptive template embedding includes: The model training first normalizes the spliced ​​data, as shown in the following formula: Among them, Output refers to the output of the spliced ​​electric vehicle charging pile bus identification model. norm Refers to the normalized output of the electric vehicle charging pile bus identification model, Min out Refers to the minimum value of Output, Max out Refers to the maximum value of Output; Then, the parameters of the electric vehicle charging pile bus identification model are obtained by minimizing the following loss function: The function Loss is shown as follows: Loss=Loss pred +Loss temp Among them, Loss pred Refers to the regression loss term, Loss temp Refers to the template matching loss item, num train Output is the number of sample points for electric vehicle charging pile bus identification in a single day. w Refers to the output value of the w-th electric vehicle charging pile bus identification model in a single day, Real w Refers to the actual value of the active power data of the wth electric vehicle charging pile in a single day, num temp Refers to the number of sample points for estimating the working status of electric vehicle charging piles in a single day. It refers to the value of the h-th electric vehicle charging pile bus identification model estimated power greater than 0 after normalization, and B(h) refers to the h-th value of the adaptive template; The above-mentioned judgment on whether to stop training based on the performance of the validation set refers to calculating the Loss value of the validation set and recording the minimum Loss value Loss min , if the consecutive epoch cycle Loss min If there is no update, stop training, otherwise continue training.

8. A system for constructing a bus identification model for an electric vehicle charging pile, characterized in that: include: Dataset acquisition and calculation module, preprocessing module, and model building and training module. A data set acquisition and calculation module, which is used to acquire user bus type active power data and electric vehicle charging pile active power data, and generate an electric vehicle charging pile bus identification data set in combination with probability statistics; A preprocessing module, the preprocessing module is used to preprocess the electric vehicle charging pile bus identification data set; The model building and training module is used to build an electric vehicle charging pile bus identification model based on a one-dimensional convolution-improved self-attention mechanism joint structure and adaptive template embedding, and complete model training and construction in combination with the preprocessed data.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Charging station load prediction method, device and system

    CN113821911A

  • Power grid parameter identification method based on convolution self-attention Transform model

    CN115545269A

  • Household charging pile monitoring method and system based on self-supervision and multi-task learning

    CN116738167A

  • Electric vehicle charging pile bus identification model construction method and system

    CN117591882A

  • Electric vehicle charging optimization based on predictive analytics utilizing machine learning

    US20220055496A1

Cited By

  • Charging pile on-line metering calibration verification method

    CN120847508A

  • Electric bicycle home-entry charging identification method and system for intelligent electric meter

    CN122185950A

  • A charging use abnormality recognition method based on behavior feature extraction

    CN122508446A