[go: up one dir, main page]

CN115494405A - Battery monitoring system and its exception handling method, electronic equipment, storage medium - Google Patents

Battery monitoring system and its exception handling method, electronic equipment, storage medium Download PDF

Info

Publication number
CN115494405A
CN115494405A CN202211035805.0A CN202211035805A CN115494405A CN 115494405 A CN115494405 A CN 115494405A CN 202211035805 A CN202211035805 A CN 202211035805A CN 115494405 A CN115494405 A CN 115494405A
Authority
CN
China
Prior art keywords
computer
target
battery
sent
battery data
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.)
Pending
Application number
CN202211035805.0A
Other languages
Chinese (zh)
Inventor
袁维
谭志全
李月生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Brothers Automation Technology Co ltd
Original Assignee
Shenzhen Brothers Automation Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Brothers Automation Technology Co ltd filed Critical Shenzhen Brothers Automation Technology Co ltd
Priority to CN202211035805.0A priority Critical patent/CN115494405A/en
Publication of CN115494405A publication Critical patent/CN115494405A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • G01R31/36Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
    • G01R31/382Arrangements for monitoring battery or accumulator variables, e.g. SoC
    • G01R31/3842Arrangements for monitoring battery or accumulator variables, e.g. SoC combining voltage and current measurements

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application relates to a battery monitoring system and an exception handling method thereof, an electronic device and a storage medium, wherein the method comprises the following steps: the target middle computer obtains first working state information of the upper computer; the target middle computer stores a target battery data set acquired by the target lower computer into a target storage area on the target middle computer under the condition that the upper computer is determined to be abnormal according to the first working state information, wherein the target battery data set comprises all battery data acquired by the target lower computer in one data acquisition period; and after the target central computer determines that the upper computer recovers from the abnormality according to the acquired second working state information of the upper computer, determining all battery data sets to be sent which are not sent to the upper computer in the target storage area, and sending all the battery data sets to be sent to the upper computer, wherein all the battery data sets to be sent comprise the target battery data set. The technical problem that the monitoring capability of a battery monitoring system is poor is solved.

Description

电池监测系统及其异常处理方法、电子设备、存储介质Battery monitoring system and its exception handling method, electronic equipment, storage medium

技术领域technical field

本申请涉及电池监测技术领域,尤其涉及一种电池监测系统及其异常处理方法、电子设备、存储介质。The present application relates to the technical field of battery monitoring, and in particular to a battery monitoring system, an abnormal handling method thereof, electronic equipment, and a storage medium.

背景技术Background technique

随着能源危机和环境问题的日益严重,可再生能源的使用越来越广泛,例如,新能源汽车正逐渐替代传统的以汽油为能量源的汽车,成为汽车市场的主流。随着全球各国对可再生能源的重视程度的提高,在各国政策的大力支持之下,动力电池的市场持续增长,推动了电池行业的快速发展。With the increasingly serious energy crisis and environmental problems, the use of renewable energy is becoming more and more widespread. For example, new energy vehicles are gradually replacing traditional gasoline-powered vehicles and becoming the mainstream of the automotive market. As countries around the world pay more attention to renewable energy, the power battery market continues to grow with the strong support of national policies, which promotes the rapid development of the battery industry.

电池供应商需要使用电池监测系统对生产出来的电池进行电压、电流、温度等电池数据的检测,根据电池数据判断电池是否出现异常,并对出现异常情况的电池进行相应的处理。目前,相关技术中电池监测系统通常包括上位机和下位机,下位机用于采集电池数据并传输至上位机,由上位机判断电池数据是否异常,当判断为异常时,上位机再下发异常处理命令至下位机,电池数据的上传和异常处理命令的下发需要一定的时间,时效性差,不能快速保护电池和下位机主板,并且在上位机出现异常时,上位机无法接受到下位机上传的电池数据,待上位机恢复正常时,电池数据已经丢失,也无法针对丢失的电池数据中出现的异常情况进行处理,监测能力较差。Battery suppliers need to use the battery monitoring system to detect battery data such as voltage, current, and temperature of the produced batteries, judge whether the battery is abnormal according to the battery data, and deal with the abnormal battery accordingly. At present, the battery monitoring system in the related technology usually includes a host computer and a lower computer. The lower computer is used to collect battery data and transmit it to the upper computer. The upper computer judges whether the battery data is abnormal. When it is judged to be abnormal, the upper computer sends an abnormal It takes a certain amount of time to process the command to the lower computer, upload the battery data and issue the exception processing command, and the timeliness is poor. It cannot quickly protect the battery and the main board of the lower computer, and when the upper computer is abnormal, the upper computer cannot receive the upload from the lower computer. When the upper computer returns to normal, the battery data has been lost, and it is impossible to deal with the abnormal situation in the lost battery data, and the monitoring ability is poor.

针对上述相关技术中电池监测系统的监测能力较差的问题,目前尚未提出有效的解决方案。Aiming at the problem of poor monitoring capability of the battery monitoring system in the above-mentioned related technologies, no effective solution has been proposed so far.

发明内容Contents of the invention

本申请提供了一种电池监测系统及其异常处理方法、电子设备、存储介质,以至少解决相关技术中电池监测系统的监测能力较差的技术问题。The present application provides a battery monitoring system and its abnormal handling method, electronic equipment, and storage media, so as to at least solve the technical problem of poor monitoring capability of the battery monitoring system in the related art.

根据本申请实施例的一个方面,提供了一种异常处理方法,应用于电池监控系统,包括:According to an aspect of the embodiment of the present application, there is provided an exception handling method applied to a battery monitoring system, including:

目标中位机获取上位机的第一工作状态信息,其中,电池监控系统包括上位机以及至少一个中位机,在电池监控系统正常运行的情况下,上位机与至少一个中位机通讯连接,目标中位机是至少一个中位机中的任一个中位机;The target central computer obtains the first working status information of the upper computer, wherein the battery monitoring system includes the upper computer and at least one central computer, and when the battery monitoring system is in normal operation, the upper computer communicates with the at least one central computer, The target median computer is any one of at least one median computer;

目标中位机在根据第一工作状态信息确定上位机出现异常的情况下,将目标下位机采集的目标电池数据集保存至目标中位机上的目标存储区域中,其中,电池监控系统还包括多个下位机,目标下位机是多个下位机中与目标中位机通讯连接的下位机,目标电池数据集包括目标下位机在一个数据采集周期中采集的所有电池数据;When the target central computer determines that the upper computer is abnormal according to the first working state information, it saves the target battery data set collected by the target lower computer to the target storage area on the target central computer, wherein the battery monitoring system also includes multiple A lower computer, the target lower computer is a lower computer connected to the target middle computer among the plurality of lower computers, and the target battery data set includes all battery data collected by the target lower computer in one data collection cycle;

目标中位机在根据获取的上位机的第二工作状态信息确定上位机从异常中恢复后,在目标存储区域中确定出未发送至上位机的所有待发送电池数据集,并将所有待发送电池数据集发送至上位机,其中,所有待发送电池数据集中包括目标电池数据集。After the target central computer determines that the upper computer has recovered from the abnormality according to the acquired second working status information of the upper computer, it determines in the target storage area all the battery data sets to be sent that have not been sent to the upper computer, and sends all the data sets to be sent The battery data set is sent to the host computer, wherein all the battery data sets to be sent include the target battery data set.

根据本申请实施例的另一方面,还提供了一种电池监控系统,包括上位机,至少一个中位机和多个下位机:According to another aspect of the embodiment of the present application, a battery monitoring system is also provided, including a host computer, at least one middle computer and multiple lower computers:

目标中位机,用于获取上位机的第一工作状态信息,其中,在电池监控系统正常运行的情况下,上位机与至少一个中位机通讯连接,目标中位机是至少一个中位机中的任一个中位机;The target middle computer is used to obtain the first working status information of the upper computer, wherein, when the battery monitoring system is in normal operation, the upper computer is connected to at least one middle computer by communication, and the target middle computer is at least one middle computer Any one of the median computer;

目标中位机,还用于在根据第一工作状态信息确定上位机出现异常的情况下,将目标下位机采集的目标电池数据集保存至目标中位机上的目标存储区域中,其中,目标下位机是多个下位机中与目标中位机通讯连接的下位机,目标电池数据集包括目标下位机在一个数据采集周期中采集的所有电池数据;The target middle computer is also used to save the target battery data set collected by the target lower computer to the target storage area on the target middle computer when it is determined that the upper computer is abnormal according to the first working status information, wherein the target lower computer The computer is a lower computer that communicates with the target middle computer among multiple lower computers, and the target battery data set includes all battery data collected by the target lower computer in one data collection cycle;

目标中位机,还用于在根据获取的上位机的第二工作状态信息确定上位机从异常中恢复后,在目标存储区域中确定出未发送至上位机的所有待发送电池数据集,并将所有待发送电池数据集发送至上位机,其中,所有待发送电池数据集中包括目标电池数据集。The target central computer is also used to determine in the target storage area all battery data sets to be sent that have not been sent to the upper computer after determining that the upper computer recovers from the abnormality according to the obtained second working state information of the upper computer, and Send all the battery data sets to be sent to the host computer, wherein all the battery data sets to be sent include the target battery data set.

根据本申请实施例的另一方面,还提供了一种存储介质,该存储介质包括存储的程序,程序运行时执行上述的方法。According to another aspect of the embodiments of the present application, there is also provided a storage medium, the storage medium includes a stored program, and the above method is executed when the program runs.

根据本申请实施例的另一方面,还提供了一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器通过计算机程序执行上述的方法。According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored in the memory and operable on the processor, and the processor executes the above method through the computer program.

根据本申请的一个方面,提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述方法中任一实施例的步骤。According to an aspect of the present application there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in any embodiment of the above method.

