CN118260625B - Charging current abnormality detection method and terminal - Google Patents
Charging current abnormality detection method and terminal Download PDFInfo
- Publication number
- CN118260625B CN118260625B CN202410692729.3A CN202410692729A CN118260625B CN 118260625 B CN118260625 B CN 118260625B CN 202410692729 A CN202410692729 A CN 202410692729A CN 118260625 B CN118260625 B CN 118260625B
- Authority
- CN
- China
- Prior art keywords
- charging
- sequence
- order
- current
- differential
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/243—Classification techniques relating to the number of classes
- G06F18/2433—Single-class perspective, e.g. one-against-all classification; Novelty detection; Outlier detection
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
Landscapes
- Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Business, Economics & Management (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Economics (AREA)
- Strategic Management (AREA)
- Public Health (AREA)
- General Business, Economics & Management (AREA)
- Water Supply & Treatment (AREA)
- Tourism & Hospitality (AREA)
- General Health & Medical Sciences (AREA)
- Primary Health Care (AREA)
- Marketing (AREA)
- Human Resources & Organizations (AREA)
- Probability & Statistics with Applications (AREA)
- Charge And Discharge Circuits For Batteries Or The Like (AREA)
- Tests Of Electric Status Of Batteries (AREA)
- Secondary Cells (AREA)
Abstract
本发明公开了一种充电电流异常检测方法及终端,获取目标车辆充电订单中第一预设时间段内的目标电流序列;对电流序列进行一阶差分得到差分序列;根据该序列计算预设的差分统计量;将目标车辆的所有充电订单对应的差分统计量按照预设类别数目进行聚类,得到聚类簇;获取每个聚类簇中的第一分位数以及与第一分位数位置对称的第二分位数;并判断每个聚类簇中所有第一分位数与第二分位数之间的和是否属于0的邻近域,若是,则标记对应的充电订单为正常订单;否则,标记对应的充电订单为异常订单。本发明通过计算差分序列和对应的差分统计量的方式,将充电过程中可能出现的反应电池状态的波动具象化,进一步提高了最终异常判断的准确性。
The present invention discloses a charging current anomaly detection method and terminal, which obtains a target current sequence within a first preset time period in a charging order of a target vehicle; performs a first-order difference on the current sequence to obtain a differential sequence; calculates a preset differential statistic based on the sequence; clusters the differential statistics corresponding to all charging orders of the target vehicle according to a preset number of categories to obtain clusters; obtains the first quantile in each cluster and the second quantile symmetrical to the first quantile; and determines whether the sum between all first quantiles and second quantiles in each cluster belongs to the neighborhood of 0, and if so, marks the corresponding charging order as a normal order; otherwise, marks the corresponding charging order as an abnormal order. The present invention visualizes the fluctuations of the reaction battery state that may occur during the charging process by calculating the differential sequence and the corresponding differential statistic, further improving the accuracy of the final abnormality judgment.
Description
技术领域Technical Field
本发明涉及充电检测领域,尤其涉及一种充电电流异常检测方法及终端。The present invention relates to the field of charging detection, and in particular to a charging current abnormality detection method and terminal.
背景技术Background Art
由于传统能源的不断减少和使用传统能源的过程中所造成的对环境的污染,新能源的利用和开发被提到了新的高度。落地到汽车行业,电动汽车的普及率越来越高;而电池作为电动汽车的核心部件,为了保证电动汽车在使用过程中的安全性,电池的安全监测尤其重要。而现有技术中对电池数据的采集通常集中于车辆处于使用状态时的数据,较为重视对车辆行驶过程中或者是充电过程中电池可能出现的危险情况,这样所采集的数据量较大。Due to the continuous reduction of traditional energy and the pollution to the environment caused by the use of traditional energy, the utilization and development of new energy has been raised to a new level. In the automotive industry, the popularity of electric vehicles is getting higher and higher; and batteries are the core components of electric vehicles. In order to ensure the safety of electric vehicles during use, battery safety monitoring is particularly important. In the existing technology, the collection of battery data is usually focused on the data when the vehicle is in use, and more attention is paid to the dangerous situations that may occur in the battery during the driving or charging process of the vehicle, so the amount of data collected is relatively large.
发明内容Summary of the invention
本发明所要解决的技术问题是:提供一种充电电流异常检测方法及终端,实现提高判断电池状态的效率。The technical problem to be solved by the present invention is to provide a charging current abnormality detection method and a terminal to improve the efficiency of judging the battery status.
为了解决上述技术问题,本发明采用的一种技术方案为:In order to solve the above technical problems, a technical solution adopted by the present invention is:
一种充电电流异常检测方法,包括步骤:A method for detecting abnormal charging current includes the following steps:
获取目标车辆充电订单中第一预设时间段内的目标电流序列;Obtaining a target current sequence within a first preset time period in a charging order for a target vehicle;
对所述电流序列进行一阶差分得到差分序列;Performing a first-order difference on the current sequence to obtain a differential sequence;
根据所述差分序列计算预设的差分统计量;Calculating a preset difference statistic according to the difference sequence;
将所述目标车辆的所有充电订单对应的所述差分统计量按照预设类别数目进行聚类,得到聚类簇;Clustering the difference statistics corresponding to all charging orders of the target vehicle according to a preset number of categories to obtain cluster clusters;
获取每个聚类簇中的第一分位数以及与所述第一分位数位置对称的第二分位数;Obtain the first quantile in each cluster and the second quantile symmetrical to the first quantile;
对于每个所述聚类簇,判断所述聚类簇中所有所述第一分位数与所述第二分位数之间的和是否属于0的邻近域,若是,则标记所述聚类簇中所述差分统计量对应的所述充电订单为正常订单;否则,标记所述聚类簇中所述差分统计量对应的所述充电订单为异常订单。For each of the clusters, determine whether the sum of all the first quantiles and the second quantiles in the cluster belongs to a neighborhood of 0. If so, mark the charging order corresponding to the differential statistic in the cluster as a normal order; otherwise, mark the charging order corresponding to the differential statistic in the cluster as an abnormal order.
为了解决上述技术问题,本发明采用的另一种技术方案为:In order to solve the above technical problems, another technical solution adopted by the present invention is:
一种充电电流异常检测终端,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现以下步骤:A charging current abnormality detection terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
获取目标车辆充电订单中第一预设时间段内的目标电流序列;Obtaining a target current sequence within a first preset time period in a charging order for a target vehicle;
对所述电流序列进行一阶差分得到差分序列;Performing a first-order difference on the current sequence to obtain a differential sequence;
根据所述差分序列计算预设的差分统计量;Calculating a preset difference statistic according to the difference sequence;
将所述目标车辆的所有充电订单对应的所述差分统计量按照预设类别数目进行聚类,得到聚类簇;Clustering the difference statistics corresponding to all charging orders of the target vehicle according to a preset number of categories to obtain cluster clusters;
获取每个聚类簇中的第一分位数以及与所述第一分位数位置对称的第二分位数;Obtain the first quantile in each cluster and the second quantile symmetrical to the first quantile;
对于每个所述聚类簇,判断所述聚类簇中所有所述第一分位数与所述第二分位数之间的和是否属于0的邻近域,若是,则标记所述聚类簇中所述差分统计量对应的所述充电订单为正常订单;否则,标记所述聚类簇中所述差分统计量对应的所述充电订单为异常订单。For each of the clusters, determine whether the sum of all the first quantiles and the second quantiles in the cluster belongs to a neighborhood of 0. If so, mark the charging order corresponding to the differential statistic in the cluster as a normal order; otherwise, mark the charging order corresponding to the differential statistic in the cluster as an abnormal order.
本发明的有益效果在于:获取充电订单中第一预设时间段内的目标电流序列进行差分得到差分序列,并根据差分序列得到差分统计量,通过预先训练的异常识别模型根据差分统计量和车辆信息得到异常判定结果,在输入模型前通过获取预设时间段内的目标电流序列进行后续处理减少了数据的处理量,并且通过计算差分序列和对应的差分统计量的方式,将充电过程中可能出现的反应电池状态的波动具象化,进一步提高了最终异常判断的准确性;获取单个车辆对应的全部订单所得到的差分统计量进行聚类得到聚类簇,并通过每个聚类簇中对称的第一分位数以及第二分位数进行相加判断和是否属于0的邻近域,即根据差分序列中的分位数能够反映目标电流序列中电流的变化程度,并且若和不属于0的邻近域,则说明波动在充电过程中并未抵消,大概率是电池本身的异常,故此时将整个聚类簇中对应的订单均标记为异常订单,因对于同一个电池随时间推移也存在不同的阶段,提前聚类后再进行判断能够在保证正确率的前提下提高筛选出异常订单的效率。The beneficial effects of the present invention are as follows: a target current sequence within a first preset time period in a charging order is obtained by performing differential analysis to obtain a differential sequence, and a differential statistic is obtained based on the differential sequence; an abnormality identification model trained in advance is used to obtain an abnormality determination result based on the differential statistic and vehicle information; the target current sequence within a preset time period is obtained for subsequent processing before inputting into the model, thereby reducing the amount of data to be processed; and by calculating the differential sequence and the corresponding differential statistic, the fluctuation of the reaction battery state that may occur during the charging process is visualized, thereby further improving the accuracy of the final abnormality determination; the data obtained from all orders corresponding to a single vehicle are obtained; The obtained differential statistics are clustered to obtain clusters, and the symmetrical first quantile and second quantile in each cluster are added to determine whether the sum belongs to the neighborhood of 0, that is, the quantile in the differential sequence can reflect the degree of change of the current in the target current sequence, and if the sum does not belong to the neighborhood of 0, it means that the fluctuation is not offset during the charging process, and it is likely that the battery itself is abnormal. Therefore, the corresponding orders in the entire cluster are marked as abnormal orders at this time, because there are different stages for the same battery over time. Clustering in advance and then judging can improve the efficiency of screening out abnormal orders while ensuring the accuracy.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明实施例的一种充电电流异常检测方法的步骤流程图;FIG1 is a flowchart of a method for detecting abnormal charging current according to an embodiment of the present invention;
图2为本发明实施例的一种充电电流异常检测方法的预测过程流程图;FIG2 is a flow chart of a prediction process of a charging current abnormality detection method according to an embodiment of the present invention;
图3为本发明实施例的一种充电电流异常检测方法的模型训练过程流程图;FIG3 is a flow chart of a model training process of a charging current anomaly detection method according to an embodiment of the present invention;
图4为本发明实施例的一种充电电流异常检测方法的预测模型结构示意图;FIG4 is a schematic diagram of a prediction model structure of a charging current abnormality detection method according to an embodiment of the present invention;
图5为本发明实施例的一种充电电流异常检测终端的结构示意图;FIG5 is a schematic diagram of the structure of a charging current abnormality detection terminal according to an embodiment of the present invention;
标号说明:Description of labels:
1、一种充电电流异常检测终端;2、处理器;3、存储器。1. A charging current abnormality detection terminal; 2. A processor; 3. A memory.
具体实施方式DETAILED DESCRIPTION
为详细说明本发明的技术内容、所实现目的及效果,以下结合实施方式并配合附图予以说明。In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
请参照图1,一种充电电流异常检测方法,包括步骤:Referring to FIG. 1 , a method for detecting abnormal charging current includes the following steps:
获取目标车辆充电订单中第一预设时间段内的目标电流序列;Obtaining a target current sequence within a first preset time period in a charging order for a target vehicle;
对所述电流序列进行一阶差分得到差分序列;Performing a first-order difference on the current sequence to obtain a differential sequence;
根据所述差分序列计算预设的差分统计量;Calculating a preset difference statistic according to the difference sequence;
将所述目标车辆的所有充电订单对应的所述差分统计量按照预设类别数目进行聚类,得到聚类簇;Clustering the difference statistics corresponding to all charging orders of the target vehicle according to a preset number of categories to obtain cluster clusters;
获取每个聚类簇中的第一分位数以及与所述第一分位数位置对称的第二分位数;Obtain the first quantile in each cluster and the second quantile symmetrical to the first quantile;
对于每个所述聚类簇,判断所述聚类簇中所有所述第一分位数与所述第二分位数之间的和是否属于0的邻近域,若是,则标记所述聚类簇中所述差分统计量对应的所述充电订单为正常订单;否则,标记所述聚类簇中所述差分统计量对应的所述充电订单为异常订单。For each of the clusters, determine whether the sum of all the first quantiles and the second quantiles in the cluster belongs to a neighborhood of 0. If so, mark the charging order corresponding to the differential statistic in the cluster as a normal order; otherwise, mark the charging order corresponding to the differential statistic in the cluster as an abnormal order.
从上述描述可知,本发明的有益效果在于:获取充电订单中第一预设时间段内的目标电流序列进行差分得到差分序列,并根据差分序列得到差分统计量,通过预先训练的异常识别模型根据差分统计量和车辆信息得到异常判定结果,在输入模型前通过获取预设时间段内的目标电流序列进行后续处理减少了数据的处理量,并且通过计算差分序列和对应的差分统计量的方式,将充电过程中可能出现的反应电池状态的波动具象化,进一步提高了最终异常判断的准确性;获取单个车辆对应的全部订单所得到的差分统计量进行聚类得到聚类簇,并通过每个聚类簇中对称的第一分位数以及第二分位数进行相加判断和是否属于0的邻近域,即根据差分序列中的分位数能够反映目标电流序列中电流的变化程度,并且若和不属于0的邻近域,则说明波动在充电过程中并未抵消,大概率是电池本身的异常,故此时将整个聚类簇中对应的订单均标记为异常订单,因对于同一个电池随时间推移也存在不同的阶段,提前聚类后再进行判断能够在保证正确率的前提下提高筛选出异常订单的效率。From the above description, it can be seen that the beneficial effects of the present invention are: obtaining the target current sequence within the first preset time period in the charging order, performing differential analysis to obtain a differential sequence, and obtaining a differential statistic based on the differential sequence, obtaining an abnormality judgment result based on the differential statistic and vehicle information through a pre-trained abnormality recognition model, and obtaining the target current sequence within the preset time period for subsequent processing before inputting the model to reduce the amount of data processing, and by calculating the differential sequence and the corresponding differential statistic, the fluctuations in the reaction battery state that may occur during the charging process are visualized, further improving the accuracy of the final abnormality judgment; obtaining all the corresponding abnormality sequences for a single vehicle The differential statistics obtained from the orders are clustered to obtain clusters, and the symmetrical first quantile and second quantile in each cluster are added to determine whether the sum belongs to the neighborhood of 0, that is, the quantile in the differential sequence can reflect the degree of change of the current in the target current sequence, and if the sum does not belong to the neighborhood of 0, it means that the fluctuation is not offset during the charging process, and it is likely that the battery itself is abnormal. Therefore, the corresponding orders in the entire cluster are marked as abnormal orders at this time, because there are different stages for the same battery over time. Clustering in advance and then judging can improve the efficiency of screening out abnormal orders while ensuring the accuracy.
进一步地,所述获取目标车辆充电订单中第一预设时间段内的目标电流序列包括:Further, the step of obtaining a target current sequence within a first preset time period in a target vehicle charging order includes:
获取目标车辆充电订单中在电恒流段的恒流电流值;Obtain the constant current value in the constant current section of the target vehicle charging order;
获取所述目标车辆在所述充电订单的充电时间结束前第一预设时间段内的初始电流序列;Acquire an initial current sequence of the target vehicle within a first preset time period before the end of the charging time of the charging order;
将所述电流序列中的每一序列电流值除以所述恒流电流值得到目标电流值;Dividing each sequence current value in the current sequence by the constant current value to obtain a target current value;
根据所述目标电流值得到目标电流序列。A target current sequence is obtained according to the target current value.
由上述描述可知,因充电持续期间电池内存储的电量逐渐增加,此时通常电池状态较为稳定,而充电时间结束前即充电过程末端的电流变化状态能够在一定程度上反映电池的健康程度,故获取充电时间结束前第一预设时间段内的电流序列进行处理,能够提高发现电池故障的概率,进而提高最终得到的异常判断结果的准确性。From the above description, it can be seen that as the amount of electricity stored in the battery gradually increases during charging, the battery state is usually relatively stable at this time, and the current change state before the end of the charging time, that is, at the end of the charging process, can reflect the health of the battery to a certain extent. Therefore, obtaining the current sequence in the first preset time period before the end of the charging time for processing can increase the probability of discovering battery faults, and thereby improve the accuracy of the final abnormality judgment result.
进一步地,所述根据所述差分序列计算预设的差分统计量包括:Further, the calculating a preset difference statistic according to the difference sequence includes:
计算差分序列中的最大值、最小值、标准差、均值、最大绝对值、所述最大值与所述最小值的差以及预设个数的分位数。The maximum value, minimum value, standard deviation, mean, maximum absolute value, difference between the maximum value and the minimum value, and a preset number of quantiles in the difference sequence are calculated.
由上述描述可知,根据差分序列获取分位数、最大值、最小值等差分统计量,对差分序列的特征进行进一步拆解,从而为模型的预测提供了更加深入和多维的训练特征,避免了模型计算过程中的片面化,从而提高了模型预测结果的准确性。From the above description, we can see that by obtaining differential statistics such as quantiles, maximum values, and minimum values based on the differential sequence, the characteristics of the differential sequence are further decomposed, thereby providing more in-depth and multi-dimensional training features for the model prediction, avoiding one-sidedness in the model calculation process, and thus improving the accuracy of the model prediction results.
进一步地,所述判断所有所述第一分位数与所述第二分位数之间的和是否属于0的邻近域之后还包括:Furthermore, after determining whether the sum of all the first quantiles and the second quantiles belongs to a neighborhood of 0, the method further includes:
根据车辆信息、标记后的所述充电订单以及每一所述充电订单对应的差分统计量构建模型训练集;Constructing a model training set according to the vehicle information, the marked charging order, and the differential statistics corresponding to each charging order;
根据所述模型训练集训练初始异常识别模型得到异常识别模型。The initial anomaly recognition model is trained according to the model training set to obtain an anomaly recognition model.
由上述描述可知,根据标记后的正常订单以及异常订单和其对应的差分统计量对初始异常识别模型进行训练,则能够建立订单标记和差分统计量以及车辆信息之间的对应关系,使得训练完成的异常识别模型具有判断订单是否异常的能力。From the above description, it can be seen that by training the initial anomaly recognition model based on the marked normal orders and abnormal orders and their corresponding differential statistics, the correspondence between the order labels, differential statistics and vehicle information can be established, so that the trained anomaly recognition model has the ability to determine whether an order is abnormal.
进一步地,所述第一分位数为第十一百分位数;所述第二分位数为第八十八百分位数。Further, the first quantile is the eleventh percentile; and the second quantile is the eighty-eighth percentile.
由上述描述可知,取第十一百分位数和第八十八百分位数,包括了差分序列的开始位置和结束位置,对于反映在第一预设时间段内的数值波动具有代表性。From the above description, it can be seen that the 11th percentile and the 88th percentile include the start position and the end position of the difference sequence, which are representative for reflecting the fluctuation of the value within the first preset time period.
进一步地,所述预设个数的分位数包括:Furthermore, the preset number of quantiles includes:
获取预设的划分数量;Get the preset number of divisions;
根据所述划分数量划分所述差分序列得到第一个数的分位数;Dividing the difference sequence according to the number of divisions to obtain the quantile of the first number;
通过等距抽样从第一个数的所述分位数中获取预设个数的分位数。A preset number of quantiles are obtained from the quantiles of the first number by equidistant sampling.
由上述描述可知,可根据不同的场景、车辆特性、电池特性或是模型训练要求调整划分数量以及预设个数获取到不同的分位数结果进行模型训练和预测过程,提高模型训练的精度。From the above description, it can be seen that the number of divisions and the preset number can be adjusted according to different scenarios, vehicle characteristics, battery characteristics or model training requirements to obtain different quantile results for model training and prediction process, thereby improving the accuracy of model training.
进一步地,所述划分数量为100,所述预设个数为8。Furthermore, the number of divisions is 100 and the preset number is 8.
由上述描述可知,将差分序列对应的分位数划分为百分位后再获取其中的8个作为模型训练和预测过程中所使用的分位数,兼顾了模型处理的数据量和精度。From the above description, we can see that the quantiles corresponding to the difference sequence are divided into percentiles and then 8 of them are obtained as the quantiles used in the model training and prediction process, which takes into account the amount of data and accuracy processed by the model.
进一步地,根据所述差分序列计算预设的差分统计量之后还包括:Furthermore, after calculating the preset difference statistic according to the difference sequence, the method further includes:
将所述差分统计量、所述目标车辆的车辆信息输入预先训练的异常识别模型得到异常判定结果。The differential statistic and the vehicle information of the target vehicle are input into a pre-trained abnormality recognition model to obtain an abnormality determination result.
由上述描述可知,训练完成异常识别模型之后,在需要对订单进行是否异常的判断时,能够直接通过差分统计量、车辆信息进行判断,在减小需要获取的数据量的同时,通过模型训练的方式保证了识别的准确率。From the above description, it can be seen that after the abnormality recognition model is trained, when it is necessary to judge whether an order is abnormal, it can be judged directly through differential statistics and vehicle information. While reducing the amount of data that needs to be obtained, the accuracy of recognition is guaranteed through model training.
进一步地,所述异常判定结果包括所述充电订单的异常概率。Furthermore, the abnormality determination result includes an abnormality probability of the charging order.
由上述描述可知,充电订单对应的异常概率作为异常判定结果输出,为判断电池是否存在异常提供了量化的数据参考。From the above description, it can be seen that the abnormal probability corresponding to the charging order is output as the abnormality judgment result, which provides a quantitative data reference for judging whether there is an abnormality in the battery.
请参照图4,一种充电电流异常检测终端,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述的一种充电电流异常检测方法中的各个步骤。Please refer to Figure 4, a charging current abnormality detection terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements each step of the above-mentioned charging current abnormality detection method when executing the computer program.
本发明上述一种电电流异常检测方法能够适用于检测电池尤其是电动汽车中的电池是否有异常风险的场景,以下通过具体实施方式进行说明。The above-mentioned method for detecting abnormal current of the present invention can be applied to the scenario of detecting whether a battery, especially a battery in an electric vehicle, has abnormal risk, which is described below through a specific implementation method.
请参照图1-3,本发明的实施例一为:Please refer to Figures 1-3, the first embodiment of the present invention is:
一种充电电流异常检测方法,包括步骤:A method for detecting abnormal charging current includes the following steps:
S1、获取目标车辆充电订单中第一预设时间段内的目标电流序列,包括:S1. Obtaining a target current sequence within a first preset time period in a target vehicle charging order, including:
S10、获取目标车辆一充电订单对应的充电电流序列;S10, obtaining a charging current sequence corresponding to a charging order of a target vehicle;
S11、获取目标车辆该充电订单中在电恒流段的恒流电流值;S11, obtaining the constant current value of the target vehicle in the constant current section in the charging order;
S12、获取所述目标车辆在所述充电订单的充电时间结束前第一预设时间段内的初始电流序列;S12, obtaining an initial current sequence of the target vehicle within a first preset time period before the charging time of the charging order ends;
在一种可选的实施方式中,获取末端即充电时间结束前60秒内的初始电流序列;In an optional embodiment, an initial current sequence within 60 seconds before the end of the charging time is obtained;
S13、将所述电流序列中的每一序列电流值除以所述恒流电流值得到目标电流值;S13, dividing each current value in the current sequence by the constant current value to obtain a target current value;
S14、根据所述目标电流值得到目标电流序列,包括:将目标电流值按照其对应的序列电流值的排列顺序排列得到目标电流序列;S14, obtaining a target current sequence according to the target current values, including: arranging the target current values according to the arrangement order of their corresponding sequence current values to obtain a target current sequence;
将每一序列电流值都除以恒流电流值,得到无量纲的目标电流值,排除了不同订单产生时外部电流的影响,从而提高对电池状态判定的准确性;“无量纲”是一个数学和物理学术语,指的是某个量在单位选择上不依赖于任何特定的量纲;在一些物理和工程问题中,为了简化问题或者更方便地比较不同物理量之间的关系,常常会引入无量纲量。通过选择适当的单位,可以将物理量化简为一个纯数,而不涉及任何特定的单位;Divide each sequence current value by the constant current value to obtain a dimensionless target current value, eliminating the influence of external current when different orders are generated, thereby improving the accuracy of battery status judgment; "dimensionless" is a mathematical and physics term, which means that a certain quantity does not depend on any specific dimension in the unit selection; in some physical and engineering problems, dimensionless quantities are often introduced to simplify the problem or to more conveniently compare the relationship between different physical quantities. By choosing an appropriate unit, the physical quantity can be simplified to a pure number without involving any specific unit;
S2、对所述电流序列进行一阶差分得到差分序列;S2, performing first-order difference on the current sequence to obtain a differential sequence;
一阶差分是指在数列或时间序列中,相邻两项之间的差值。具体地说,对于一个数列{a1,a2,a3,...,an},其一阶差分序列为{a2-a1,a3-a2,...,an-an-1};The first-order difference refers to the difference between two consecutive terms in a sequence or time series. Specifically, for a sequence {a1, a2, a3, ..., an}, its first-order difference sequence is {a2-a1, a3-a2, ..., an-an-1};
S3、根据所述差分序列计算预设的差分统计量,包括:分别计算差分序列中的最大值(diff_max)、最小值(diff_min)、标准差(diff_std)、均值(diff_mean)、最大绝对值(即差分序列中绝对值的最大值diff_length)、所述最大值与所述最小值的差(diff_max_min)以及预设个数的分位数组成差分统计量;S3, calculating a preset differential statistic according to the differential sequence, including: respectively calculating the maximum value (diff_max), the minimum value (diff_min), the standard deviation (diff_std), the mean (diff_mean), the maximum absolute value (i.e., the maximum absolute value diff_length in the differential sequence), the difference between the maximum value and the minimum value (diff_max_min), and a preset number of quantiles in the differential sequence to form the differential statistic;
其中,计算预设个数的分位数包括:Wherein, calculating the preset number of quantiles includes:
S31、获取预设的划分数量;S31, obtaining a preset number of divisions;
S32、根据所述划分数量划分所述差分序列得到第一个数的分位数;S32, dividing the difference sequence according to the number of divisions to obtain the quantile of the first number;
S33、通过等距抽样从第一个数的所述分位数中获取预设个数的分位数;S33, obtaining a preset number of quantiles from the quantiles of the first number by equidistant sampling;
在一种可选的实施方式中,划分数量为100,预设个数为8,则得到99个分位数,最终获取到预设个数的分位数为:In an optional implementation, the number of divisions is 100, the preset number is 8, and 99 quantiles are obtained. The preset number of quantiles finally obtained is:
diff_q11:差分序列第十一百分位数;diff_q22:差分序列第二十二百分位数;diff_q33:差分序列第三十三百分位数;diff_q44:差分序列第四十四百分位数;diff_q55:差分序列第五十五百分位数;diff_q66:差分序列第六十六百分位数;diff_q77:差分序列第七十七百分位数;diff_q88:差分序列第八十八百分位数;diff_q11: the 11th percentile of the difference sequence; diff_q22: the 22nd percentile of the difference sequence; diff_q33: the 33rd percentile of the difference sequence; diff_q44: the 44th percentile of the difference sequence; diff_q55: the 55th percentile of the difference sequence; diff_q66: the 66th percentile of the difference sequence; diff_q77: the 77th percentile of the difference sequence; diff_q88: the 88th percentile of the difference sequence;
S4、将所述差分统计量、所述目标车辆的车辆信息输入预先训练的异常识别模型得到所述充电订单的异常判定结果;S4, inputting the differential statistic and the vehicle information of the target vehicle into a pre-trained abnormality recognition model to obtain an abnormality determination result of the charging order;
在一种可选的实施方式中,车辆信息包括batvin(车辆vin识别码)、电池类型、电池厂商等;In an optional implementation, the vehicle information includes batvin (vehicle vin identification code), battery type, battery manufacturer, etc.;
在一种可选的实施方式中,异常判定结果包括充电订单的异常概率;即可以根据概率直接输出异常或正常的判断结果,也可在输出时连同概率值一起展示;In an optional embodiment, the abnormality determination result includes the abnormality probability of the charging order; that is, the abnormal or normal determination result can be directly output according to the probability, or it can be displayed together with the probability value when outputting;
请参照图3,在一种可选的实施方式中,S3之后还包括异常识别模型训练过程:Referring to FIG. 3 , in an optional implementation, S3 further includes an abnormality recognition model training process:
S5、将所述目标车辆的所有充电订单对应的所述差分统计量按照预设类别数目进行聚类,得到聚类簇;即对于同一目标车辆的所有充电订单进行聚类;S5, clustering the differential statistics corresponding to all charging orders of the target vehicle according to a preset number of categories to obtain clusters; that is, clustering all charging orders for the same target vehicle;
在一种可选的实施方式中,聚类方法为k-means,预设类别数目为2;In an optional implementation, the clustering method is k-means, and the number of preset categories is 2;
S6、获取每个聚类簇中的第一分位数以及与所述第一分位数位置对称的第二分位数;S6, obtaining a first quantile in each cluster and a second quantile symmetrical to the first quantile;
在一种可选的实施方式中,所述第一分位数为第十一百分位数;所述第二分位数为第八十八百分位数;每一差分统计量都带有订单标记,便于区分来自不同订单的差分统计量;In an optional implementation, the first quantile is the eleventh percentile; the second quantile is the eighty-eighth percentile; each differential statistic is marked with an order to facilitate distinguishing differential statistics from different orders;
S7、对于每个所述聚类簇,判断所述聚类簇中所有所述第一分位数与所述第二分位数之间的和是否属于0的邻近域,若是,则标记所述聚类簇中所述差分统计量对应的所述充电订单为正常订单;否则,标记所述聚类簇中所述差分统计量对应的所述充电订单为异常订单;S7. For each of the clusters, determine whether the sum of all the first quantiles and the second quantiles in the cluster belongs to a neighborhood of 0. If so, mark the charging order corresponding to the differential statistic in the cluster as a normal order; otherwise, mark the charging order corresponding to the differential statistic in the cluster as an abnormal order.
其中,“邻近域”通常指的是在某个特定点周围的局部区域或邻域,在数学、物理学和计算机科学等领域中经常会用到这个概念;Among them, "neighborhood" usually refers to the local area or neighborhood around a specific point. This concept is often used in fields such as mathematics, physics, and computer science.
S8、根据车辆信息、标记后的所述充电订单以及每一所述充电订单对应的差分统计量构建模型训练集;S8. Construct a model training set according to the vehicle information, the marked charging order, and the differential statistics corresponding to each charging order;
S9、根据所述模型训练集训练初始异常识别模型得到异常识别模型;S9, training an initial anomaly recognition model according to the model training set to obtain an anomaly recognition model;
请参照图3,训练得到的异常识别模型供步骤S4计算异常概率值使用;Please refer to FIG. 3 , the trained abnormality recognition model is used for calculating the abnormality probability value in step S4;
请参照图4,异常识别模型包括:Referring to FIG. 4 , the anomaly recognition model includes:
(1)Sigmoid函数:激活函数之一,是一个非线性函数,公式为:(1) Sigmoid function: One of the activation functions, it is a nonlinear function with the formula:
; ;
其中,x是输入,是Sigmoid函数的输出,取值范围在0到1之间。这使得Sigmoid函数在某些情况下可以将输入映射到概率值;Where x is the input, is the output of the Sigmoid function, with a value range between 0 and 1. This allows the Sigmoid function to map inputs to probability values in some cases;
(2)Dense层:即全连接层(Fully Connected Layer),用于特征整合;(2) Dense layer: fully connected layer, used for feature integration;
(3)Concatenate:将两个或多个对象(通常是字符串、列表、数组等)按顺序连接在一起形成一个更大的对象的操作;(3) Concatenate: An operation that connects two or more objects (usually strings, lists, arrays, etc.) in sequence to form a larger object;
(4)Embedding:嵌入,指的是将高维数据映射到低维空间的过程;这个过程能够保留原始数据的重要特征,并且通常能够更有效地表示数据,从而方便后续的处理和分析。(4) Embedding: Embedding refers to the process of mapping high-dimensional data into a low-dimensional space. This process can retain the important features of the original data and can usually represent the data more effectively, thus facilitating subsequent processing and analysis.
请参照图5,本发明的实施例二为:Please refer to FIG. 5 , the second embodiment of the present invention is:
一种充电电流异常检测终端1,包括处理器2、存储器3及存储在存储器3上并可在所述处理器2上运行的计算机程序,所述处理器2执行所述计算机程序时实现实施例一中的各个步骤。A charging current abnormality detection terminal 1 includes a processor 2, a memory 3, and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, each step in the first embodiment is implemented.
综上所述,本发明提供了一种充电电流异常检测方法及终端,通过提取单次充电过程中的末端电流进行分析得到电池状况,减少了数据的分析量,并且通过充电时电流的变化进行分析,能够在电池进行常规使用之前对质量问题进行提前预警,提高了电池使用过程中的安全性,同时,通过构建差分序列并计算对应差分统计量,训练异常识别模型并通过异常识别模型得到订单的异常判断结果,能够综合多个不同条件提高判断结果的准确性;同时在训练异常识别模型的过程中,通过将对同一车辆的订单进行聚类并计算分位数和的方式进行正常订单和异常订单的标记,综合了对于单个车辆中电池状态持续性的考虑,无需单独为每一个订单单独进行标记,提高了处理的效率。In summary, the present invention provides a charging current anomaly detection method and terminal, which obtain the battery status by extracting the terminal current during a single charging process for analysis, thereby reducing the amount of data analysis, and analyzing the change in current during charging, so as to give early warning of quality problems before the battery is normally used, thereby improving the safety of the battery during use. At the same time, by constructing a differential sequence and calculating the corresponding differential statistics, training an abnormality recognition model and obtaining the abnormal judgment result of the order through the abnormality recognition model, the accuracy of the judgment result can be improved by combining multiple different conditions; at the same time, in the process of training the abnormality recognition model, normal orders and abnormal orders are marked by clustering the orders of the same vehicle and calculating the quantile sum, thereby comprehensively considering the continuity of the battery status in a single vehicle, eliminating the need to mark each order separately, thereby improving the processing efficiency.
以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等同变换,或直接或间接运用在相关的技术领域,均同理包括在本发明的专利保护范围内。The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410692729.3A CN118260625B (en) | 2024-05-31 | 2024-05-31 | Charging current abnormality detection method and terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410692729.3A CN118260625B (en) | 2024-05-31 | 2024-05-31 | Charging current abnormality detection method and terminal |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN118260625A CN118260625A (en) | 2024-06-28 |
| CN118260625B true CN118260625B (en) | 2024-09-13 |
Family
ID=91611603
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410692729.3A Active CN118260625B (en) | 2024-05-31 | 2024-05-31 | Charging current abnormality detection method and terminal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118260625B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114880384A (en) * | 2022-07-11 | 2022-08-09 | 杭州宇谷科技有限公司 | Unsupervised two-wheeled electric vehicle charging time sequence abnormity detection method and system |
| WO2023194833A1 (en) * | 2022-04-08 | 2023-10-12 | Ses Holdings Pte. Ltd. | Methods of operating electrochemical storage devices based on anomaly clustering, and software and systems including same |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111614690B (en) * | 2020-05-28 | 2022-10-11 | 上海观安信息技术股份有限公司 | Abnormal behavior detection method and device |
| CN112848958B (en) * | 2020-12-31 | 2023-08-08 | 昆明理工大学 | Charging mode identification method and device |
| CN115423003A (en) * | 2022-08-22 | 2022-12-02 | 青岛特来电新能源科技有限公司 | Battery abnormality detection method, battery abnormality detection device, electronic apparatus, and computer storage medium |
-
2024
- 2024-05-31 CN CN202410692729.3A patent/CN118260625B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2023194833A1 (en) * | 2022-04-08 | 2023-10-12 | Ses Holdings Pte. Ltd. | Methods of operating electrochemical storage devices based on anomaly clustering, and software and systems including same |
| CN114880384A (en) * | 2022-07-11 | 2022-08-09 | 杭州宇谷科技有限公司 | Unsupervised two-wheeled electric vehicle charging time sequence abnormity detection method and system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN118260625A (en) | 2024-06-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8868985B2 (en) | Supervised fault learning using rule-generated samples for machine condition monitoring | |
| CN111459700A (en) | Method and apparatus for diagnosing device failure, diagnostic device, and storage medium | |
| CN111626360B (en) | Method, apparatus, device and storage medium for detecting boiler fault type | |
| CN102549567B (en) | Natural language navigation for power monitoring systems | |
| CN118035757A (en) | Electric drive assembly fault diagnosis method and device based on large language model | |
| CN116740900B (en) | SVM-based power construction early warning method and system | |
| CN111612149A (en) | A method, system and medium for main network line state detection based on decision tree | |
| CN118690307B (en) | OCSVM-based intelligent recognition system and method for abnormality of efficient exhaust unit | |
| CN112204547A (en) | Data processing method, device and equipment based on industrial object model | |
| CN112730654A (en) | Fault detection method and device for sulfur hexafluoride electrical equipment and terminal equipment | |
| CN118260625B (en) | Charging current abnormality detection method and terminal | |
| CN119758103A (en) | Battery data collection, analysis and management method and system based on remote AI monitoring | |
| CN113469237B (en) | User intention recognition method, device, electronic equipment and storage medium | |
| CN118227797B (en) | Data processing method and system based on text large model | |
| CN118136117A (en) | A method for constructing a protein phase separation prediction model, a detection method and a system thereof | |
| CN116910499A (en) | System status monitoring method, device, electronic equipment and readable storage medium | |
| CN115881226A (en) | Quality control method and device for clinical detection sample, electronic equipment and storage medium | |
| CN113435609B (en) | Line loss abnormity detection method and device and terminal equipment | |
| CN116047313A (en) | Quality detection and maintenance method and system for lithium battery energy storage box | |
| CN116647860A (en) | 5G core network index correlation alarm analysis method, electronic device and storage medium | |
| CN119005941B (en) | Stator slot temperature fault analysis method based on industrial Internet platform | |
| CN119348434B (en) | Vehicle-mounted charger working process monitoring and fault early warning analysis system and method | |
| CN118734191A (en) | Scoring method and terminal for vehicle detection index with unimodal distribution | |
| CN120751039A (en) | Whole vehicle CAN signal general analysis method and system based on time sequence feature matching | |
| CN119648235A (en) | A threshold generation method and device for anti-money laundering rule model |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |