Charging order estimation model training method, equipment and storage medium
By using a prediction model based on a bidirectional long short-term memory network and a conditional random field layer, the problem of inaccurate segmentation of electric vehicle charging orders was solved, achieving more accurate charging order identification and demand judgment.
Patent Information
- Application Number
- CN202210552169.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-20
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-05-20
AI Technical Summary
In existing technologies, the charging orders for electric vehicle charging stations are not accurately divided, making it impossible to accurately determine the quality of the charging gun and the charging demand in the area.
A prediction model employing a bidirectional long short-term memory network and a conditional random field layer is used to identify the start and end labels of charging orders by labeling and training the charging state sequence, thereby solving the problem of abnormal states during the charging process.
This improves the accuracy and efficiency of charging orders, enabling more accurate assessment of charging gun quality and charging demand within a given area, providing a reliable basis for subsequent charging pile site selection and ancillary services for electric vehicles.
Smart Images

Figure CN114863217B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electric vehicles, and in particular to a charging order estimation model training method, device and storage medium. Background Art
[0002] With the comprehensive development of electric vehicles, electric vehicle charging piles, as facilities to provide charging and energy for electric vehicles, are usually installed in parking lots or charging stations in public buildings and residential communities.
[0003] The electric vehicle charging pile is fixed on the ground, using a dedicated charging interface and a conduction method to provide AC power to electric vehicles with onboard chargers, with corresponding communication, billing and safety protection functions. Accurately estimating the actual charging orders of public charging piles can determine the quality of charging guns, and at the same time, the charging demand and electric vehicle distribution in the area can be known, providing a basis for subsequent charging pile site selection and ancillary derivative businesses of electric vehicles.
[0004] The prior art generally divides charging orders according to rules based on the status changes uploaded by the charging gun and the corresponding time intervals. However, the charging orders divided by this method are inaccurate. Summary of the invention
[0005] The present application provides a charging order estimation model training method, device and storage medium to solve the problem of inaccurate charging order classification in the prior art.
[0006] On the one hand, the present application provides a charging order estimation model training method, comprising:
[0007] Acquire target training data, the target training data comprising a plurality of samples, each sample comprising a charging state sequence and a charging label sequence of the charging state sequence, wherein an idle state bit and an abnormal state bit in the charging state sequence are marked as non-entity information, at least one continuous occupied state bit is marked as a start or end label, and the charging state bit corresponds to the intermediate label one by one;
[0008] According to the target training data, the estimation model of the charging order is trained to obtain a trained estimation model, wherein the estimation model includes a bidirectional long short-term memory network and a conditional random field layer, the bidirectional long short-term memory network is used to output the probability distribution of the state bit, and the conditional random field is used to sequence the state bit.
[0009] Optionally, the acquiring target training data includes:
[0010] Acquire original training data, wherein the original training data includes a plurality of samples, each sample includes a charging state sequence and a charging label sequence of the charging state sequence;
[0011] Acquire a charging order according to a charging tag sequence, and use a charging state sequence corresponding to the charging order as a named entity;
[0012] New training data is obtained through the data augmentation algorithm that replaces similar named entities;
[0013] The target training data is obtained according to the original training data and the new training data.
[0014] Optionally, the data augmentation algorithm for replacing named entities of the same type to obtain new training data includes:
[0015] Acquire a first charging state sequence, where the first charging state sequence includes at least two sub-charging state sequences, and each sub-charging state sequence corresponds to a charging order;
[0016] Acquire a second charging state sequence, where the second charging state sequence corresponds to a charging order;
[0017] The second charging state sequence replaces any of the sub-charging state sequences to obtain a third charging state sequence;
[0018] New training data is obtained according to the third charging state sequence and the label sequence corresponding to the third charging state sequence.
[0019] Optionally, the conditional random field includes a transfer matrix, and the transfer matrix is used to mark the abnormal state bit as non-entity information.
[0020] Optionally, a charging order prediction method includes:
[0021] Obtaining a charging status sequence of a charging pile in a preset time period;
[0022] Inputting the charging state sequence into an estimation model, wherein the estimation model is a model trained by the above method;
[0023] Obtaining a charging tag sequence output by the estimation model;
[0024] A prediction result is obtained according to the charging tag sequence, where the prediction result includes the quantity of charging orders.
[0025] Optionally, acquiring a prediction result according to the charging tag sequence includes:
[0026] According to the charging tag sequence, obtaining the start and end tags and the end tag;
[0027] Determine a charging order according to the start and end tags and the end tag;
[0028] According to the determined charging order, the quantity of the charging order is obtained.
[0029] Optionally, the method further comprises:
[0030] Obtaining a first timestamp of a state bit in a charging state sequence corresponding to the start and end tags;
[0031] Obtaining a second timestamp of a status bit in a charging status sequence corresponding to the end tag;
[0032] According to the first timestamp and the second timestamp, the start and end times of the charging order are obtained.
[0033] On the other hand, the present application provides a charging order estimation model training device, comprising:
[0034] An acquisition module, configured to acquire target training data, wherein the target training data includes a plurality of samples, each sample includes a charging state sequence and a charging label sequence of the charging state sequence, wherein an idle state bit and an abnormal state bit in the charging state sequence are marked as non-entity information, at least one continuous occupied state bit is marked as a start or end label, and the charging state bit corresponds to the intermediate label one by one;
[0035] A training module is used to train the estimation model of charging orders according to the target training data to obtain a trained estimation model, wherein the estimation model includes a bidirectional long short-term memory network and a conditional random field layer, the bidirectional long short-term memory network is used to output the probability distribution of the state bits, and the conditional random field is used to sequence the state bits.
[0036] Optionally, the acquisition module is further used to obtain target training data, including:
[0037] Acquire original training data, wherein the original training data includes a plurality of samples, each sample includes a charging state sequence and a charging label sequence of the charging state sequence;
[0038] Acquire a charging order according to a charging tag sequence, and use a charging state sequence corresponding to the charging order as a named entity;
[0039] New training data is obtained through the data augmentation algorithm that replaces similar named entities;
[0040] The target training data is obtained according to the original training data and the new training data.
[0041] Optionally, when the data enhancement algorithm using the same type of named entity replacement is used to obtain new training data, the acquisition module is further configured to include:
[0042] Acquire a first charging state sequence, where the first charging state sequence includes at least two sub-charging state sequences, and each sub-charging state sequence corresponds to a charging order;
[0043] Acquire a second charging state sequence, where the second charging state sequence corresponds to a charging order;
[0044] The second charging state sequence replaces any of the sub-charging state sequences to obtain a third charging state sequence;
[0045] New training data is obtained according to the third charging state sequence and the label sequence corresponding to the third charging state sequence.
[0046] Optionally, the training module is also used for the conditional random field to include a transfer matrix, and the transfer matrix is used to mark the abnormal state bit as non-entity information.
[0047] Optionally, the charging order estimation model training device further includes an order prediction module, which is used to
[0048] Obtaining a charging status sequence of a charging pile in a preset time period;
[0049] Inputting the charging state sequence into an estimation model, wherein the estimation model is a model trained by the estimation model training method for charging orders as described above;
[0050] Obtaining a charging tag sequence output by the estimation model;
[0051] A prediction result is obtained according to the charging tag sequence, where the prediction result includes the quantity of charging orders.
[0052] Optionally, the order prediction module is further used to:
[0053] Get prediction results, including:
[0054] According to the charging tag sequence, obtaining the start and end tags and the end tag;
[0055] Determine a charging order according to the start and end tags and the end tag;
[0056] According to the determined charging order, the quantity of the charging order is obtained.
[0057] Optionally, the order prediction module is further used to:
[0058] Obtaining a first timestamp of a state bit in a charging state sequence corresponding to the start and end tags;
[0059] Obtaining a second timestamp of a status bit in a charging status sequence corresponding to the end tag;
[0060] According to the first timestamp and the second timestamp, the start and end times of the charging order are obtained.
[0061] According to a third aspect of the present application, an electronic device is provided, including:
[0062] Processor and memory;
[0063] The memory stores computer-executable instructions;
[0064] The processor executes the computer-executable instructions stored in the memory, so that the electronic device performs any one of the methods according to the first aspect.
[0065] According to a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the method for determining a driver program for a hardware peripheral as described in any one of the first aspects is implemented.
[0066] The present application provides a method, device and storage medium for training a charging order estimation model. By acquiring multiple samples, the charging state sequence in the samples is classified and labeled in a one-to-one correspondence with the charging label sequence to obtain target training data. The estimation model is trained according to the target training data, wherein the estimation model includes a bidirectional long short-term memory network and a conditional random field layer, the bidirectional long short-term memory network is used to output the probability distribution of the state bit, and the conditional random field is used to sequence the state bit. This model allows the idle state bit and the abnormal state bit in the charging state sequence to be labeled as non-entity information, solving the problem of different upload frequencies of abnormal and charging gun charging states during the charging process of electric vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0068] Figure 1 A schematic diagram of a scenario of a charging order prediction method provided in an embodiment of the present application;
[0069] Figure 2 A flow chart of a charging order estimation model training method provided in an embodiment of the present application;
[0070] Figure 3 is a structural diagram of a deep neural model provided for an embodiment of the present application;
[0071] Figure 4 A flow chart of a method for obtaining target training data for a charging order estimation model provided in an embodiment of the present application;
[0072] Figure 5 A flow chart of a method for predicting charging orders provided in an embodiment of the present application;
[0073] Figure 6 A schematic diagram of the structure of a charging order estimation model training device provided in an embodiment of the present application;
[0074] Figure 7 A hardware structure diagram of a charging order estimation model training device provided in an embodiment of the present application.
[0075] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0076] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0077] First, the terms involved in this application are explained:
[0078] The abnormality refers to the automatic termination of charging by the charging gun of the public charging pile during the charging process due to the charging pile's own protection or failure, etc. For example, the abnormality may be a jump of the charging gun.
[0079] Deep learning is the process of learning the inherent laws and representation levels of sample data. The information obtained in the learning process is of great help in interpreting data such as text, images and sounds. Its ultimate goal is to enable machines to have analytical learning capabilities like humans and to recognize data such as text, images and sounds. Deep learning has achieved many results in search technology, data mining, machine learning, machine translation, natural language processing, multimedia learning, speech, recommendation and personalization technology, and other related fields.
[0080] Named-Entity Recognition (NER), also known as entity extraction technology and entity segmentation technology, is a subfield of natural language processing technology. The goal is to extract named entities mentioned in unstructured text, including names of people, organizations, places, medical terms, regulatory terms, time, quantity, monetary value, etc. For example, in financial articles, it is necessary to accurately extract named entities such as company names, names of important people, and monetary values. The problem of named entity recognition is one of the basic tasks of natural language processing. The accuracy and recall rate of named entity recognition directly affect subsequent natural language processing tasks, such as information extraction, text classification, text summarization, question-answering systems, and other research directions.
[0081] A recurrent neural network (RNN) is a type of recurrent neural network that takes sequence data as input, performs recursion in the direction of sequence evolution, and all nodes (recurrent units) are connected in a chain. For sequence tasks, the neural network structure with "memory" makes recurrent neural networks a preferred choice.
[0082] The Long Short Term Memory Network (LSTM) model is a variant of RNN. While being good at modeling sequence problems, the model is also easy to solve and can store important information for a long time. The Bidirectional Long Short Term Memory Network (BiLSTM) is an improved version of the LSTM model. Experiments show that BiLSTM often performs better than LSTM, especially in sequence labeling problems. The model can learn information about past sequences and future sequences at the same time, and has better results. Therefore, the BiLSTM model is selected as the neural network module in this article.
[0083] Conditional random fields (CRF) are a discriminative probability model and a type of random field. They are often used to label or analyze sequence data, such as natural language text or biological sequences. Conditional random fields are conditional probability distribution models P(Y|X), which represent the Markov random field of another set of output random variables Y under the condition of a given set of input random variables X. In other words, the characteristic of CRF is that it assumes that the output random variables constitute a Markov random field. Conditional random fields can be seen as a generalization of the maximum entropy Markov model in labeling problems.
[0084] The prior art generally divides charging orders according to rules based on the status changes uploaded by the charging gun and the corresponding time intervals.
[0085] Figure 1A schematic diagram of a scenario of a charging order prediction method provided in an embodiment of the present application. Figure 1 As shown, after the user connects the charging gun on the charging pile to the electric car, the charging starts until the charging is completed. The charging pile will send the data related to the order to the server, and the server will judge the order data. However, during the charging process, due to the abnormal battery voltage difference or cooling system abnormality of the electric car, the charging gun becomes abnormal and stops charging for a period of time. Through user operation or waiting for a period of time, the charging is resumed until the charging is completed. In this case, if the existing technology is used, this order will be divided into two charging orders, which is inconsistent with the actual situation. When there are two charging piles provided by different service providers, one uploads data every ten seconds, and the other uploads data every hour. In this case, using the existing technology to divide the charging orders, it is time-consuming and laborious to process the data uploaded by the former.
[0086] This application uses named entity recognition technology to take the charging state sequence corresponding to the complete charging order as a named entity, annotate a small amount of training data, and construct the target training data required for the training model; build an estimation model and train the model. The model structure mainly includes a bidirectional long short-term memory network layer and a conditional random field layer. This model allows the idle state bits and abnormal state bits in the charging state sequence to be marked as non-entity information, solving the problem of different upload frequencies of abnormal and charging gun charging states during electric vehicle charging.
[0087] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0088] Figure 2 A flow chart of a charging order estimation model training method provided in an embodiment of the present application. Figure 3 is a structural diagram of a deep neural model provided for the embodiment of the present application. Figure 2 and Figure 3 As shown, the method of this embodiment includes:
[0089] S201, acquiring target training data, the target training data comprising a plurality of samples, each sample comprising a charging state sequence and a charging label sequence of the charging state sequence, wherein an idle state bit and an abnormal state bit in the charging state sequence are marked as non-entity information, at least one continuous occupied state bit is marked as a start or end label, and the charging state bit corresponds to the intermediate label one by one;
[0090] The estimation model is a deep neural model that includes a bidirectional long short-term memory network and a conditional random field layer. It continuously optimizes its parameters by continuously inputting target training data. Figure 3 As shown in the figure, Input Layer represents the input layer, BiLSTMLayer represents the bidirectional long short-term memory network layer, and CRF Layer represents the conditional random field layer. The input of the estimation model is the charging state sequence of the charging gun, and the result is the predicted label sequence. Each sample includes the charging state sequence as input and the expected input result, that is, the charging label sequence. The purpose of this is to give a standard result corresponding to the input so that the model output can be compared with it and adjust itself.
[0091] In this embodiment, the charging state sequence is in digital form, 1 represents idle, 2 represents starting to charge, 3 represents charging, and 255 represents abnormal.
[0092] The charging tag sequence is annotated in the form of BIO. As a standard practice for joint annotation, BIO annotation usually annotates each element as "BX", "IX" or "O". Among them, "BX" means that the segment where this element is located belongs to type X and this element is at the beginning of this segment, "IX" means that the segment where this element is located belongs to type X and this element is in the middle of this segment, and "O" means that it does not belong to any type. Named entities generally refer to entities with specific meanings or strong referentiality in the text. In this embodiment, the charging state sequence corresponding to the charging order is used as a named entity, and the corresponding charging tag is in the form of [B-Charge, I-Charge, I-Charge, E-Charge], where B-Charge means starting charging, I-Charge means charging, and E-Charge means ending charging. Adding E-Charge as a label for the end of charging, and at least one continuous occupied state bit is marked as a start or end label, is to facilitate the division of charging orders. The abnormal state in the charging state sequence is marked as non-entity information O, so that the estimation model can adaptively learn charging orders in abnormal states. The idle state bit in the charging state sequence is marked as non-entity information O in order to reduce the length of the charging state sequence and speed up the processing of a large amount of idle state data caused by frequent data upload by the charging pile.
[0093] S202. According to the target training data, the estimation model of the charging order is trained to obtain a trained estimation model, wherein the estimation model includes a bidirectional long short-term memory network and a conditional random field layer, the bidirectional long short-term memory network is used to output the probability distribution of the state bit, and the conditional random field is used to sequence the state bit.
[0094] In this embodiment, the input of the bidirectional long short-term memory network is the charging state sequence, and the output is the probability distribution of the state bit. The bidirectional long short-term memory network uses a gate mechanism to learn which information to remember and which information to forget, thereby capturing longer-distance dependencies, that is, when the charging state sequence is long, the dependencies between information can also be determined. By using a forward long short-term memory network and a backward long short-term memory network, which are used to process the sequence forward and backward respectively, after the processing is completed, the outputs of the two long short-term memory networks are spliced together, considering the information before and after the entity, and improving the accuracy of the output.
[0095] In this embodiment, the input of the conditional random field is the probability distribution of the state bit, and the output is the charging tag sequence. The conditional random field will be given a set of probability distributions of input state bits, and the output is a Markov random field of the charging tag sequence. The Markov random field indicates that some relationship factors between random variables must be considered, while others can be ignored. The conditional random field automatically learns constraints through target training data to ensure that the predicted charging tag sequence is valid. For example, the charging tag sequence should start with B- and end with E-. With these constraints, the number of incorrect charging tag sequences will be greatly reduced.
[0096] Optionally, the conditional random field includes a transfer matrix, and the transfer matrix is used to mark the abnormal state bit as non-entity information.
[0097] The transfer matrix is a parameter of the conditional random field. Before training the model, the scores of the transfer matrix can be randomly initialized. These scores will be updated as the training iterative process, that is, the conditional random field layer can learn these constraints by itself.
[0098] This embodiment provides a method for training a charging order estimation model. The method obtains multiple samples, classifies and labels the charging state sequence in the samples in a one-to-one correspondence with the charging label sequence, and obtains target training data. The estimation model is trained according to the target training data, wherein the estimation model includes a bidirectional long short-term memory network and a conditional random field layer. The bidirectional long short-term memory network is used to output the probability distribution of the state bit, and the conditional random field is used to sequence the state bit. This model allows the idle state bit and the abnormal state bit in the charging state sequence to be marked as non-entity information, which solves the problem of different upload frequencies of abnormal and charging gun charging states during the charging process of electric vehicles.
[0099] Figure 4 This is a flow chart of a method for obtaining target training data for a charging order estimation model provided in an embodiment of the present application. Figure 4 As shown, the method of this embodiment includes:
[0100] S401, obtaining original training data, wherein the original training data includes a plurality of samples, each sample includes a charging state sequence and a charging label sequence of the charging state sequence;
[0101] In this embodiment, each sample includes a charging state sequence as a model input and a standard output result corresponding to the input, i.e., a charging label sequence. The charging label sequence in this embodiment is manually labeled. The purpose is to provide a reference for the loss function of the random conditional field and facilitate the model to adjust parameters.
[0102] S402, acquiring a charging order according to a charging tag sequence, and taking a charging state sequence corresponding to the charging order as a named entity;
[0103] S403: Acquire a first charging state sequence, where the first charging state sequence includes at least two sub-charging state sequences, and each sub-charging state sequence corresponds to a charging order;
[0104] In this embodiment, the first charging state sequence is obtained from real data uploaded by the charging pile, and includes original data of two or more charging orders.
[0105] S404, obtaining a second charging state sequence, where the second charging state sequence corresponds to a charging order;
[0106] In this embodiment, the second charging state sequence is data containing a complete charging order that is acquired or generated from history.
[0107] S405, replacing any of the sub-charging state sequences with the second charging state sequence to obtain a third charging state sequence;
[0108] In this embodiment, the size of the sample is expanded by replacing the sub-charging state sequence.
[0109] S406, obtaining new training data according to the third charging state sequence and a label sequence corresponding to the third charging state sequence;
[0110] S407: Obtain the target training data according to the original training data and the new training data.
[0111] The present embodiment provides a method for obtaining target training data for a charging order estimation model. The method labels a small amount of training data by taking the charging state sequence corresponding to the complete charging order as a named entity. The method expands the small amount of original training data into target training data required for the training model through a data enhancement algorithm that replaces similar named entities. This semi-supervised approach reduces the labeling cost and reduces the difficulty of labeling and generating training samples.
[0112] Figure 5This is a flow chart of a method for predicting charging orders provided in an embodiment of the present application. Figure 5 As shown, the method of this embodiment includes:
[0113] S501, obtaining a charging status sequence of a charging pile in a preset time period;
[0114] In this embodiment, the charging pile will periodically send order data to the server, and the charging order data generally includes one or more of the charging pile identifier, charging order identifier, payment card identifier, vehicle identification number (VIN), battery pack serial number, charging order identifier, charging power, and meter reading. The charging state sequence is obtained from the order data.
[0115] S502, inputting the charging state sequence into an estimation model, wherein the estimation model is the model obtained by S202;
[0116] In this embodiment, the estimation model is Figure 2 The charging order estimation model training method flow shown completes the training process.
[0117] S503, obtaining a charging tag sequence output by the estimation model;
[0118] S504, acquiring a start tag and an end tag according to the charging tag sequence;
[0119] The start and end labels are B-Charge, and the end label is E-Charge.
[0120] In this embodiment, since the charging tag of the complete charging order is in the form of [B-Charge, I-Charge, I-Charge, E-Charge], the start and end tags and the end tag can be obtained by reading the charging tag sequence.
[0121] S505, determining a charging order according to the start and end tags and the end tag;
[0122] In this embodiment, a start and end tag and an end tag form a group to constitute a complete charging order.
[0123] S506: Obtain the quantity of the charging orders according to the determined charging orders.
[0124] In this embodiment, determining the number of groups of start and end tags and end tags is to determine the number of charging orders.
[0125] S507, obtaining a first timestamp of a state bit in a charging state sequence corresponding to the start and end tags;
[0126] The first timestamp is the time when the charging order starts.
[0127] In this embodiment, since the charging state sequence does not carry a timestamp, the timestamp needs to be confirmed separately.
[0128] S508, obtaining a second timestamp of a status bit in a charging status sequence corresponding to the end tag;
[0129] The second timestamp is the time when the charging order ends.
[0130] In this embodiment, since the charging state sequence does not carry a timestamp, the timestamp needs to be confirmed separately.
[0131] S509. Obtain the start and end time of the charging order according to the first timestamp and the second timestamp.
[0132] This embodiment provides a charging order prediction method, which obtains the charging state sequence of the charging pile and inputs the trained estimation model to obtain the charging tag sequence; obtains the start and end tags and the end tag through the charging tag sequence, and then obtains the number of charging orders; obtains the timestamps of the state bits in the charging state sequence corresponding to the start and end tags, and then obtains the start and end time of the charging order. Through the above process, the accuracy of the number of charging orders and the start and end time of the charging orders is improved, which provides a reliable basis for electric vehicle users to select charging piles with good charging gun quality, to know the charging demand in the area and the distribution of electric vehicles, and for the subsequent site selection of charging piles and ancillary derivative businesses of electric vehicles.
[0133] Figure 6 This is a schematic diagram of the structure of a charging order estimation model training device provided in an embodiment of the present application. The device of this embodiment can be in the form of software and / or hardware. Figure 6 As shown, the charging order estimation model training device 600 provided in this embodiment includes: an acquisition module 601 and a training module 602, wherein:
[0134] An acquisition module, configured to acquire target training data, wherein the target training data includes a plurality of samples, each sample includes a charging state sequence and a charging label sequence of the charging state sequence, wherein an idle state bit and an abnormal state bit in the charging state sequence are marked as non-entity information, at least one continuous occupied state bit is marked as a start or end label, and the charging state bit corresponds to the intermediate label one by one;
[0135] A training module is used to train the estimation model of charging orders according to the target training data to obtain a trained estimation model, wherein the estimation model includes a bidirectional long short-term memory network and a conditional random field layer, the bidirectional long short-term memory network is used to output the probability distribution of the state bits, and the conditional random field is used to sequence the state bits.
[0136] In a possible implementation, the acquisition module is further used to obtain target training data, including:
[0137] Acquire original training data, wherein the original training data includes a plurality of samples, each sample includes a charging state sequence and a charging label sequence of the charging state sequence;
[0138] Acquire a charging order according to a charging tag sequence, and use a charging state sequence corresponding to the charging order as a named entity;
[0139] New training data is obtained through the data augmentation algorithm that replaces similar named entities;
[0140] The target training data is obtained according to the original training data and the new training data.
[0141] In a possible implementation, when the data enhancement algorithm using the same type of named entity replacement is used to obtain new training data, the acquisition module is further configured to include:
[0142] Acquire a first charging state sequence, where the first charging state sequence includes at least two sub-charging state sequences, and each sub-charging state sequence corresponds to a charging order;
[0143] Acquire a second charging state sequence, where the second charging state sequence corresponds to a charging order;
[0144] The second charging state sequence replaces any of the sub-charging state sequences to obtain a third charging state sequence;
[0145] New training data is obtained according to the third charging state sequence and the label sequence corresponding to the third charging state sequence.
[0146] In a possible implementation, the training module is further configured to: the conditional random field includes a transfer matrix, and the transfer matrix is configured to mark the abnormal state bit as non-entity information.
[0147] In a possible implementation, the charging order estimation model training device further includes an order prediction module, which is used to
[0148] Obtaining a charging status sequence of a charging pile in a preset time period;
[0149] Inputting the charging state sequence into an estimation model, wherein the estimation model is a model trained by the estimation model training method for charging orders as described above;
[0150] Obtaining a charging tag sequence output by the estimation model;
[0151] A prediction result is obtained according to the charging tag sequence, where the prediction result includes the quantity of charging orders.
[0152] In a possible implementation, the order prediction module is further used to:
[0153] Get prediction results, including:
[0154] According to the charging tag sequence, obtaining the start and end tags and the end tag;
[0155] Determine a charging order according to the start and end tags and the end tag;
[0156] According to the determined charging order, the quantity of the charging order is obtained.
[0157] In a possible implementation, the order prediction module is further used to:
[0158] Obtaining a first timestamp of a state bit in a charging state sequence corresponding to the start and end tags;
[0159] Obtaining a second timestamp of a status bit in a charging status sequence corresponding to the end tag;
[0160] According to the first timestamp and the second timestamp, the start and end times of the charging order are obtained.
[0161] Figure 7 A hardware structure diagram of a charging order estimation model training device provided in an embodiment of the present application.
[0162] like Figure 7 As shown, the charging order estimation model training device 700 includes:
[0163] Processor 701 and memory 702;
[0164] The memory 702 stores computer-executable instructions;
[0165] The processor executes the computer-executable instructions stored in the memory 702, so that the electronic device executes the charging order estimation model training method as described above.
[0166] The specific implementation process of the processor 701 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0167] The embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the truck detection method.
[0168] The embodiment of the present application provides a method that a person of ordinary skill in the art can understand that all or some of the steps, systems, and functional modules / units in the device disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).
[0169] As is well known to those skilled in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer-readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.
[0170] Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0171] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0172] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A charging order estimation model training method, It is characterized in that The method comprises: Acquire target training data, the target training data comprising a plurality of samples, each sample comprising a charging state sequence and a charging label sequence of the charging state sequence, wherein an idle state bit and an abnormal state bit in the charging state sequence are marked as non-entity information, at least one continuous occupied state bit is marked as a start or end label, and the charging state bit corresponds to the intermediate label one by one; According to the target training data, the estimation model of the charging order is trained to obtain a trained estimation model, wherein the estimation model includes a bidirectional long short-term memory network and a conditional random field layer, the bidirectional long short-term memory network is used to output the probability distribution of the state bit, and the conditional random field is used to sequence the state bit.
2. The method according to claim 1, It is characterized in that The obtaining of target training data comprises: Acquire original training data, wherein the original training data includes a plurality of samples, each sample includes a charging state sequence and a charging label sequence of the charging state sequence; Acquire a charging order according to a charging tag sequence, and use a charging state sequence corresponding to the charging order as a named entity; New training data is obtained through the data augmentation algorithm that replaces similar named entities; The target training data is obtained according to the original training data and the new training data.
3. The method according to claim 2, It is characterized in that The data enhancement algorithm obtained by replacing similar named entities to obtain new training data includes: Acquire a first charging state sequence, where the first charging state sequence includes at least two sub-charging state sequences, and each sub-charging state sequence corresponds to a charging order; Acquire a second charging state sequence, where the second charging state sequence corresponds to a charging order; The second charging state sequence replaces any of the sub-charging state sequences to obtain a third charging state sequence; New training data is obtained according to the third charging state sequence and the label sequence corresponding to the third charging state sequence.
4. The method according to any one of claims 1 to 3, It is characterized in that The conditional random field includes a transfer matrix, and the transfer matrix is used to mark the abnormal state bit as non-entity information.
5. A method for predicting charging orders, It is characterized in that include: Obtaining a charging status sequence of a charging pile in a preset time period; Inputting the charging state sequence into an estimation model, wherein the estimation model is a model trained by the method according to any one of claims 1 to 4; Obtaining a charging tag sequence output by the estimation model; A prediction result is obtained according to the charging tag sequence, where the prediction result includes the quantity of charging orders.
6. The method according to claim 5, It is characterized in that The obtaining of prediction results according to the charging tag sequence includes: According to the charging tag sequence, obtaining the start and end tags and the end tag; Determine a charging order according to the start and end tags and the end tag; According to the determined charging order, the quantity of the charging order is obtained.
7. The method according to claim 6, It is characterized in that The method further comprises: Obtaining a first timestamp of a state bit in a charging state sequence corresponding to the start and end tags; Obtaining a second timestamp of a status bit in a charging status sequence corresponding to the end tag; According to the first timestamp and the second timestamp, the start and end times of the charging order are obtained.
8. A charging order estimation model training device, include: An acquisition module, configured to acquire target training data, wherein the target training data includes a plurality of samples, each sample includes a charging state sequence and a charging label sequence of the charging state sequence, wherein an idle state bit and an abnormal state bit in the charging state sequence are marked as non-entity information, at least one continuous occupied state bit is marked as a start or end label, and the charging state bit corresponds to the intermediate label one by one; A training module is used to train the estimation model of charging orders according to the target training data to obtain a trained estimation model, wherein the estimation model includes a bidirectional long short-term memory network and a conditional random field layer, the bidirectional long short-term memory network is used to output the probability distribution of the state bits, and the conditional random field is used to sequence the state bits.
9. An electronic device, include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the charging order estimation model training method as described in any one of claims 1 to 7.