在本申请实施例中,采用目标中位机获取上位机的第一工作状态信息,其中,电池监控系统包括上位机以及至少一个中位机,在电池监控系统正常运行的情况下,上位机与至少一个中位机通讯连接,目标中位机是至少一个中位机中的任一个中位机;目标中位机在根据第一工作状态信息确定上位机出现异常的情况下,将目标下位机采集的目标电池数据集保存至目标中位机上的目标存储区域中,其中,电池监控系统还包括多个下位机,目标下位机是多个下位机中与目标中位机通讯连接的下位机,目标电池数据集包括目标下位机在一个数据采集周期中采集的所有电池数据;目标中位机在根据获取的上位机的第二工作状态信息确定上位机从异常中恢复后,在目标存储区域中确定出未发送至上位机的所有待发送电池数据集,并将所有待发送电池数据集发送至上位机,其中,所有待发送电池数据集中包括目标电池数据集的方式,通过在电池监测系统的上位机和下位机之间设置中位机,利用中位机对大量电池数据进行保存和转发,构建出了一个分布式数据传输网络,实现了电池数据的分布式存储,即使上位机出现异常,下位机也能继续工作,并通过中位机存储上位机异常期间的数据,电池数据不会丢失,待上位机恢复后再进行转发,提高了电池监测系统的监测能力,进而解决了相关技术中电池监测系统的监测能力较差的技术问题。In the embodiment of the present application, the target intermediate computer is used to obtain the first working status information of the upper computer, wherein the battery monitoring system includes an upper computer and at least one intermediate computer. When the battery monitoring system is running normally, the upper computer and At least one central computer is connected by communication, and the target central computer is any one of the at least one central computer; when the target central computer determines that the upper computer is abnormal according to the first working state information, it will send the target lower computer The collected target battery data set is saved to the target storage area on the target central computer, wherein the battery monitoring system also includes a plurality of lower computers, and the target lower computer is a lower computer among the plurality of lower computers that communicates with the target central computer. The target battery data set includes all the battery data collected by the target lower computer in one data collection cycle; after the target middle computer determines that the upper computer has recovered from the abnormality according to the obtained second working status information of the upper computer, the target storage area Determine all the battery data sets to be sent that have not been sent to the host computer, and send all the battery data sets to be sent to the host computer, wherein, all the battery data sets to be sent include the target battery data set, through the battery monitoring system A middle computer is set between the upper computer and the lower computer, and a large amount of battery data is saved and forwarded by the middle computer, a distributed data transmission network is constructed, and the distributed storage of battery data is realized. Even if the upper computer is abnormal, The lower computer can also continue to work, and store the data during the abnormal period of the upper computer through the middle computer. The battery data will not be lost, and will be forwarded after the upper computer recovers. The technical problem of poor monitoring ability of the battery monitoring system.

附图说明Description of drawings

此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described here are used to provide a further understanding of the application and constitute a part of the application. The schematic embodiments and descriptions of the application are used to explain the application and do not constitute an improper limitation to the application. In the attached picture:

图1是根据本申请实施例的一种可选的电池监测系统的示意图;FIG. 1 is a schematic diagram of an optional battery monitoring system according to an embodiment of the present application;

图2是根据本申请实施例的一种可选的异常处理方法的流程图;FIG. 2 is a flow chart of an optional exception handling method according to an embodiment of the present application;

图3是根据本申请实施例的一种终端的结构框图。Fig. 3 is a structural block diagram of a terminal according to an embodiment of the present application.

具体实施方式detailed description

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiment of the application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiment of the application. Obviously, the described embodiment is only It is an embodiment of a part of the application, but not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.

需要说明的是,本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first" and "second" in the description and claims of the present application and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

根据本申请实施例的一方面,提供了一种电池监测系统实施例。According to an aspect of the embodiments of the present application, an embodiment of a battery monitoring system is provided.

目标中位机,用于获取上位机的第一工作状态信息,其中,在电池监控系统正常运行的情况下,上位机与至少一个中位机通讯连接,目标中位机是至少一个中位机中的任一个中位机;The target middle computer is used to obtain the first working status information of the upper computer, wherein, when the battery monitoring system is in normal operation, the upper computer is connected to at least one middle computer by communication, and the target middle computer is at least one middle computer Any one of the median computer;

目标中位机,还用于在根据第一工作状态信息确定上位机出现异常的情况下,将目标下位机采集的目标电池数据集保存至目标中位机上的目标存储区域中,其中,目标下位机是多个下位机中与目标中位机通讯连接的下位机,目标电池数据集包括目标下位机在一个数据采集周期中采集的所有电池数据;The target middle computer is also used to save the target battery data set collected by the target lower computer to the target storage area on the target middle computer when it is determined that the upper computer is abnormal according to the first working status information, wherein the target lower computer The computer is a lower computer that communicates with the target middle computer among multiple lower computers, and the target battery data set includes all battery data collected by the target lower computer in one data collection cycle;

目标中位机,还用于在根据获取的上位机的第二工作状态信息确定上位机从异常中恢复后,在目标存储区域中确定出未发送至上位机的所有待发送电池数据集,并将所有待发送电池数据集发送至上位机,其中,所有待发送电池数据集中包括目标电池数据集。The target central computer is also used to determine in the target storage area all battery data sets to be sent that have not been sent to the upper computer after determining that the upper computer recovers from the abnormality according to the obtained second working state information of the upper computer, and Send all the battery data sets to be sent to the host computer, wherein all the battery data sets to be sent include the target battery data set.

通过在电池监测系统的上位机和下位机之间设置中位机,利用中位机对大量电池数据进行保存和转发,构建出了一个分布式数据传输网络,实现了电池数据的分布式存储,即使上位机出现异常,下位机也能继续工作,并通过中位机存储上位机异常期间的数据,电池数据不会丢失,待上位机恢复后再进行转发,提高了电池监测系统的监测能力,进而解决了相关技术中电池监测系统的监测能力较差的技术问题。By setting up the middle computer between the upper computer and the lower computer of the battery monitoring system, and using the middle computer to save and forward a large amount of battery data, a distributed data transmission network is constructed to realize the distributed storage of battery data. Even if the upper computer is abnormal, the lower computer can continue to work, and the data during the abnormal period of the upper computer will be stored through the middle computer, and the battery data will not be lost. It will be forwarded after the upper computer recovers, which improves the monitoring ability of the battery monitoring system. Furthermore, the technical problem of poor monitoring ability of the battery monitoring system in the related art is solved.

如图1所示是根据本申请实施例的一种可选的电池监测系统的示意图,如图1所示,该电池监测系统可以包括多个下位机(下位机A1、下位机A2、下位机A3、下位机B1、下位机B2、下位机B3,图1中仅示出6个,实际中可以更少或更多)、至少一个中位机(中位机A,中位机B,图1中仅示出2个,实际中可以更少或更多)以及上位机:上位机连接有所有中位机(中位机A,中位机B),每个中位机连接有多个下位机中的至少一个下位机(图1中每个中位机连接有3个下位机,例如,中位机A连接下位机A1、下位机A2、下位机A3,中位机B连接下位机B1、下位机B2、下位机B3,实际中可以更少或更多,每个中位机连接的下位机的数量可以不同)。As shown in Figure 1 is a schematic diagram of an optional battery monitoring system according to an embodiment of the present application. As shown in Figure 1, the battery monitoring system may include a plurality of lower computers (lower computer A1, lower computer A2, lower computer A3, lower computer B1, lower computer B2, lower computer B3, only show 6 among Fig. 1, can be less or more in reality), at least one middle computer (middle computer A, middle computer B, Fig. Only 2 are shown in 1, which can be less or more in practice) and host computer: the host computer is connected to all intermediate computers (intermediate computer A, intermediate computer B), and each intermediate computer is connected to multiple At least one lower computer in the lower computer (each middle computer in Fig. 1 is connected with 3 lower computers, for example, middle computer A connects lower computer A1, lower computer A2, lower computer A3, middle computer B connects lower computer B1, lower computer B2, and lower computer B3 may be less or more in practice, and the number of lower computers connected to each middle computer may be different).

可选地,上位机与中位机之间采用TCP通讯连接,中位机与下位机之间采用CAN通讯连接。中位机通过CAN通讯与下位机连接,使得下位机与中位机之间能够实现实时、可靠的数据通信,中位机通过TCP通讯与上位机连接,使得中位机与上位机之间能够实现传输距离长、传输速率高的数据通信,通过在电池监测系统中结合两种通讯方式,使得电池监测系统兼具CAN通讯和TCP通讯的优点,具有较高的实时性、可靠性,传输距离长,传输速率高,显著提高了电池监测系统的监测能力,有利于实现对大批量电池的监测。例如,1台上位机通过交换机可以控制10台中位机;1台中位机通过CAN总线可以控制64台下位机;1台下位机可以控制8个通道,1个通道接1个电池,那么1台上位机就可以同时对5120个电池进行监测。Optionally, a TCP communication connection is used between the upper computer and the middle computer, and a CAN communication connection is used between the middle computer and the lower computer. The middle computer is connected with the lower computer through CAN communication, so that real-time and reliable data communication can be realized between the lower computer and the middle computer, and the middle computer is connected with the upper computer through TCP communication, so that the middle computer and the upper computer can be Realize data communication with long transmission distance and high transmission rate. By combining two communication methods in the battery monitoring system, the battery monitoring system has the advantages of both CAN communication and TCP communication, and has high real-time performance, reliability, and transmission distance. It is long and has a high transmission rate, which significantly improves the monitoring capability of the battery monitoring system and is conducive to the monitoring of large quantities of batteries. For example, 1 upper computer can control 10 middle computers through the switch; 1 middle computer can control 64 lower computers through CAN bus; 1 lower computer can control 8 channels, and 1 channel is connected to 1 battery, then One host computer can monitor 5120 batteries at the same time.

