Summary of the invention
One to be solved of the embodiment of the present invention technical problem is that: provides a kind of battery management method, system and device,
To solve management method not science present in prior art, management program oversimplification or complexity, the efficiency of management is low, it is impossible to
The problem carrying out life-cycle management.
An aspect according to embodiments of the present invention, it is provided that a kind of battery management method, including:
Battery MCU records battery information, and described battery information includes: the record type of battery, battery bag total voltage, battery export
Electric current, battery bag temperature, MOS temperature, battery status, single-unit battery core voltage;
According to the agreement flow process of battery management ICP/IP protocol, battery information is uploaded onto the server;
The serial number using battery checks the information record storing this battery by server;
By the battery information electrolytic cell whole use cycle of storage, check whether battery occurs that battery is bad during using
Situation.
In another embodiment based on the above-mentioned battery management method of the present invention, the association of described battery management ICP/IP protocol
View flow process includes:
Battery MCU idle pulley, battery identity certification mode, reading battery information pattern, uploads of battery information pattern and mistake
Pattern;
The circular flow under these 5 kinds of patterns of battery management ICP/IP protocol, runs respective program under different patterns, both it
Between do not result in conflict.
In another embodiment based on the above-mentioned battery management method of the present invention, described according to battery management ICP/IP protocol
Agreement flow process, battery information is uploaded onto the server and includes:
Battery MCU is connected with server foundation by SIM800C module;
Battery MCU returns battery identity authentication information to server request uploads of battery information data, server to battery MCU;
Battery MCU, by the encryption to battery identity authentication information, is re-transmitted to server after coding;
Encryption data is decrypted by server, and the comparison backward battery MCU of success returns storage vernier, and battery MCU is by storage
Vernier contrasts with the record number of times of battery;
If battery information record strip number enough reads, battery MCU reads battery record information automatically, will within the time set
The battery information packing read, uploads onto the server after coding, and then battery MCU disconnects the connection with server automatically, anti-
Only battery MCU takies server for a long time;
If not completing to upload by battery information within the time of regulation, server forces to disconnect the connection of battery MCU.
In another embodiment based on the above-mentioned battery management method of the present invention, the described battery information by storage is understood
In the battery whole use cycle, check whether battery occurs that battery unfavorable condition includes during using:
Battery MCU reads the battery information of internal TEA encryption, record number of times, record vernier and secret cipher key code, data is packed
After, use Base64 coding, uploaded onto the server by ICP/IP protocol;
Server reception battery MCU uploads data, is decoded by Base64, and TEA deciphers, and the key of described TEA deciphering is deposited
In the cipher key store of server, the deciphering of battery information needs to use the key in server key storehouse, and uses in cipher key store
Key select by uploads of battery information secret cipher key code determine;
Being stored in server after battery information deciphering, server stores the information of each battery;
The service condition of each battery of monitoring server, the battery information uploaded by battery MCU is analyzed battery operation state and is
No normally.
In another embodiment based on the above-mentioned battery management method of the present invention, described battery MCU idle pulley includes:
Battery MCU waits the time tag set of uploads of battery information, and the time interval of described time tag set is by battery MCU
Arrange;
When uploads of battery information time arrives, uploads of battery Information sign set, system mode switches to battery identity certification
Pattern
In another embodiment based on the above-mentioned battery management method of the present invention, described battery identity certification mode includes:
Battery MCU reads battery record number of times, record vernier and secret cipher key code;
Battery MCU sets up TCP/IP with server and is connected, if battery identity certification is not passed through, server is forced to disconnect battery
MCU connects, and battery MCU system switches to error pattern;
After successful connection, server will be to initiating battery identity certification request to battery MCU, and described ID authentication request is service
Device sends the authentication information of 16 system randoms number of 8 bytes to battery MCU;
The authentication information being received 8 bytes is encrypted by battery MCU with TEA, encodes with BASE64, according to the number after coding
Carry out data packing according to, the sequence of battery record number of times, battery serial number, and data after packing are sent to server;
The packet that battery MCU is sent by server resolves, and described server is to 8 bytes in the packet after resolving
16 system randoms number compared with 8 byte 16 system randoms number that original server sends, it may be judged whether consistent;
If consistent, illustrate that battery identity certification is passed through, now, if to return this battery to battery MCU currently stored for server
Vernier, then battery MCU enters and reads battery information pattern, and otherwise battery MCU needs the record of re-request this battery of server to swim
Mark, still failed after battery MCU asks 3 storage verniers continuously, battery disconnects server and connects, and system switches to mistake mould
Formula;
If inconsistent, battery identity certification is not passed through, and server is forced to disconnect battery MCU and connected, and system switches to mistake mould
Formula.
In another embodiment based on the above-mentioned battery management method of the present invention, described reading battery information pattern includes:
Present battery is stored vernier compared with battery record frequency threshold value by battery MCU, if present battery storage vernier value is little
In battery record frequency threshold value, battery MCU performs to read battery information program;
The battery information of battery FLASH memory element, according to battery communications protocol, is read out by battery MCU, battery information
Reading and carry out in reading time threshold, if reading battery time-out, battery MCU switches to error pattern;
Battery MCU by the secret cipher key code of server, update after record vernier and battery information combination packing, and will packing after
Information carries out Base64 coding;
Battery MCU prepares the battery information after uploading coding, and battery MCU switches to uploads of battery information pattern.
In another embodiment based on the above-mentioned battery management method of the present invention, described battery record frequency threshold value is battery
Record number of times deducts 16.
In another embodiment based on the above-mentioned battery management method of the present invention, described reading time threshold is 2 seconds.
In another embodiment based on the above-mentioned battery management method of the present invention, described uploads of battery information pattern includes:
The connection duration threshold value of battery MCU Connection Service device is set;
Judge whether the connection duration of battery MCU Connection Service device exceedes connection duration threshold value;
If it is, server forces to disconnect the connection of battery MCU;
If it does not, judge that battery MCU prepares whether the battery information after uploading coding completes within connecting duration threshold value;
Connecting if it is, battery actively and automatically disconnects server, battery MCU switches to battery MCU idle pulley;
Connecting if it does not, server forces to disconnect battery MCU, battery MCU switches to error pattern.
In another embodiment based on the above-mentioned battery management method of the present invention, described connection duration threshold value is 20 seconds.
In another embodiment based on the above-mentioned battery management method of the present invention, described error pattern includes:
Battery MCU handles it according to the information of system mistake, removes error message;
System enters battery MCU idle pulley, waits that information time flag set uploaded by battery.
Another aspect according to embodiments of the present invention, it is provided that a kind of battery management system, including battery client and
Server;
Described battery client includes battery MCU, for automatically recording battery information, and battery information is uploaded to battery service
Device, and according to server send instruction and battery information upload state, perform corresponding pattern;
Described server is used for storage batteries information, is authenticated battery identity, the battery information to battery client upload
Data resolve, and are read out battery information.
In another embodiment based on the above-mentioned battery management system of the present invention, described automatic record battery information includes:
The record type of battery, battery bag total voltage, cell output current, battery bag temperature, MOS temperature, battery status, single-unit battery core
Voltage.
In another embodiment based on the above-mentioned battery management system of the present invention, the duty of described battery MCU includes 5
The pattern of kind: battery MCU idle pulley, battery identity certification mode, reading battery information pattern, uploads of battery information pattern and mistake
Pattern by mistake;
After battery MCU electrification reset initializes, battery MCU enters battery MCU idle pulley;
Battery MCU waits the time tag set of uploads of battery information, when the time tag set receiving uploads of battery information
After, battery MCU enters battery identity certification mode;
In battery identity certification mode, server sends 8 byte random number authentication information and receives at random to battery MCU, battery MCU
Based on 8 byte randoms number, information is carried out with server mutual, it is judged that after battery identity certification is passed through, battery MCU after number
Enter and read battery information pattern;
Reading battery information pattern, server judges whether the information of battery storage meets and reads bar number, if the letter of battery
Breath bar number meets reading, and battery MCU will read battery information by UART mode, and battery MCU enters uploads of battery information pattern;
In uploads of battery information pattern, battery information is uploaded onto the server in the time threshold set by battery MCU, server
Disconnect the connection between MCU, complete uploading of battery information;
Described error pattern is under each pattern, if it occur that wrong or overtime, battery MCU is directly entered error pattern,
Battery MCU removes wrong data, returns to battery MCU idle pulley.
Another aspect according to embodiments of the present invention, it is provided that a kind of cell managing device, including battery-end, voltage stabilizing electricity
Road unit, MCU control unit, UART communication interface protected location, SIM800C module, LED unit and server;
Described battery-end includes: battery protecting plate, battery core and shell;
Described mu balanced circuit unit provides galvanic current pressure and electric current for device;
Described MCU control unit is used for arranging uploads of battery information time, reads battery by UART communication interface protected location
Information, packs, encodes battery information, is uploaded onto the server by the battery information after coding by SIM800C module;
Described battery-end is connected with MCU control unit by UART communication interface protected location, and connecting interface is that asynchronous serial connects
Mouthful, described MCU control unit is connected with SIM800C module by Asynchronous Serial Interface, and SIM800C module is by wired or wireless
Mode is connected with server, and described mu balanced circuit unit electrically connects with battery-end, MCU control unit, SIM800C module, described
LED unit and the electrical connection of SIM800C module.
In another embodiment based on the above-mentioned cell managing device of the present invention, described MCU control unit use chip is
EFM32ZG210F32 chip, described chip reads battery information by UART mode, is built with server by SIM800C module
Vertical connection, receives server data by SIM800C module and sends data to server, to battery information packing, carries out
BASE64 encodes, and is encrypted server authentication information and BASE64 coding.
Compared with prior art, the present invention includes advantages below:
The battery management method of the present invention, system and device record battery information automatically by battery MCU, and when arranging fixing
Between be spaced battery information uploaded onto the server, server storage battery information, use battery serial number, the battery size etc. can be square
Just the information searching this battery, thus in the electrolytic cell whole use cycle whether battery unfavorable condition or other feelings occur
Condition, the battery MCU idle pulley of battery MCU, battery identity certification mode, reading battery information pattern, uploads of battery information mould
Formula and error pattern, make the battery management more science, efficiently of the present invention, and program more simplifies.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only
It is a part of embodiment of the present invention rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people
The every other embodiment that member is obtained under not making creative work premise, broadly falls into the scope of protection of the invention.
A kind of battery management method, system and the device that there is provided the present invention with embodiment below in conjunction with the accompanying drawings carry out more detailed
Carefully illustrate.
Fig. 1 is the flow chart of an embodiment of the battery management method of the present invention, as it is shown in figure 1, the electricity of this embodiment
Pond management method includes:
10, battery MCU record battery information, and described battery information includes: the record type of battery, battery bag total voltage, battery
Output electric current, battery bag temperature, MOS temperature, battery status, single-unit battery core voltage, battery MCU will in the time interval set
Battery information uploads onto the server preservation;
11, according to the agreement flow process of battery management ICP/IP protocol, battery information is uploaded onto the server;
12, use the serial number of battery to be checked the information record storing this battery by server;
13, by battery information electrolytic cell whole use cycle of storage, check whether battery battery occurs during using
Unfavorable condition.
Fig. 2 is the flow chart of another embodiment of the battery management method of the present invention, as in figure 2 it is shown, described cell tube
The agreement flow process of reason ICP/IP protocol includes:
Battery MCU idle pulley, battery identity certification mode, reading battery information pattern, uploads of battery information pattern and mistake
Pattern;
The circular flow under these 5 kinds of patterns of battery management ICP/IP protocol, runs respective program under different patterns, both it
Between do not result in conflict;
When battery MCU runs failed in one of the states, jumping directly to error pattern, battery MCU is clear under error pattern
After relevant error information, again jump to battery MCU idle pulley, carry out the next detection cycle;
After powering on, battery MCU reset initialization processes, the state that whole system is the operation of interval detecting system with 10ms, in order to
In different states switch, 5 kinds of patterns of battery MCU relative to be 5 state machines, system is not stopped in these 5 kinds of states
Operation, different states is run respective program.
Fig. 3 is the flow chart of the further embodiment of the battery management method of the present invention, as it is shown on figure 3, described according to electricity
The agreement flow process of pond management ICP/IP protocol, uploads onto the server battery information and includes:
110, battery MCU are connected with server foundation by SIM800C module;
111, battery MCU return battery identity certification letter to server request uploads of battery information data, server to battery MCU
Breath;
112, battery MCU, by the encryption to battery identity authentication information, are re-transmitted to server after coding;
113, encryption data is decrypted by server, and the comparison backward battery MCU of success returns storage vernier, and battery MCU passes through
Storage vernier contrasts with the record number of times of battery;
114, if battery information record strip number enough reads, battery MCU reads battery record information automatically, in the time set
The interior battery information packing that will read, uploads onto the server after coding, and then battery MCU disconnects the company with server automatically
Connect, prevent battery MCU from taking server for a long time;
115, if not completing to upload by battery information within the time of regulation, server forces to disconnect the connection of battery MCU.
Fig. 4 is the flow chart of another embodiment of the battery management method of the present invention, as shown in Figure 4, described by depositing
In the battery information electrolytic cell whole use cycle of storage, check whether battery occurs that battery unfavorable condition includes during using:
150, battery MCU read the battery information of internal TEA encryption, record number of times, record vernier and secret cipher key code, data are beaten
Bao Hou, is used Base64 coding, is uploaded onto the server by ICP/IP protocol;
151, server reception battery MCU uploads data, is decoded by Base64, and TEA deciphers, the key of described TEA deciphering
Leaving in the cipher key store of server, the deciphering of battery information needs to use the key in server key storehouse, and uses key
Key in storehouse selects to be determined by the secret cipher key code in uploads of battery information;
152, it is stored in server after battery information deciphering, server stores the information of each battery;
153, the service condition of each battery of monitoring server, the battery information uploaded by battery MCU analyzes battery operation shape
State is the most normal.
Fig. 5 is the flow chart of another embodiment of the battery management method of the present invention, as it is shown in figure 5, described battery MCU
Idle pulley includes:
20, battery MCU wait the time tag set of uploads of battery information, and the time interval of described time tag set is by battery
MCU is arranged;
21, when uploads of battery information time arrives, uploads of battery Information sign set, system mode switches to battery identity to recognize
Card pattern.
Fig. 6 is the flow chart of another embodiment of the battery management method of the present invention, as shown in Figure 6, and described battery body
Part certification mode includes:
30, battery MCU read battery record number of times, record vernier and secret cipher key code;
31, battery MCU set up TCP/IP with server and are connected, if battery identity certification is not passed through, server is forced to disconnect electricity
Pond MCU connects, and battery MCU system switches to error pattern;
32, after successful connection, server will be to initiating battery identity certification request to battery MCU, and described ID authentication request is
Server sends the authentication information of 16 system randoms number of 8 bytes to battery MCU;
The authentication information being received 8 bytes is encrypted by 33, battery MCU with TEA, encodes with BASE64, after coding
Data, battery record number of times, the sequence of battery serial number carry out data packing, and data after packing are sent to server;
34, the packet that battery MCU is sent by server resolves, and described server is to 8 in the packet after resolving
16 system randoms number of byte are compared with 8 byte 16 system randoms number that original server sends, it may be judged whether consistent;
35, if unanimously, illustrate that battery identity certification is passed through, now, currently deposit if server returns this battery to battery MCU
Storage vernier, then battery MCU enters and reads battery information pattern, and otherwise battery MCU needs the record of re-request this battery of server
Vernier, still failed after battery MCU asks 3 storage verniers continuously, battery disconnects server and connects, and system switches to mistake mould
Formula;
36, if inconsistent, battery identity certification is not passed through, and server is forced to disconnect battery MCU and connected, and system switches to mistake
Pattern.
Fig. 7 is the flow chart of another embodiment of the battery management method of the present invention, reads electricity as it is shown in fig. 7, described
Pond information pattern includes:
Present battery is stored vernier compared with battery record frequency threshold value by 40, battery MCU, if present battery storage vernier value
Less than battery record frequency threshold value, battery MCU performs to read battery information program;
The battery information of battery FLASH memory element, according to battery communications protocol, is read out, battery information by 41, battery MCU
Reading carry out reading in time threshold, if reading battery time-out, battery MCU switches to error pattern;
42, battery MCU are by the record vernier after the secret cipher key code of server, renewal and battery information combination packing, and will pack
After information carry out Base64 coding;Wherein, after MCU reads successfully, the record vernier after renewal adds for original record vernier
1;
43, battery MCU prepare the battery information after uploading coding, and battery MCU switches to uploads of battery information pattern.
Wherein, described battery record frequency threshold value is that battery record number of times deducts 16, and described reading time threshold is 2 seconds.
In reading battery information pattern, when battery MCU is read out battery information program, need to avoid 3 kinds of situations, the
One is exactly that inside battery information is cleared, but the battery information that server stores this battery is cleared the most simultaneously, electricity occurs
The record number of times in pond is less than the storage vernier of server, so server has error correcting capability, when receiving the electricity that battery MCU uploads
Pond record number of times less than this battery storage vernier of server time, repeat this operation 3 times after server again open up a piece of newly
Memory headroom storage battery information;It is limited that the second stores the FLASH memory space of battery, when FALSH is filled with
After, storing the oldest battery information to be wiped free of, store new battery information the most again, and now battery MCU skips and is wiped free of
Battery information, reads newer battery information;The third is that storage vernier is more than battery record frequency threshold value and less than battery note
Record number of times, now battery MCU continues waiting for, and waits that enough 16 battery informations read battery information again.
Fig. 8 is the flow chart of another embodiment of the battery management method of the present invention, as shown in Figure 8, described on conduct electricity
Pond information pattern includes:
50, the connection duration threshold value of battery MCU Connection Service device is set;
51, it is judged that whether the connection duration of battery MCU Connection Service device exceedes connection duration threshold value;
52, if it is, server forces to disconnect the connection of battery MCU;
53, if it does not, judge that battery MCU prepares whether the battery information after uploading coding completes within connecting duration threshold value;
54, connect if it is, battery actively and automatically disconnects server, battery MCU switches to battery MCU idle pulley;
55, connect if it does not, server forces to disconnect battery MCU, battery MCU switches to error pattern.
Wherein, described connection duration threshold value is 20 seconds.
Fig. 9 is the flow chart of another embodiment of the battery management method of the present invention, as it is shown in figure 9, described mistake mould
Formula includes:
60, battery MCU handles it according to the information of system mistake, removes error message;
61, system enters battery MCU idle pulley, waits that information time flag set uploaded by battery.
Battery MCU in error pattern, mainly in treatment of battery MCU running occur error message, such as one
The error message that when being Identity Authentication Mode, authentication unsuccessfully produces, two is that when reading battery information pattern, information bar number is inadequate
Article 16, it is impossible to reading the error message produced or read the error message that battery information time-out produces, three is to conduct electricity on MCU
Timeout error message occur during the information of pond, now battery information not yet uploads successfully produced error message, these cause be
System enters error pattern, and in error pattern, the information according to system mistake makes corresponding process.
Another aspect according to embodiments of the present invention, it is provided that a kind of battery management system, Figure 10 is the electricity of the present invention
The structural representation of one embodiment of pond management system, as shown in Figure 10, described battery management system includes: battery client
1 and server 2;
Described battery client 1 includes battery MCU, for automatically recording battery information, and battery information is uploaded to battery clothes
Business device 2, and according to server 2 send instruction and battery information upload state, perform corresponding pattern;
Battery identity, for storage batteries information, is authenticated by described server 2, the battery letter uploading battery client 1
Breath data resolve, and are read out battery information.
Wherein, described automatic record battery information includes: the record type of battery, battery bag total voltage, battery output electricity
Stream, battery bag temperature, MOS temperature, battery status, single-unit battery core voltage.
The duty of described battery MCU includes 5 kinds of patterns: battery MCU idle pulley, battery identity certification mode, reading
Power taking pond information pattern, uploads of battery information pattern and error pattern;
After battery MCU electrification reset initializes, battery MCU enters battery MCU idle pulley;
Battery MCU waits the time tag set of uploads of battery information, when the time tag set receiving uploads of battery information
After, battery MCU enters battery identity certification mode;
In battery identity certification mode, server 2 send 8 byte random number authentication information to battery MCU, battery MCU receive with
Based on 8 byte randoms number, information is carried out with server 2 mutual, it is judged that after battery identity certification is passed through, battery after machine number
MCU enters and reads battery information pattern;
Reading battery information pattern, server 2 judges whether the information of battery storage meets and reads bar number, if the letter of battery
Breath bar number meets reading, and battery MCU will read battery information by UART mode, and battery MCU enters uploads of battery information pattern;
In uploads of battery information pattern, battery information is uploaded onto the server 2 in the time threshold set by battery MCU, service
Device 2 disconnects the connection between MCU, completes uploading of battery information;
Described error pattern is under each pattern, if it occur that wrong or overtime, battery MCU is directly entered error pattern,
Battery MCU removes wrong data, returns to battery MCU idle pulley.
Another aspect according to embodiments of the present invention, it is provided that a kind of cell managing device, Figure 11 is the electricity of the present invention
The structural representation of one embodiment of pond managing device, as shown in figure 11, described cell managing device includes: battery-end 81,
Mu balanced circuit unit 82, MCU control unit 83, UART communication interface protected location 84, SIM800C module 85, LED unit 86 and
Server 87;
Described battery-end 81 includes: battery protecting plate, battery core and shell;
Described mu balanced circuit unit 82 provides galvanic current pressure and electric current for device;
Described MCU control unit 83 is used for arranging uploads of battery information time, is read by UART communication interface protected location 84
Battery information, packs, encodes battery information, by SIM800C module 85, the battery information after coding is uploaded onto the server 87;
Described battery-end 81 is connected with MCU control unit 83 by UART communication interface protected location 84, and it is asynchronous for connecting interface
Serial line interface, described MCU control unit 83 is connected with SIM800C module 85 by Asynchronous Serial Interface, SIM800CC module 85
Be connected with server 87 by wired or wireless mode, described mu balanced circuit unit 82 and battery-end 81, MCU control unit 83,
SIM800C module 85 electrically connects, and described LED unit 86 and SIM800C module 85 electrically connects.
Described MCU control unit 83 uses chip to be EFM32ZG210F32 chip, and described chip is read by UART mode
Battery information, is connected with server 87 foundation by SIM800C module 85, receives server 87 number by SIM800C module 85
According to send data to server 87, to battery information packing, carry out BASE64 coding, server 87 authentication information is added
Close and BASE64 encodes.
Above a kind of battery management method provided by the present invention, system and device are described in detail, herein
Applying specific case to be set forth principle and the embodiment of the present invention, the explanation of above example is only intended to help
Understand method and the core concept thereof of the present invention;Simultaneously for one of ordinary skill in the art, according to the thought of the present invention,
The most all will change, in sum, this specification content should not be construed as this
The restriction of invention.
Finally it is noted that the foregoing is only the preferred embodiments of the present invention, it is not limited to the present invention,
Although being described in detail the present invention with reference to previous embodiment, for a person skilled in the art, it still may be used
So that the technical scheme described in foregoing embodiments to be modified, or wherein portion of techniques feature is carried out equivalent,
All within the spirit and principles in the present invention, any modification, equivalent substitution and improvement etc. made, should be included in the present invention's
Within protection domain.