CAN通讯:CAN(Controller Area Network),即控制器局域网,是ISO国际标准化的串行通信协议,为分布式控制系统实现各节点之间实时、可靠的数据通信提供了强有力的技术支持。基于CAN现场总线的数据通信具有突出的可靠性、实时性和灵活性。主要表现在CAN为多主方式工作,CAN总线的节点分成不同的优先级,采用非破坏仲裁技术,报文采用短帧结构,数据出错率极低,节点在错误严重的情况下可自动关闭输出。但CAN现场总线作为一种面向工业底层控制的通信网络,其局限性也是显而易见的。首先,它不能与Internet互连不能实现远程信息共享;其次,它不易与上位控制机直接接口,现有的CAN接口卡与以太网网卡相比大都价格昂贵;还有,CAN现场总线无论是其通信距离还是通信速率都无法和以太网相比。CAN communication: CAN (Controller Area Network), that is, controller area network, is an ISO international standardized serial communication protocol, which provides strong technical support for the distributed control system to realize real-time and reliable data communication between nodes. Data communication based on CAN field bus has outstanding reliability, real-time and flexibility. The main performance is that CAN works in a multi-master mode, the nodes of the CAN bus are divided into different priorities, non-destructive arbitration technology is adopted, the message adopts a short frame structure, the data error rate is extremely low, and the node can automatically close the output when the error is serious . However, CAN field bus, as a communication network oriented to industrial bottom layer control, has obvious limitations. First of all, it cannot be interconnected with the Internet and cannot realize remote information sharing; secondly, it is not easy to directly interface with the upper controller, and the existing CAN interface cards are mostly expensive compared with Ethernet network cards; Neither the communication distance nor the communication speed can be compared with Ethernet.

TCP通讯:TCP(Transmission Control Protocol),即传输控制协议,是一种面向连接的、可靠的、基于字节流的传输层通信协议。基于TCP/IP的以太网是一种标准开放式的网络,由其组成的系统兼容性和互操作性好,资源共享能力强,可以很容易的实现将控制现场的数据与信息系统上的资源共享,数据的传输距离长、传输速率高、易与Internet连接、低成本、易组网、与计算机、服务器的接口十分方便。以太网采用的是带有冲突检测的载波侦听多路访问协议CSMA/CD,无法保证数据传输的实时性要求,是一种非确定性的网络系统;存在安全可靠性问题,以太网采用超时重发机制,单点的故障容易扩散,造成整个网络系统的瘫痪;也存在对工业环境的适应能力问题,目前工业以太网的鲁棒性和抗干扰能力等都是值得关注的问题,很难适应环境恶劣的工业现场。TCP communication: TCP (Transmission Control Protocol), that is, Transmission Control Protocol, is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. Ethernet based on TCP/IP is a standard open network. The system composed of it has good compatibility and interoperability, and strong resource sharing ability. It can easily realize the control of field data and resources on the information system. Sharing, long data transmission distance, high transmission rate, easy connection with the Internet, low cost, easy networking, and very convenient interface with computers and servers. Ethernet uses the carrier sense multiple access protocol CSMA/CD with collision detection, which cannot guarantee the real-time requirements of data transmission, and is a non-deterministic network system; there are security and reliability issues, and Ethernet uses timeout The retransmission mechanism, single-point faults are easy to spread, causing the paralysis of the entire network system; there is also the problem of adaptability to the industrial environment. At present, the robustness and anti-interference ability of industrial Ethernet are issues worthy of attention, and it is difficult to Adapt to industrial sites with harsh environments.

根据本申请实施例的另一方面,提供了一种异常处理的方法实施例。According to another aspect of the embodiments of the present application, an embodiment of an exception handling method is provided.

可选地,在本实施例中,上述异常处理方法可以应用于如图1所示的电池监控系统。Optionally, in this embodiment, the above exception handling method may be applied to the battery monitoring system as shown in FIG. 1 .

图2是根据本申请实施例的一种可选的异常处理方法的流程图,如图2所示,该方法可以包括以下步骤:Fig. 2 is a flow chart of an optional exception handling method according to an embodiment of the present application. As shown in Fig. 2, the method may include the following steps:

步骤S202,目标中位机获取上位机的第一工作状态信息,其中,电池监控系统包括上位机以及至少一个中位机,在电池监控系统正常运行的情况下,上位机与至少一个中位机通讯连接,目标中位机是至少一个中位机中的任一个中位机;Step S202, the target central computer obtains the first working status information of the upper computer, wherein the battery monitoring system includes the upper computer and at least one central computer, and when the battery monitoring system is in normal operation, the upper computer and the at least one central computer Communication connection, the target central computer is any one of at least one central computer;

步骤S204,目标中位机在根据第一工作状态信息确定上位机出现异常的情况下,将目标下位机采集的目标电池数据集保存至目标中位机上的目标存储区域中,其中,电池监控系统还包括多个下位机,目标下位机是多个下位机中与目标中位机通讯连接的下位机,目标电池数据集包括目标下位机在一个数据采集周期中采集的所有电池数据;Step S204, when the target central computer determines that the upper computer is abnormal according to the first working status information, it saves the target battery data set collected by the target lower computer to the target storage area on the target central computer, wherein the battery monitoring system It also includes a plurality of lower computers, the target lower computer is a lower computer connected to the target middle computer in communication among the plurality of lower computers, and the target battery data set includes all battery data collected by the target lower computer in one data collection cycle;

步骤S206,目标中位机在根据获取的上位机的第二工作状态信息确定上位机从异常中恢复后,在目标存储区域中确定出未发送至上位机的所有待发送电池数据集,并将所有待发送电池数据集发送至上位机,其中,所有待发送电池数据集中包括目标电池数据集。Step S206, after the target central computer determines that the upper computer recovers from the abnormality according to the acquired second working state information of the upper computer, it determines all the battery data sets to be sent that have not been sent to the upper computer in the target storage area, and sends All the battery data sets to be sent are sent to the host computer, wherein all the battery data sets to be sent include the target battery data set.

通过上述步骤S202至步骤S206,通过在电池监测系统的上位机和下位机之间设置中位机,利用中位机对大量电池数据进行保存和转发,构建出了一个分布式数据传输网络,实现了电池数据的分布式存储,即使上位机出现异常,下位机也能继续工作,并通过中位机存储上位机异常期间的数据,电池数据不会丢失,待上位机恢复后再进行转发,提高了电池监测系统的监测能力,进而解决了相关技术中电池监测系统的监测能力较差的技术问题。Through the above steps S202 to S206, by setting the middle computer between the upper computer and the lower computer of the battery monitoring system, and using the middle computer to save and forward a large amount of battery data, a distributed data transmission network is constructed to realize Distributed storage of battery data, even if the upper computer is abnormal, the lower computer can continue to work, and the data during the abnormal period of the upper computer is stored through the middle computer, the battery data will not be lost, and the data will be forwarded after the upper computer recovers, improving The monitoring ability of the battery monitoring system is improved, and then the technical problem of the poor monitoring ability of the battery monitoring system in the related art is solved.

本申请可以应用在包括但不限于电池监测系统、电池管理系统等需要对电池数据进行采集和处理的场景中。This application can be applied in scenarios including but not limited to battery monitoring systems, battery management systems, etc. that need to collect and process battery data.

在步骤S202提供的技术方案中,目标中位机获取上位机的第一工作状态信息,其中,电池监控系统包括上位机以及至少一个中位机,在电池监控系统正常运行的情况下,上位机与至少一个中位机通讯连接,目标中位机是至少一个中位机中的任一个中位机。In the technical solution provided in step S202, the target central computer obtains the first working status information of the upper computer, wherein the battery monitoring system includes the upper computer and at least one middle computer, and when the battery monitoring system operates normally, the upper computer Communicating with at least one central computer, the target central computer is any one of the at least one central computer.

工作状态信息用于指示电池监控系统中上位机的工作状态是否异常,在上位机宕机、服务中止、与中位机通讯连接断开等多种情况下,都会导致电池监测系统中上位机工作状态的异常。The working status information is used to indicate whether the working status of the upper computer in the battery monitoring system is abnormal. In various situations such as the upper computer downtime, the service suspension, and the disconnection of the communication connection with the middle computer, etc., it will cause the upper computer in the battery monitoring system to work. abnormal state.

工作状态信息的获取方式有多种,包括但不限于以下几种:(1)中位机向上位机发送心跳包,若经预设发送次数或预设时间后仍未收到上位机的响应,则获取到指示上位机出现异常的工作状态信息,若经预设发送次数或预设时间后成功收到上位机的响应,则获取到指示上位机未出现异常的工作状态信息。(2)在电池监控系统正常运行时,上位机会按照预设频率向中位机发送数据获取指令,若中位机在预设时间间隔内未收到上位机发送的获取指令,则获取到指示上位机出现异常的工作状态信息。(3)在电池监控系统正常运行时,中位机会按照预设频率将电池数据传输至上位机,若数据传输失败,则获取到指示上位机出现异常的工作状态信息。There are many ways to obtain working status information, including but not limited to the following: (1) The central computer sends a heartbeat packet to the upper computer. , the working state information indicating that the upper computer is abnormal is obtained, and if the response of the upper computer is successfully received after the preset number of sending times or the preset time, the working state information indicating that the upper computer is not abnormal is obtained. (2) When the battery monitoring system is running normally, the upper computer sends data acquisition instructions to the middle computer according to the preset frequency. If the middle computer does not receive the acquisition instruction sent by the upper computer within the preset time interval, it will get the instruction The upper computer has abnormal working status information. (3) When the battery monitoring system is running normally, the median will transmit the battery data to the upper computer according to the preset frequency. If the data transmission fails, it will obtain the working status information indicating that the upper computer is abnormal.

在步骤S204提供的技术方案中,目标中位机在根据第一工作状态信息确定上位机出现异常的情况下,将目标下位机采集的目标电池数据集保存至目标中位机上的目标存储区域中,其中,电池监控系统还包括多个下位机,目标下位机是多个下位机中与目标中位机通讯连接的下位机,目标电池数据集包括目标下位机在一个数据采集周期中采集的所有电池数据。In the technical solution provided in step S204, when the target middle computer determines that the upper computer is abnormal according to the first working state information, it saves the target battery data set collected by the target lower computer to the target storage area on the target middle computer , wherein the battery monitoring system also includes a plurality of lower computers, the target lower computer is the lower computer connected to the target middle computer among the plurality of lower computers, and the target battery data set includes all data collected by the target lower computer in one data collection cycle battery data.

每个中位机中设置有存储器,存储器的类型不限,可以为同步动态随机存储器(synchronous dynamic random-access memory,简称SDRAM)、Nand-flash存储器等,目标存储区域即为存储器中的存储区域。Each central computer is provided with memory, the type of memory is not limited, it can be synchronous dynamic random-access memory (synchronous dynamic random-access memory, referred to as SDRAM), Nand-flash memory, etc., and the target storage area is the storage area in the memory .

上述目标存储区域可以用于存储上位机出现异常期间,目标下位机采集的目标电池数据集,也可以用于存储上位机出现异常期间及恢复正常后的预设时间段内,目标下位机采集的电池数据集,还可以用于存储任何情况下目标下位机采集的电池数据集。The above-mentioned target storage area can be used to store the target battery data set collected by the target lower computer when the upper computer is abnormal, and can also be used to store the target battery data set collected by the target lower computer during the abnormal period of the upper computer and after returning to normal. The battery data set can also be used to store the battery data set collected by the target lower computer under any circumstances.

与目标中位机通讯连接的下位机可以为多个,在目标中位机有多个目标下位机的情况下,目标电池数据集为所有目标下位机在一个数据采集周期中采集的所有电池数据。There can be multiple slave computers connected to the target central computer. In the case where the target central computer has multiple target slave computers, the target battery data set is all battery data collected by all target slave computers in one data collection cycle. .

在步骤S206提供的技术方案中,目标中位机在根据获取的上位机的第二工作状态信息确定上位机从异常中恢复后,在目标存储区域中确定出未发送至上位机的所有待发送电池数据集,并将所有待发送电池数据集发送至上位机,其中,所有待发送电池数据集中包括目标电池数据集。In the technical solution provided in step S206, after the target central computer determines that the upper computer has recovered from the abnormality according to the obtained second working status information of the upper computer, it determines in the target storage area all the unsent messages to be sent to the upper computer. battery data set, and send all the battery data sets to be sent to the host computer, wherein, all the battery data sets to be sent include the target battery data set.

根据获取的上位机的第二工作状态信息确定上位机从异常中恢复,包括但不限于以下几种情况:(1)中位机向上位机发送心跳包,若经预设发送次数或预设时间后成功收到上位机的响应,则获取到指示上位机恢复正常的工作状态信息。(2)在电池监控系统正常运行时,上位机会按照预设频率向中位机发送数据获取指令,若中位机收到上位机发送的获取指令时,则获取到指示上位机恢复正常的工作状态信息。(3)在电池监控系统正常运行时,中位机会按照预设频率将电池数据传输至上位机,若数据传输成功,则获取到指示上位机恢复正常的工作状态信息。According to the obtained second working status information of the upper computer, it is determined that the upper computer recovers from the abnormality, including but not limited to the following situations: (1) The middle computer sends a heartbeat packet to the upper computer. If the response from the upper computer is successfully received after a certain time, the information indicating the upper computer to return to normal working status will be obtained. (2) When the battery monitoring system is running normally, the upper computer will send a data acquisition command to the middle computer according to the preset frequency. If the middle computer receives the acquisition instruction sent by the upper computer, it will get the command to instruct the upper computer to resume normal work status information. (3) When the battery monitoring system is running normally, the median will transmit the battery data to the upper computer according to the preset frequency. If the data transmission is successful, it will obtain the information indicating that the upper computer returns to normal working status.

可选地,中位机可以将成功传输给上位机的电池数据集采用传输时间进行标记,将目标存储区域中未标记传输时间的电池数据集确定为待发送电池数据集。当传输时间距离当前时间超过预设时长时,中位机可以删除该传输时间对应的电池数据集。Optionally, the central computer may mark the battery data sets successfully transmitted to the host computer with the transmission time, and determine the battery data sets in the target storage area that have no transmission time marked as the battery data sets to be sent. When the distance between the transmission time and the current time exceeds the preset duration, the central computer can delete the battery data set corresponding to the transmission time.

可选地,中位机可以将成功传输给上位机的电池数据集直接删除,目标存储区域中保留的电池数据集即为待发送电池数据集。Optionally, the central computer can directly delete the battery data set successfully transmitted to the host computer, and the battery data set retained in the target storage area is the battery data set to be sent.

待发送电池数据集不仅可以包括上位机异常期间采集的目标电池数据集,还可以包括上位机在出现异常之前采集的电池数据集,还可以包括上位机在恢复正常之后采集的电池数据集。The battery data set to be sent may not only include the target battery data set collected during the abnormality of the upper computer, but also include the battery data set collected by the upper computer before the abnormality occurred, and may also include the battery data set collected by the upper computer after returning to normal.

作为一种可选的实施例,步骤S206中,目标中位机在目标存储区域中确定出未发送至上位机的所有待发送电池数据集,并将所有待发送电池数据集发送至上位机,包括循环执行以下步骤,直至目标存储区域中不包括任意一个待发送电池数据集为止:As an optional embodiment, in step S206, the target central computer determines in the target storage area all the battery data sets to be sent that have not been sent to the host computer, and sends all the battery data sets to be sent to the host computer, Including performing the following steps in a loop until no battery data set to be sent is included in the target storage area:

步骤S61,目标中位机在目标存储区域中确定出未发送至上位机的所有待发送电池数据集;Step S61, the target central computer determines all battery data sets to be sent that have not been sent to the host computer in the target storage area;

步骤S62,目标中位机按照与每个待发送电池数据集对应的采集时刻,在所有待发送电池数据集中确定出指定电池数据集,其中,指定电池数据集对应的采集时刻早于所有待发送电池数据集中除指定电池数据集外的其他待发送电池数据集对应的采集时刻;Step S62, the target central computer determines the designated battery data set in all the battery data sets to be sent according to the collection time corresponding to each battery data set to be sent, wherein the collection time corresponding to the designated battery data set is earlier than that of all the battery data sets to be sent The collection time corresponding to other battery data sets to be sent in the battery data set except the specified battery data set;

步骤S63,目标中位机将指定电池数据集发送至上位机,将指定电池数据集从目标存储区域中删除;在接受到目标下位机发送的新电池数据集的情况下,将新电池数据集作为待发送电池数据集保存至目标存储区域中。Step S63, the target central computer sends the designated battery data set to the upper computer, and deletes the designated battery data set from the target storage area; when receiving the new battery data set sent by the target lower computer, the new battery data set is Save it to the target storage area as the battery data set to be sent.

通过上述步骤S61至S63,将目标中位机中存储的电池数据集按照采集时刻的先后顺序,将最先采集的数据发送给上位机,避免上位机收到的数据出现断点,保持上位机对数据展示的连贯性。在目标存储区域中出现不包括任意一个待发送电池数据集的情况下,则说明中位机已经对上位机异常期间采集的数据全部完成转发,电池监测系统可以恢复正常的工作流程,无需按照异常处理方法进行数据转发。Through the above steps S61 to S63, the battery data sets stored in the target central computer are sent to the host computer according to the order of collection time, so as to avoid breakpoints in the data received by the host computer and keep the host computer Consistency in presentation of data. If the target storage area does not include any battery data set to be sent, it means that the central computer has forwarded all the data collected during the abnormal period of the upper computer, and the battery monitoring system can resume the normal work process without following the abnormal The processing method performs data forwarding.

可选地,在本实施例中,步骤S204,目标中位机在根据工作状态信息确定上位机出现异常的情况下,将目标下位机采集的目标电池数据集保存至目标中位机上的目标存储区域中,还包括以下步骤:Optionally, in this embodiment, in step S204, the target middle computer saves the target battery data set collected by the target lower computer to the target storage on the target middle computer when it determines that the upper computer is abnormal according to the working state information. area, the following steps are also included:

步骤S41,目标中位机按照预设周期向目标下位机发送采集指令;Step S41, the target central computer sends acquisition instructions to the target lower computer according to a preset cycle;

步骤S42,目标下位机在接收到采集指令的情况下,响应于采集指令,将目标下位机采集的目标电池数据集传输至目标中位机;In step S42, the target lower computer transmits the target battery data set collected by the target lower computer to the target middle computer in response to the collection instruction in response to the collection instruction;

步骤S43,目标中位机将目标电池数据集保存至目标中位机上的目标存储区域中。Step S43, the target central computer saves the target battery data set in the target storage area on the target central computer.

在目标下位机为多个的情况下,目标中位机按照预设周期向每个目标下位机同时或依次发送采集指令,每个目标下位机在接收到采集指令的情况下,响应于采集指令,将目标下位机采集的目标电池数据子集传输至目标中位机,目标中位机将一次采集得到的所有目标电池数据子集作为一个目标电池数据集保存至目标中位机上的目标存储区域中。In the case of multiple target lower computers, the target middle computer sends acquisition instructions to each target lower computer at the same time or sequentially according to the preset period, and each target lower computer responds to the acquisition instruction when receiving the acquisition instruction , transmit the target battery data subset collected by the target lower computer to the target middle computer, and the target middle computer saves all the target battery data subsets collected once as a target battery data set to the target storage area on the target middle computer middle.

可选地,在本实施例中,步骤S61,目标中位机在目标存储区域中确定出未发送至上位机的所有待发送电池数据集,还包括如下所述的步骤:Optionally, in this embodiment, in step S61, the target central computer determines in the target storage area all battery data sets to be sent that have not been sent to the host computer, and further includes the following steps:

步骤S611,上位机按照目标周期向目标中位机发送获取指令,其中,目标周期短于预设周期;Step S611, the upper computer sends an acquisition instruction to the target central computer according to the target period, wherein the target period is shorter than the preset period;

步骤S612,目标中位机接收到获取指令的情况下,响应于获取指令,在目标存储区域中确定出未发送至上位机的所有待发送电池数据集。Step S612, when the target central computer receives the acquisition instruction, in response to the acquisition instruction, determine all battery data sets to be sent that have not been sent to the upper computer in the target storage area.

电池监测系统中,上位机获取数据的频率可以设置为高于中位机采集数据的频率,使得在上位机出现异常后能够逐渐减少数据延迟,避免一次出现异常导致长期数据延迟。In the battery monitoring system, the data acquisition frequency of the upper computer can be set higher than that of the central computer, so that the data delay can be gradually reduced after the upper computer is abnormal, and the long-term data delay caused by an abnormality can be avoided.

例如,中位机通过CAN总线每1秒钟获取一次下位机的数据,64台下位机根据本身内部设定的编号,有CAN总线仲裁从1-64号依次发送数据到中位机,中位机会先把收到数据保存FLASH。上位机通过TCP 0.7秒获取一次中位机的数据,中位机根据保存数据的先后,从最先保存的数据开始依次发送到上位机,一个中位机每次上传14388字节数据。For example, the central computer obtains the data of the subordinate computer every 1 second through the CAN bus, and the 64 subordinate computers send data to the central computer sequentially from 1-64 according to the numbers set internally by the CAN bus. The bit machine first saves the received data in FLASH. The upper computer acquires the data of the middle computer once in 0.7 seconds through TCP, and the middle computer sends data to the upper computer sequentially from the first saved data according to the order of saving data, and one middle computer uploads 14388 bytes of data each time.

作为一种可选的实施例,步骤S206中,目标中位机在目标存储区域中确定出未发送至上位机的所有待发送电池数据集,并将所有待发送电池数据集发送至上位机,还包括如下所述的步骤:As an optional embodiment, in step S206, the target central computer determines in the target storage area all the battery data sets to be sent that have not been sent to the host computer, and sends all the battery data sets to be sent to the host computer, Also includes the steps described below:

步骤71,目标中位机在响应于上位机发送的获取指令,确定目标存储区域中待发送电池数据集的数量大于或等于预设数量的情况下,在目标存储区域中确定出第一电池数据集,以及生成第一周期变更信息,并将第一电池数据集以及第一周期变更信息发送至上位机,其中,第一周期变更信息用于指示上位机按照第一周期向目标中位机发送获取指令;In step 71, the target central computer determines the first battery data set in the target storage area when it determines that the number of battery data sets to be sent in the target storage area is greater than or equal to the preset number in response to the acquisition instruction sent by the host computer. set, and generate the first cycle change information, and send the first battery data set and the first cycle change information to the host computer, where the first cycle change information is used to instruct the host computer to send to the target intermediate computer according to the first cycle Get instructions;

步骤72,目标中位机在响应于上位机发送的获取指令,确定目标存储区域中待发送电池数据集的数量小于预设数量的情况下,在目标存储区域中确定出第二电池数据集,以及生成第二周期变更信息,并将第二电池数据集以及第二周期变更信息发送至上位机,其中,第二周期变更信息用于指示上位机按照第二周期向目标中位机发送获取指令,第一周期短于第二周期。Step 72, when the target central computer determines that the number of battery data sets to be sent in the target storage area is less than the preset number in response to the acquisition instruction sent by the host computer, determine the second battery data set in the target storage area, And generate the second cycle change information, and send the second battery data set and the second cycle change information to the host computer, wherein the second cycle change information is used to instruct the host computer to send an acquisition instruction to the target intermediate computer according to the second cycle , the first period is shorter than the second period.

当中位机中的待发送电池数据集的数量较多时,说明上位机的数据有较高延迟,需要按照更高的数据获取频率进行数据获取,即按照第一周期向目标中位机发送获取指令,使得在上位机出现异常后能够逐渐减少数据延迟,并且在不存在数据延迟的情况下及时调整数据获取频率,即按照第二周期向目标中位机发送获取指令,避免频繁出现获取失败的情况。When the number of battery data sets to be sent in the middle computer is large, it means that the data of the upper computer has a high delay, and data acquisition needs to be performed at a higher data acquisition frequency, that is, the acquisition command is sent to the target middle computer according to the first cycle , so that the data delay can be gradually reduced after the upper computer is abnormal, and the data acquisition frequency can be adjusted in time without data delay, that is, the acquisition command is sent to the target central computer according to the second cycle to avoid frequent acquisition failures .

作为一种可选的实施例,该方法还包括如下所述的步骤:As an optional embodiment, the method also includes the following steps:

S81,目标下位机对目标电池进行监测得到目标电池的目标电池数据,其中,目标电池为目标下位机所连接的电池;S81. The target lower computer monitors the target battery to obtain target battery data of the target battery, wherein the target battery is a battery connected to the target lower computer;

S82,在目标下位机通过目标电池数据确定所有目标电池中的指定电池出现指定异常的情况下,按照与指定异常对应的指定处理策略对指定电池进行处理,并记录指定电池的异常信息;S82. When the target lower computer determines that a specified abnormality occurs in a specified battery among all target batteries through the target battery data, process the specified battery according to a specified processing strategy corresponding to the specified abnormality, and record the abnormality information of the specified battery;

S83,目标下位机在接收到目标中位机发送的采集指令的情况下,响应于采集指令,将所有目标电池对应的当前电池数据和异常信息传输至目标中位机,其中,当前电池数据为目标下位机在接收到采集指令时对目标电池进行监测得到的电池数据。S83, when the target lower computer receives the collection instruction sent by the target middle computer, in response to the collection instruction, transmits the current battery data and abnormal information corresponding to all target batteries to the target middle computer, wherein the current battery data is The battery data obtained by monitoring the target battery when the target lower computer receives the collection command.

可选地,在本实施例中,步骤S82,在目标下位机通过目标电池数据确定所有目标电池中的指定电池出现指定异常的情况下,按照与指定异常对应的指定处理策略对指定电池进行处理,并记录指定电池的异常信息,还包括如下所述的几种情况:Optionally, in this embodiment, in step S82, when the target slave computer determines through the target battery data that a specified abnormality occurs in the specified battery among all target batteries, the specified battery is processed according to the specified processing strategy corresponding to the specified abnormality , and record the abnormal information of the specified battery, including the following situations:

当目标下位机检测到指定电池的充电电流大于上限电流保护值时,确定指定电池出现充电电流异常,目标下位机停止给指定电池充电,并将指定电池的异常信息记录为充电电流异常;When the target lower computer detects that the charging current of the designated battery is greater than the upper limit current protection value, it determines that the charging current of the designated battery is abnormal, the target lower computer stops charging the designated battery, and records the abnormal information of the designated battery as abnormal charging current;

当目标下位机检测到指定电池的放电电流小于下限电流保护值时,确定指定电池出现放电电流异常,目标下位机停止给指定电池放电,并将指定电池的异常信息记录为放电电流异常;When the target lower computer detects that the discharge current of the designated battery is lower than the lower limit current protection value, it determines that the discharge current of the designated battery is abnormal, the target lower computer stops discharging the designated battery, and records the abnormal information of the designated battery as abnormal discharge current;

当目标下位机检测到指定电池的电池电压大于电池过压保护值或小于电池欠压保护值时,确定指定电池出现电压异常,目标下位机停止给指定电池充电或放电,并将指定电池的异常信息记录为电压异常;When the target lower computer detects that the battery voltage of the specified battery is greater than the battery overvoltage protection value or lower than the battery undervoltage protection value, it determines that the voltage of the specified battery is abnormal, and the target lower computer stops charging or discharging the specified battery, and reports the abnormality of the specified battery The information is recorded as abnormal voltage;

当目标下位机检测到指定电池的正负极反接时,确定指定电池出现反接异常,目标下位机停止给指定电池充电或放电,并将指定电池的异常信息记录为反接异常。When the target lower computer detects that the positive and negative poles of the designated battery are reversed, it determines that the designated battery has a reverse connection abnormality, the target lower computer stops charging or discharging the designated battery, and records the abnormal information of the designated battery as reverse connection abnormality.

电池可能出现的异常情况和可以采取的处理策略为多种,不受上述举例的限制。There are many possible abnormal conditions of the battery and the possible handling strategies, which are not limited by the above examples.

可选地,在本实施例中,对每个电池采集的电池数据可以包括多种信息:例如,柜号(中位机的编号)、板号(下位机的编号)、通道号(电池所在下位机通道的编号)、电压(下位机的电压检测电路测得的电压值)、电流(下位机的电流检测电路测得的电流值)、容量(下位机根据电流和时间计算得到的电池容量值)、时间(采集数据时处于某个工作模式的时长,如:某个工作模式的第5分钟)、模式(表示采集数据时的工作模式,例如,恒流充电模式、恒功率充电模式、恒压充电模式、恒阻充电模式、恒流放电模式、恒功率放电模式、恒压放电模式、恒阻放电模式)、工步(可以为工步序号,表示采集数据时处于工作流程中第几个工序,工作流程是用于测试电池容量和电池数据有无异常的流程,例如,工作流程为1静置、2恒流充电、3静置、4恒流放电、循环100次,工步为2即表示恒流充电)、报警(表示电池的异常信息,可以为异常标识,不同的异常情况对应的不同的异常标识)、状态(表示采集数据时电池的工作状态,例如,运行状态、暂停状态、停止状态)、循环(循环次数标识,表示采集数据时是工作流程的第n次循环)、主板温度(下位机中用于接电池的每个通道的电路板的温度)、电池温度。Optionally, in this embodiment, the battery data collected for each battery may include a variety of information: for example, the cabinet number (the number of the middle computer), the board number (the number of the lower computer), the channel number (the battery is located channel number of the lower computer), voltage (the voltage value measured by the voltage detection circuit of the lower computer), current (the current value measured by the current detection circuit of the lower computer), capacity (the battery capacity calculated by the lower computer based on the current and time) value), time (the length of time in a certain working mode when collecting data, such as: the 5th minute of a certain working mode), mode (representing the working mode when collecting data, for example, constant current charging mode, constant power charging mode, Constant voltage charging mode, constant resistance charging mode, constant current discharging mode, constant power discharging mode, constant voltage discharging mode, constant resistance discharging mode), working step (it can be the working step serial number, indicating the number in the working process when collecting data The working process is used to test whether the battery capacity and battery data are abnormal. For example, the working process is 1 static, 2 constant current charging, 3 static, 4 constant current discharge, 100 cycles, and the working steps are 2 means constant current charging), alarm (represents the abnormal information of the battery, which can be an abnormal mark, and different abnormal conditions correspond to different abnormal marks), status (represents the working state of the battery when collecting data, for example, running state, pause state, stop state), cycle (cycle number identification, indicating that it is the nth cycle of the workflow when collecting data), motherboard temperature (the temperature of the circuit board of each channel used to connect the battery in the lower computer), battery temperature.

作为一种可选的实施例,在上位机接收到电池数据集后,可以对电池数据集进行解析,得到每个电池的电池数据,并展示在上位机的显示界面中,若有电池的电池数据保护异常信息,则通过弹窗、特殊标识等方式提醒用户进行处理。As an optional embodiment, after the host computer receives the battery data set, it can analyze the battery data set to obtain the battery data of each battery and display it on the display interface of the host computer. For data protection exception information, the user is reminded to deal with it through pop-up windows, special signs, etc.

作为一种可选的实施例,该方法还包括在中位机出现异常时,下位机会按照之前下载的工作流程继续工作,电池电压、电流异常时会启动自动保护模式,待中位机再次连接到下位机时,可以从上次断开时的数据节点开始继续获取下位机的数据。As an optional embodiment, the method also includes that when the central computer is abnormal, the lower computer will continue to work according to the previously downloaded workflow. When the battery voltage and current are abnormal, the automatic protection mode will be activated, and the central computer will be connected again. When reaching the lower computer, you can continue to obtain the data of the lower computer from the data node when it was disconnected last time.

作为一种可选的实施例,该方法还包括在下位机与中位机通讯异常时,上位机界面对应的下位机通道处于离线状态,提示用户处理异常的下位机。As an optional embodiment, the method further includes that when the communication between the lower computer and the middle computer is abnormal, the channel of the lower computer corresponding to the interface of the upper computer is in an offline state, prompting the user to deal with the abnormal lower computer.

作为一种可选的实施例,下文结合具体实施方式示意性的描述本申请的技术方案:As an optional embodiment, the technical solution of the present application is schematically described below in conjunction with specific implementation methods:

目前业内有些电池检测设备是下位机先把数据传给中位机,中位机再传给上位机,由上位机来判断电流是否异常,当判断为异常时,再下发异常处理命令给中位机,中位机再转发给下位机,最后下位机根据命令停止给电池充电,这样经过多次的转发,需要一定的时间,时效性差,不能快速的保护电池和下位机主板。At present, in some battery testing equipment in the industry, the lower computer first transmits the data to the middle computer, and then the middle computer transmits the data to the upper computer. The upper computer judges whether the current is abnormal. Then the middle computer forwards to the lower computer, and finally the lower computer stops charging the battery according to the command. After repeated forwarding, it takes a certain amount of time, and the timeliness is poor, so it cannot quickly protect the battery and the lower computer motherboard.

本方案采用以下异常处理机制,以改进相关技术中电池监测系统的缺陷:This solution uses the following exception handling mechanism to improve the defects of the battery monitoring system in related technologies:

一、上位机异常时,下位机会按照之前下载的工作流程继续工作,并把数据上传到中位机保存,中位机保存数据时长为9小时(NAND FLASH)或者为30分钟(SDRAM)。待上位机再次开始工作并连接到中位机时,可以从上次断开时的数据节点开始继续获取中位机数据,确保数据不会丢失。1. When the upper computer is abnormal, the lower computer will continue to work according to the previously downloaded workflow, and upload the data to the middle computer for storage. The middle computer saves data for 9 hours (NAND FLASH) or 30 minutes (SDRAM). When the upper computer starts working again and connects to the middle computer, it can continue to obtain the data of the middle computer from the data node when it was disconnected last time to ensure that the data will not be lost.

二、中位机异常时,下位机会按照之前下载的工作流程继续工作,电池电压、电流异常时会自动保护。待中位机再次连接到下位机时,可以从上次断开时的数据节点开始继续获取下位机的数据。2. When the central computer is abnormal, the lower computer will continue to work according to the previously downloaded workflow, and it will automatically protect when the battery voltage and current are abnormal. When the central computer is connected to the lower computer again, it can continue to obtain the data of the lower computer from the data node when it was disconnected last time.

三、下位机与中位机CAN通讯异常时,上位机界面对应的下位机通道处于离线状态,提示客户处理异常的下位机。3. When the CAN communication between the lower computer and the middle computer is abnormal, the channel of the lower computer corresponding to the interface of the upper computer is offline, and the customer is prompted to deal with the abnormal lower computer.

四、电池正负极反接时,上位机界面对应的通道会显示报警信息,下位机硬件有防反接保护,不会烧坏下位机的主板,软件也会停止充放电工作。4. When the positive and negative poles of the battery are reversed, the corresponding channel of the upper computer interface will display an alarm message. The hardware of the lower computer has anti-reverse connection protection, which will not burn the main board of the lower computer, and the software will also stop charging and discharging.

五、电池充电电流异常,当下位机检测到某通道电池充电电流大于设定的上限电流保护值时,下位机直接停止给电池充电,起到保护电池和下位机主板作用,并把异常信息传给上位机,上位机界面对应的通道会显示报警信息,提示客户处理异常的电池。5. The battery charging current is abnormal. When the lower computer detects that the battery charging current of a certain channel is greater than the set upper limit current protection value, the lower computer directly stops charging the battery to protect the battery and the lower computer main board, and transmits the abnormal information to For the upper computer, the channel corresponding to the upper computer interface will display an alarm message, prompting the customer to deal with the abnormal battery.

六、电池放电电流异常,当下位机检测到某通道电池放电电流小于设定的下限电流保护值时,下位机直接停止给电池放电,起到保护电池和下位机主板作用,并把异常信息传给上位机,上位机界面对应的通道会显示报警信息,提示客户处理异常的电池。6. The battery discharge current is abnormal. When the lower computer detects that the battery discharge current of a certain channel is lower than the set lower limit current protection value, the lower computer directly stops discharging the battery, which protects the battery and the lower computer main board, and transmits the abnormal information to For the upper computer, the channel corresponding to the upper computer interface will display an alarm message, prompting the customer to deal with the abnormal battery.

七、电池电压异常,当下位机检测到某通道电池电压大于设定的电池过压保护值或小于设定的电池欠压保护值时,下位机直接停止给电池充电或放电,起到保护电池和下位机主板作用,并把异常信息传给上位机,上位机界面对应的通道会显示报警信息,提示客户处理异常的电池。7. The battery voltage is abnormal. When the lower computer detects that the battery voltage of a certain channel is greater than the set battery overvoltage protection value or lower than the set battery undervoltage protection value, the lower computer directly stops charging or discharging the battery to protect the battery. It works with the main board of the lower computer, and transmits the abnormal information to the upper computer, and the channel corresponding to the upper computer interface will display the alarm information, prompting the customer to deal with the abnormal battery.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that for the foregoing method embodiments, for the sake of simple description, they are expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Depending on the application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification belong to preferred embodiments, and the actions and modules involved are not necessarily required by this application.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is Better implementation. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.

根据本申请实施例的另一个方面,还提供了一种用于实施上述异常处理方法的服务器或终端。According to another aspect of the embodiments of the present application, a server or terminal for implementing the above exception handling method is also provided.

图3是根据本申请实施例的一种终端的结构框图,如图3所示,该终端可以包括:一个或多个(图3中仅示出一个)处理器201、存储器203、以及传输装置205,如图3所示,该终端还可以包括输入输出设备207。FIG. 3 is a structural block diagram of a terminal according to an embodiment of the present application. As shown in FIG. 3 , the terminal may include: one or more (only one is shown in FIG. 3 ) processors 201, memory 203, and transmission means 205. As shown in FIG. 3 , the terminal may further include an input and output device 207 .

其中,存储器203可用于存储软件程序以及模块,如本申请实施例中的异常处理方法和装置对应的程序指令/模块,处理器201通过运行存储在存储器203内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的异常处理方法。存储器203可包括高速随机存储器,还可以包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器203可进一步包括相对于处理器201远程设置的存储器,这些远程存储器可以通过网络连接至终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。Wherein, the memory 203 can be used to store software programs and modules, such as program instructions/modules corresponding to the exception handling method and device in the embodiment of the present application, and the processor 201 runs the software programs and modules stored in the memory 203 to execute various A functional application and data processing, that is, to implement the above-mentioned exception handling method. The memory 203 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 203 may further include a memory that is remotely located relative to the processor 201, and these remote memories may be connected to the terminal through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

上述的传输装置205用于经由一个网络接收或者发送数据,还可以用于处理器与存储器之间的数据传输。上述的网络具体实例可包括有线网络及无线网络。在一个实例中,传输装置205包括一个网络适配器(Network Interface Controller,NIC),其可通过网线与其他网络设备与路由器相连从而可与互联网或局域网进行通讯。在一个实例中,传输装置205为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。The above-mentioned transmission device 205 is used for receiving or sending data via a network, and may also be used for data transmission between the processor and the memory. The specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 205 includes a network interface controller (NIC), which can be connected with other network devices and a router through a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 205 is a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet in a wireless manner.

其中,具体地,存储器203用于存储应用程序。Wherein, specifically, the memory 203 is used to store application programs.

处理器201可以通过传输装置205调用存储器203存储的应用程序,以执行下述步骤:The processor 201 can call the application program stored in the memory 203 through the transmission device 205 to perform the following steps:

步骤S202,目标中位机获取上位机的第一工作状态信息,其中,电池监控系统包括上位机以及至少一个中位机,在电池监控系统正常运行的情况下,上位机与至少一个中位机通讯连接,目标中位机是至少一个中位机中的任一个中位机;Step S202, the target central computer obtains the first working status information of the upper computer, wherein the battery monitoring system includes the upper computer and at least one central computer, and when the battery monitoring system is in normal operation, the upper computer and the at least one central computer Communication connection, the target central computer is any one of at least one central computer;

步骤S204,目标中位机在根据第一工作状态信息确定上位机出现异常的情况下,将目标下位机采集的目标电池数据集保存至目标中位机上的目标存储区域中,其中,电池监控系统还包括多个下位机,目标下位机是多个下位机中与目标中位机通讯连接的下位机,目标电池数据集包括目标下位机在一个数据采集周期中采集的所有电池数据;Step S204, when the target central computer determines that the upper computer is abnormal according to the first working status information, it saves the target battery data set collected by the target lower computer to the target storage area on the target central computer, wherein the battery monitoring system It also includes a plurality of lower computers, the target lower computer is a lower computer connected to the target middle computer in communication among the plurality of lower computers, and the target battery data set includes all battery data collected by the target lower computer in one data collection cycle;

步骤S206,目标中位机在根据获取的上位机的第二工作状态信息确定上位机从异常中恢复后,在目标存储区域中确定出未发送至上位机的所有待发送电池数据集,并将所有待发送电池数据集发送至上位机,其中,所有待发送电池数据集中包括目标电池数据集。Step S206, after the target central computer determines that the upper computer recovers from the abnormality according to the acquired second working state information of the upper computer, it determines all the battery data sets to be sent that have not been sent to the upper computer in the target storage area, and sends All the battery data sets to be sent are sent to the host computer, wherein all the battery data sets to be sent include the target battery data set.

采用本申请实施例,提供了一种异常处理的方案。通过在电池监测系统的上位机和下位机之间设置中位机,利用中位机对大量电池数据进行保存和转发,构建出了一个分布式数据传输网络,实现了电池数据的分布式存储,即使上位机出现异常,下位机也能继续工作,并通过中位机存储上位机异常期间的数据,电池数据不会丢失,待上位机恢复后再进行转发,提高了电池监测系统的监测能力,进而解决了相关技术中电池监测系统的监测能力较差的技术问题。By adopting the embodiment of the present application, a solution for exception handling is provided. By setting up the middle computer between the upper computer and the lower computer of the battery monitoring system, and using the middle computer to save and forward a large amount of battery data, a distributed data transmission network is constructed to realize the distributed storage of battery data. Even if the upper computer is abnormal, the lower computer can continue to work, and the data during the abnormal period of the upper computer will be stored through the middle computer, and the battery data will not be lost. It will be forwarded after the upper computer recovers, which improves the monitoring ability of the battery monitoring system. Furthermore, the technical problem of poor monitoring ability of the battery monitoring system in the related art is solved.

可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments, and details are not repeated in this embodiment.

本领域普通技术人员可以理解,图所示的结构仅为示意,终端可以是智能手机(如Android手机、iOS手机等)、平板电脑、掌上电脑以及移动互联网设备(Mobile InternetDevices,MID)、PAD等终端设备。图3其并不对上述电子设备的结构造成限定。例如,终端还可包括比图3中所示更多或者更少的组件(如网络接口、显示装置等),或者具有与图3所示不同的配置。Those of ordinary skill in the art can understand that the structure shown in the figure is only for illustration, and the terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and a mobile Internet device (Mobile Internet Devices, MID), PAD, etc. Terminal Equipment. FIG. 3 does not limit the structure of the above-mentioned electronic equipment. For example, the terminal may also include more or less components than those shown in FIG. 3 (such as a network interface, a display device, etc.), or have a configuration different from that shown in FIG. 3 .

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令终端设备相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:闪存盘、只读存储器(Read-Only Memory,ROM)、随机存取器(RandomAccess Memory,RAM)、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can be Including: a flash disk, a read-only memory (Read-Only Memory, ROM), a random access device (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.

本申请的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以用于执行异常处理方法的程序代码。The embodiment of the present application also provides a storage medium. Optionally, in this embodiment, the above-mentioned storage medium may be used to execute the program code of the exception handling method.

可选地,在本实施例中,上述存储介质可以位于上述实施例所示的网络中的多个网络设备中的至少一个网络设备上。Optionally, in this embodiment, the foregoing storage medium may be located on at least one network device among the plurality of network devices in the network shown in the foregoing embodiments.

可选地,在本实施例中,存储介质被设置为存储用于执行以下步骤的程序代码:Optionally, in this embodiment, the storage medium is configured to store program codes for performing the following steps:

步骤S202,目标中位机获取上位机的第一工作状态信息,其中,电池监控系统包括上位机以及至少一个中位机,在电池监控系统正常运行的情况下,上位机与至少一个中位机通讯连接,目标中位机是至少一个中位机中的任一个中位机;Step S202, the target central computer obtains the first working status information of the upper computer, wherein the battery monitoring system includes the upper computer and at least one central computer, and when the battery monitoring system is in normal operation, the upper computer and the at least one central computer Communication connection, the target central computer is any one of at least one central computer;

步骤S204,目标中位机在根据第一工作状态信息确定上位机出现异常的情况下,将目标下位机采集的目标电池数据集保存至目标中位机上的目标存储区域中,其中,电池监控系统还包括多个下位机,目标下位机是多个下位机中与目标中位机通讯连接的下位机,目标电池数据集包括目标下位机在一个数据采集周期中采集的所有电池数据;Step S204, when the target central computer determines that the upper computer is abnormal according to the first working status information, it saves the target battery data set collected by the target lower computer to the target storage area on the target central computer, wherein the battery monitoring system It also includes a plurality of lower computers, the target lower computer is a lower computer connected to the target middle computer in communication among the plurality of lower computers, and the target battery data set includes all battery data collected by the target lower computer in one data collection cycle;

步骤S206,目标中位机在根据获取的上位机的第二工作状态信息确定上位机从异常中恢复后,在目标存储区域中确定出未发送至上位机的所有待发送电池数据集,并将所有待发送电池数据集发送至上位机,其中,所有待发送电池数据集中包括目标电池数据集。Step S206, after the target central computer determines that the upper computer recovers from the abnormality according to the acquired second working state information of the upper computer, it determines all the battery data sets to be sent that have not been sent to the upper computer in the target storage area, and sends All the battery data sets to be sent are sent to the host computer, wherein all the battery data sets to be sent include the target battery data set.

可选地,存储介质还被设置为存储用于执行以下步骤的程序代码:Optionally, the storage medium is also configured to store program codes for performing the following steps:

步骤S202,目标中位机获取上位机的第一工作状态信息,其中,电池监控系统包括上位机以及至少一个中位机,在电池监控系统正常运行的情况下,上位机与至少一个中位机通讯连接,目标中位机是至少一个中位机中的任一个中位机;Step S202, the target central computer acquires the first working status information of the upper computer, wherein the battery monitoring system includes the upper computer and at least one central computer, and when the battery monitoring system is in normal operation, the upper computer and the at least one central computer Communication connection, the target central computer is any one of at least one central computer;

步骤S204,目标中位机在根据第一工作状态信息确定上位机出现异常的情况下,将目标下位机采集的目标电池数据集保存至目标中位机上的目标存储区域中,其中,电池监控系统还包括多个下位机,目标下位机是多个下位机中与目标中位机通讯连接的下位机,目标电池数据集包括目标下位机在一个数据采集周期中采集的所有电池数据;Step S204, when the target central computer determines that the upper computer is abnormal according to the first working status information, it saves the target battery data set collected by the target lower computer to the target storage area on the target central computer, wherein the battery monitoring system It also includes a plurality of lower computers, the target lower computer is a lower computer connected to the target middle computer in communication among the plurality of lower computers, and the target battery data set includes all battery data collected by the target lower computer in one data collection cycle;

步骤S206,目标中位机在根据获取的上位机的第二工作状态信息确定上位机从异常中恢复后,在目标存储区域中确定出未发送至上位机的所有待发送电池数据集,并将所有待发送电池数据集发送至上位机,其中,所有待发送电池数据集中包括目标电池数据集。Step S206, after the target central computer determines that the upper computer recovers from the abnormality according to the acquired second working state information of the upper computer, it determines all the battery data sets to be sent that have not been sent to the upper computer in the target storage area, and sends All the battery data sets to be sent are sent to the host computer, wherein all the battery data sets to be sent include the target battery data set.

可选地,本实施例中的具体示例可以参考上述实施例中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments, and details are not repeated in this embodiment.

可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the above-mentioned storage medium may include but not limited to: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk Various media that can store program codes such as discs or optical discs.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present application are for description only, and do not represent the advantages and disadvantages of the embodiments.

上述实施例中的集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在上述计算机可读取的存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在存储介质中,包括若干指令用以使得一台或多台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。If the integrated units in the above embodiments are realized in the form of software function units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium. Several instructions are included to make one or more computer devices (which may be personal computers, servers or network devices, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.

在本申请的上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments of the present application, the descriptions of each embodiment have their own emphases, and for parts not described in detail in a certain embodiment, reference may be made to relevant descriptions of other embodiments.

在本申请所提供的几个实施例中,应该理解到,所揭露的客户端,可通过其它的方式实现。其中,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,单元或模块的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Wherein, the device embodiments described above are only illustrative, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of units or modules may be in electrical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

以上所述仅是本申请的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above description is only the preferred embodiment of the present application. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present application, some improvements and modifications can also be made. These improvements and modifications are also It should be regarded as the protection scope of this application.

Claims (10)

1. An exception handling method applied to a battery monitoring system includes:
the method comprises the steps that a target intermediate computer obtains first working state information of the upper computer, wherein the battery monitoring system comprises the upper computer and at least one intermediate computer, the upper computer is in communication connection with the at least one intermediate computer under the condition that the battery monitoring system normally operates, and the target intermediate computer is any one of the at least one intermediate computer;
the target middle computer stores a target battery data set acquired by a target lower computer into a target storage area on the target middle computer under the condition that the upper computer is determined to be abnormal according to the first working state information, wherein the battery monitoring system further comprises a plurality of lower computers, the target lower computer is a lower computer in communication connection with the target middle computer among the plurality of lower computers, and the target battery data set comprises all battery data acquired by the target lower computer in one data acquisition period;
and after the target central computer determines that the upper computer recovers from the abnormality according to the acquired second working state information of the upper computer, determining all battery data sets to be sent which are not sent to the upper computer in the target storage area, and sending all the battery data sets to be sent to the upper computer, wherein all the battery data sets to be sent comprise the target battery data set.
2. The method according to claim 1, wherein the target central computer determines all the battery data sets to be sent which are not sent to the upper computer in the target storage area, and sends all the battery data sets to be sent to the upper computer, and the method comprises the following steps of executing in a circulating manner until any one of the battery data sets to be sent is not included in the target storage area:
the target central computer determines all battery data sets to be sent which are not sent to the upper computer in the target storage area;
the target central computer determines a specified battery data set in all the battery data sets to be sent according to the acquisition time corresponding to each battery data set to be sent, wherein the acquisition time corresponding to the specified battery data set is earlier than the acquisition time corresponding to other battery data sets to be sent except the specified battery data set in all the battery data sets to be sent;
the target middle computer sends the specified battery data set to the upper computer, and the specified battery data set is deleted from the target storage area; and under the condition of receiving a new battery data set sent by the target lower computer, saving the new battery data set serving as the battery data set to be sent to the target storage area.
3. The method according to claim 2, wherein the target intermediate computer stores the target battery data set collected by the target lower computer into a target storage area on the target intermediate computer under the condition that the upper computer is determined to be abnormal according to the working state information, and the method comprises the following steps:
the target lower computer sends an acquisition instruction to the target lower computer according to a preset period;
the target lower computer responds to the acquisition instruction under the condition of receiving the acquisition instruction and transmits the target battery data set acquired by the target lower computer to the target lower computer;
and the target intermediate computer stores the target battery data set into a target storage area on the target intermediate computer.
4. The method of claim 3, wherein the target mid-computer determines all battery data sets to be sent in the target storage area that are not sent to the upper computer, including:
the upper computer sends an acquisition instruction to the target middle computer according to a target period, wherein the target period is shorter than the preset period;
and under the condition that the target central computer receives the acquisition instruction, responding to the acquisition instruction, and determining all battery data sets to be sent which are not sent to the upper computer in the target storage area.
5. The method according to claim 1, wherein the target central computer determines all the to-be-sent battery data sets which are not sent to the upper computer in the target storage area, and sends all the to-be-sent battery data sets to the upper computer, and the method comprises the following steps:
the target central computer determines a first battery data set in the target storage area and generates first periodic change information under the condition that the target central computer responds to an acquisition instruction sent by the upper computer and determines that the number of the battery data sets to be sent in the target storage area is greater than or equal to a preset number, and sends the first battery data set and the first periodic change information to the upper computer, wherein the first periodic change information is used for indicating the upper computer to send the acquisition instruction to the target central computer according to the first period;
the target central computer determines a second battery data set in the target storage area and generates second period change information under the condition that the target central computer responds to an acquisition instruction sent by the upper computer and determines that the number of the battery data sets to be sent in the target storage area is smaller than the preset number, and sends the second battery data set and the second period change information to the upper computer, wherein the second period change information is used for indicating the upper computer to send the acquisition instruction to the target central computer according to the second period, and the first period is shorter than the second period.
6. The method of claim 1, further comprising:
the target lower computer monitors a target battery to obtain target battery data of the target battery, wherein the target battery is a battery connected with the target lower computer;
under the condition that the target lower computer determines that the specified battery in all the target batteries has specified abnormity through the target battery data, processing the specified battery according to a specified processing strategy corresponding to the specified abnormity, and recording the abnormity information of the specified battery;
and under the condition that the target lower computer receives a collection instruction sent by the target middle computer, responding to the collection instruction, and transmitting current battery data corresponding to all the target batteries and the abnormal information to the target middle computer, wherein the current battery data are battery data obtained by monitoring the target batteries when the target lower computer receives the collection instruction.
7. The method according to claim 6, wherein when the target lower computer determines that a specified battery in all the target batteries has a specified abnormality according to the target battery data, the target lower computer processes the specified battery according to a specified processing policy corresponding to the specified abnormality and records abnormality information of the specified battery, and the method comprises:
when the target lower computer detects that the charging current of the specified battery is larger than an upper limit current protection value, determining that the specified battery has abnormal charging current, stopping charging the specified battery by the target lower computer, and recording abnormal information of the specified battery as abnormal charging current;
when the target lower computer detects that the discharge current of the specified battery is smaller than a lower-limit current protection value, determining that the discharge current of the specified battery is abnormal, stopping discharging the specified battery by the target lower computer, and recording abnormal information of the specified battery as abnormal discharge current;
when the target lower computer detects that the battery voltage of the specified battery is greater than the battery overvoltage protection value or less than the battery undervoltage protection value, determining that the specified battery has abnormal voltage, stopping charging or discharging the specified battery by the target lower computer, and recording abnormal information of the specified battery as abnormal voltage;
when the target lower computer detects that the positive electrode and the negative electrode of the designated battery are reversely connected, the specified battery is determined to be abnormally reversely connected, the target lower computer stops charging or discharging the designated battery, and abnormal information of the designated battery is recorded as abnormal reverse connection.
8. A battery monitoring system, comprising: the system comprises an upper computer, at least one middle computer and a plurality of lower computers;
the target intermediate computer is used for acquiring first working state information of the upper computer, wherein the upper computer is in communication connection with the at least one intermediate computer under the condition that the battery monitoring system operates normally, and the target intermediate computer is any one of the at least one intermediate computer;
the target middle computer is further used for storing a target battery data set acquired by a target lower computer into a target storage area on the target middle computer under the condition that the upper computer is determined to be abnormal according to the first working state information, wherein the target lower computer is a lower computer in the plurality of lower computers and is in communication connection with the target middle computer, and the target battery data set comprises all battery data acquired by the target lower computer in one data acquisition period;
the target central computer is further configured to determine all battery data sets to be sent which are not sent to the upper computer in the target storage area after the upper computer is determined to recover from an abnormality according to the acquired second working state information of the upper computer, and send all the battery data sets to be sent to the upper computer, wherein all the battery data sets to be sent include the target battery data set.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the steps of the exception handling method of any one of the preceding claims 1 to 7 by means of the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the exception handling method according to any one of claims 1 to 7.
CN202211035805.0A 2022-08-26 2022-08-26 Battery monitoring system and its exception handling method, electronic equipment, storage medium Pending CN115494405A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211035805.0A CN115494405A (en) 2022-08-26 2022-08-26 Battery monitoring system and its exception handling method, electronic equipment, storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211035805.0A CN115494405A (en) 2022-08-26 2022-08-26 Battery monitoring system and its exception handling method, electronic equipment, storage medium

Publications (1)

Publication Number Publication Date
CN115494405A true CN115494405A (en) 2022-12-20

Family

ID=84465942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211035805.0A Pending CN115494405A (en) 2022-08-26 2022-08-26 Battery monitoring system and its exception handling method, electronic equipment, storage medium

Country Status (1)

Country Link
CN (1) CN115494405A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117156319A (en) * 2023-11-01 2023-12-01 常州拜特测控技术有限公司 Test data transmission method, system, intelligent terminal and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110703655A (en) * 2019-10-25 2020-01-17 广东维可特科技有限公司 Battery formation grading equipment bit control system and grading equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110703655A (en) * 2019-10-25 2020-01-17 广东维可特科技有限公司 Battery formation grading equipment bit control system and grading equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
曹朝煜: "锂电池化成检测设备的研制", 《中国优秀硕士学位论文全文数据库工程科技II辑》, no. 1, 15 January 2021 (2021-01-15), pages 8 - 12 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117156319A (en) * 2023-11-01 2023-12-01 常州拜特测控技术有限公司 Test data transmission method, system, intelligent terminal and storage medium
CN117156319B (en) * 2023-11-01 2024-02-09 常州拜特测控技术有限公司 Test data transmission method, system, intelligent terminal and storage medium

Similar Documents

Publication Publication Date Title
CN102404093A (en) Data transmission mode management method and data transmission device
CN104717236A (en) Equipment performance test method and device
CN104796464A (en) A remote transmission system and method for multi-protocol conversion police information based on MODBUS
CN103795580A (en) Data monitoring method, system and related equipment
CN104270609A (en) Method, system and device for remote monitoring
CN108933798A (en) Date storage method, storage server and system
CN108490358A (en) Battery remote monitoring system and method
CN106100939B (en) The network equipment starts time test method and test console
CN110445683B (en) Server, equipment, method and system for monitoring survival state of server
US11930292B2 (en) Device state monitoring method and apparatus
CN102769533A (en) Data processing method and data processing device
CN115494405A (en) Battery monitoring system and its exception handling method, electronic equipment, storage medium
CN101227324A (en) Method for collecting fault information of communication equipment, communication equipment and system
CN106301961A (en) Data communication companion and intelligent switch method thereof towards battery management system
CN103297298A (en) Network storm real-time rapid detecting method used for intelligent substation
CN117041305B (en) Offline data management method, device and medium for gas flowmeter based on Internet of things
CN202837966U (en) Information prompting system for safety instrument storehouse
CN116389584B (en) Cloud edge data transmission method for electrochemical energy storage station
CN115883466B (en) Switch control method and device, storage medium and electronic device
CN111786899A (en) Internet of things communication method and related equipment
CN113810250B (en) Message tracking method, system and equipment
CN107621991B (en) Data processing method and device
CN113965447B (en) Online cloud diagnosis method, device, system, equipment and storage medium
CN206149293U (en) Data Communication Companion for Battery Management Systems
CN112073472B (en) Soft zero clearing processing method for counter

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