Battery management system based on block chain
Technical Field
The invention relates to the field of battery management systems of electric automobiles, in particular to a battery management system based on a block chain.
Background
With the continuous enhancement of environmental protection consciousness of people in modern society and the continuous development of key technologies of electric automobiles, the quantity of electric automobiles kept in the world is continuously increased, and the power battery system serving as a core component of the electric automobiles provides an energy source for the electric automobiles and ensures the safe and reliable operation of the electric automobiles. The capacity and the cycle number of the power battery system are continuously reduced in the normal charging and discharging process of the power battery system, when the actual capacity of the power battery system is reduced to 80% of the initial capacity, the requirement for using the electric automobile cannot be met, the new sufficient power battery system needs to be replaced, and the replaced power battery is called as a retired power battery.
In consideration of environmental protection, although the retired power battery system cannot meet the use requirements of the electric automobile, the retired power battery system can be used as an energy storage system in the field with lower requirements after the steps of sorting, recombining and the like, such as a low-speed electric automobile, power grid energy storage, photovoltaic power generation energy storage and the like, and the echelon utilization of the vehicle-mounted power battery system is realized. The efficiency of the power battery system can be furthest exerted after the batteries after the echelon utilization are disassembled and recycled, the use cost of the power batteries can be reduced, and the benefit maximization target of the power battery system is realized. However, in practical situations, the use state of the power battery is not effectively and safely monitored, and the evaluation of the residual value of the battery and the application of the battery in a gradient mode are difficult. The traditional retired power grading method is an experimental test, that is, each battery cell or module in the retired power battery system is tested independently, the test contents include a capacity test, an internal resistance test and the like, and the tests not only require a large amount of test time, but also waste a large amount of electric energy.
The block chain is a computer technology consisting of a distributed storage technology, a cryptology account book and a consensus algorithm, and has the characteristics of decentralization, openness, autonomy, information non-falsification and the like. The block chain technology can provide a new mode and idea for the gradient utilization of the power battery. The method has the advantages that the echelon utilization of the power battery is realized, the most important point is that the effective management of the battery data is realized, the effective management comprises the authority, the effectiveness and the safety of the battery data, the traceability of the battery data source and the inquiry of the battery data, the requirements are in certain degree indiscriminate with the technical characteristics of a block chain, and the combination of the block chain technology and the echelon utilization of the power battery can improve the echelon utilization efficiency and reduce the intermediate cost. Therefore, the present invention provides a battery management system based on the block chain technology. Compared with the prior art, the invention has the following characteristics
1. The operation data of the power battery system is recorded by adopting a block chain technology, a plurality of nodes in the system can be synchronized in real time, and the query and traceability of the operation state of the power battery system are realized.
2. And the manufacturing and maintenance information of the power battery system is recorded by adopting the blocks, so that the whole life cycle management and the anti-counterfeiting of the power battery system are realized.
3. After the power battery system reaches the retirement standard, the related information of the power battery system can be obtained from the block chain system, the quick evaluation and classification of the battery cells or the modules are realized, and the expenditure of the existing evaluation sorting method on energy and time is reduced.
Disclosure of Invention
The invention aims to solve the problems of lack of effective and safe monitoring of the use state of a power battery, difficult and serious evaluation of battery residual value and gradient application and the like. In order to achieve the purpose, the technical scheme of the invention is as follows: the invention provides a battery management system based on a block chain. The system consists of a block chain network, a file management network, a user network and a CA network, wherein the block chain network consists of one or more types of nodes, the network is mainly responsible for generating blocks, adding the blocks to the block chain, auditing the block chain and opening a read-write interface to the outside, and all data information stored on the block chain can be encrypted for storage or plaintext for storage; the file management network is a peer-to-peer node network based on a distributed hash table and a directed acyclic graph, and the network is mainly responsible for uploading and downloading specific data of the power battery and synchronizing nodes in the network; the user network comprises electric automobiles, electric automobile charging facilities and various types of users, and is mainly responsible for registering related information of the power battery system, importing detailed data of the power battery system, evaluating data of the power battery system and recording state change of the power battery system; the CA network is a digital certificate management center of a battery management system, and the network is mainly responsible for authentication and registration of user and equipment identity information, issuance of digital certificates, and deferral and cancellation of the digital certificates in the system. Each user in the battery management system has an identity certificate belonging to the user, the identity certificate comprises user identity information and user operation authority, and any user cannot perform cross-authority operation. When a new power battery system is generated, a manufacturing department (manufacturer) registers identity information for the new power battery system, the registration content comprises production information and identification information of all battery cores in the new power battery system and a connection mode of the battery cores in the power battery system, and the battery management system generates a unique identity identifier of the power battery system after establishing a Merkle tree structure according to the registration content and stores the unique identity identifier in the power battery system forever. A battery pack-module-battery core structure of a power battery system is expressed in a Merkle tree form by a power battery pack identification method based on a Merkle tree structure, 4 types of nodes are arranged in the tree, and the nodes are respectively a battery pack node, a series node, a parallel node and a battery core node, and each node is provided with an ID and a node type identification. The cell nodes are leaf nodes, and have no child nodes, and the father node can only be a series node or a parallel node; the parallel nodes and the series nodes are provided with at least more than 2 child nodes and a unique father node, the node type determines the connection mode of the child nodes, and the parallel/series nodes represent that the battery cells or modules represented by the child nodes are sequentially connected in parallel/in series according to the arrangement sequence; the battery pack node is a root node of the Merkle tree root, has a child node and can only be one of a series node or a parallel node. All node IDs are generated according to a specified rule in the following mode:
1) the hierarchy of the battery pack nodes in the whole battery tree is 1, and the node type of the child node of the second hierarchy is selected according to the connection mode of the battery modules;
2) the child nodes of the second-level nodes are generated according to the composition of the battery modules; the number of the child nodes is consistent with the number of the battery modules, and the sequence of the child nodes is consistent with the arrangement sequence of the battery modules;
3) if the sub-nodes of the third layer of nodes are not the battery cell nodes, generating fourth layer of nodes by the constituent mode of the sub-nodes;
4) continuing to generate a battery tree downwards according to the step (3) until the end nodes of the tree are all cell nodes and the number of leaf nodes is equal to the number of cells in the battery pack;
5) the node ID of the battery pack tree is generated from bottom to top, and the ID of the battery core node is generated by performing Hash operation on the coded identifier;
6) the calculation formula of each node ID is as follows,
idnode=IDchidren1|IDchidren2|…|IDchidreni|Typeid
IDnode=HASH(idnode)
in the formula, IDchidreniFor the ith child node ID, NodeTypeidIdentify for node type, | is the accumulation operator, idnodeFor the new ID generated after operation, the HASH (-) function is a HASH function, IDnodeAnd identifying the final node ID formed after calculation. Binding the power battery system with the electric automobile after registration is completed; and the trade department in the battery management system is responsible for recording the sales process of the power battery system, including the sales price, the information of sales personnel, the information of purchasing personnel and the information of quality assurance. An individual user in the battery management system can consult the state information and the record information of the power battery system related to the individual user and participate in the data verification process of the power battery system. If the power battery system needs to be overhauled and maintained, the power battery system needs to be conveyed to a maintenance department for safety maintenance, the maintenance department needs to perform maintenance registration after the maintenance is completed, the registration content is recorded in the block chain network, and the registration content comprises maintenance content, maintenance time and information of maintenance personnel. When the power battery system reaches the retirement standard, the power battery system is required to be conveyed to a recovery department, the recovery department registers the retired power battery system, the registration content can be recorded in a block chain network, the recovery department can acquire the current state of the corresponding power battery system from the block chain network according to the unique identification and can perform flow line type audit, experimental testing is avoided, the retired power battery system is rapidly graded and recombined, and the gradient utilization efficiency of the power battery system is improved.
When the power battery system is used to a low-power state, the electric automobile is required to be connected with an electric automobile charging facility for charging, the electric automobile can perform bidirectional energy and information exchange with the electric automobile charging facility in the charging process, namely, the electric automobile charging facility transmits the electric energy to the power battery system, and the power battery system transmits the self operation data to the electric automobile charging facility. After the data transmission is finished, the electric vehicle charging facility randomly connects an available node in the file management network and uploads the acquired data to the file management network after using the identity information of the electric vehicle charging facility to digitally sign, after the data transmission is finished, the file management network feeds back a hash file name of the electric vehicle charging facility, the hash file name is an information abstract of the transmitted data and has uniqueness, then the electric vehicle charging facility triggers a data verification process in the battery management system and starts a timer T, at the moment, the battery management system generates a random number X which is not more than the total number N of users in the system, if X is less than a random threshold value M, the battery management system randomly selects X users to participate in verification and needs to collect the selection of X users, if X is more than the random threshold value M, the battery management system randomly selects X users to participate in verification and needs to collect the selection of at least A (A is less than X), the battery management system can inform the selected user to participate in the verification process and send the hash value of the data and the uniqueness identifier of the power battery system to the participating user, the user can check historical data of the power battery system according to the uniqueness identifier, corresponding data content is obtained from the file management system according to the hash file name, and the user gives a selection result after comparison, matching and verification. If the power battery system is in an abnormal operation state at this stage, the user can quickly inform a manager of the battery management system of the user, so that dangerous accidents are prevented. If the system still does not collect the user selection of the target number when the timer T overflows, the verification process is determined to be invalid, the timer T is reset and the data verification process is started again, if the resetting times of the timer are more than 3, the manager of the battery management system performs data verification, if the timer T does not overflow and the system collects the user selection of the target number, data judgment is performed according to most of user selection results, namely more than two thirds of users consider that the data is valid, otherwise, the data is invalid, if the judgment result is invalid, the data is abandoned, if the judgment result is valid, the battery management system records the hash file name of the data, the current state of the power battery system and the verification process result in the block chain network.
Drawings
FIG. 1 is a block chain-based battery management system block diagram
FIG. 2 is a diagram of generating unique battery pack identifiers based on Merkle tree structure
FIG. 3 is a flow chart of a data validation process
Detailed Description
The invention is further described with reference to the following figures and detailed description: the invention relates to a battery management system based on a block chain, which is characterized in that: the system consists of a block chain network, a file management network, a user network and a CA network, wherein the block chain network consists of one or more types of nodes, the network is mainly responsible for generating blocks, adding the blocks to the block chain, auditing the block chain and opening a read-write interface to the outside, all data information stored on the block chain can be stored in an encrypted mode or a plaintext mode, the file management network is a peer-to-peer node network based on a distributed hash table and a directed acyclic graph, the network is mainly responsible for uploading and downloading detailed data of the power battery and synchronizing nodes in the network, the user network comprises an electric vehicle, an electric vehicle charging facility and multiple types of users, and the network is mainly responsible for registering related information of the power battery system, importing the detailed data of the power battery system, evaluating and recording the data of the power battery system, The evaluation and record of the state change of the power battery system, the CA network is a digital certificate management center of the battery management system, and the network is mainly responsible for the authentication and registration of user and equipment identity information in the system, the issuance of a digital certificate, and the delay and the suspension of the digital certificate; each user in the battery management system has an identity certificate belonging to the user, the identity certificate includes user identity information and user operation authority, and any user cannot perform cross-authority operation, as shown in a block chain technology-based battery management system framework diagram in fig. 1.
When a new power battery system is generated, a manufacturing department (manufacturer) registers identity information for the new power battery system, the registered content comprises production information and identification information of all battery cores in the new power battery system and a connection mode of the battery cores in the power battery system, a battery management system generates a unique identity identifier of the power battery system by using a power battery pack identification method based on a Merkle tree structure according to the registered content and stores the unique identity identifier in the power battery system for the first time, and the power battery system and an electric automobile need to be bound after the registration is completed. The power battery pack identification method based on the Merkle tree structure expresses the battery pack-module-battery core structure of the power battery system in the Merkle tree form, and one expression mode is shown in figure 2. There are 4 types of nodes in the tree, which are respectively a battery pack node, a series node, a parallel node and a battery cell node, and each node has an ID and a node type identifier. The cell nodes are leaf nodes, and have no child nodes, and the father node can only be a series node or a parallel node; the parallel nodes and the series nodes are provided with at least more than 2 child nodes and a unique father node, the node type determines the connection mode of the child nodes, and the parallel/series nodes represent that the battery cells or modules represented by the child nodes are sequentially connected in parallel/in series according to the arrangement sequence; the battery pack node is a root node of the Merkle tree root, has a child node and can only be one of a series node or a parallel node. All node IDs are generated according to a specified rule in the following mode:
1) the hierarchy of the battery pack nodes in the whole battery tree is 1, and the node type of the child node of the second hierarchy is selected according to the connection mode of the battery modules;
2) the child nodes of the second-level nodes are generated according to the composition of the battery modules; the number of the child nodes is consistent with the number of the battery modules, and the sequence of the child nodes is consistent with the arrangement sequence of the battery modules;
3) if the sub-nodes of the third layer of nodes are not the battery cell nodes, generating fourth layer of nodes by the constituent mode of the sub-nodes;
4) continuing to generate a battery tree downwards according to the step (3) until the end nodes of the tree are all cell nodes and the number of leaf nodes is equal to the number of cells in the battery pack;
5) the node ID of the battery pack tree is generated from bottom to top, and the ID of the battery core node is generated by performing Hash operation on the coded identifier;
6) the calculation formula of each node ID is shown in equation (1).
In the formula, IDchidreniFor the ith child node ID, NodeTypeidIdentify for node type, | is the accumulation operator, idnodeFor the new ID generated after operation, the HASH (-) function is a HASH function, IDnodeAnd identifying the final node ID formed after calculation. The power battery pack identification method based on the Merkle tree structure is characterized in that: 1) the connection mode of the battery core of the battery pack is expressed by adopting a Merkle tree structure, so that the battery pack is easy to traverse and maintain; 2) the identifier of the whole battery pack tree is generated by using a hash algorithm, and the algorithm can map a message M with any length into a value H with a short length and a fixed length. As the SHA-2 algorithm has unidirectional and collision resistance, for all nodes of the non-electric core nodes, no matter the number of the child nodes, the finally generated node ID is fixed in length and unique, and the time complexity of the whole method for generating the root node is O (N)2) (ii) a (3) The battery pack tree generated by the Hash algorithm has the characteristic of recording layer by layer, so that the battery pack tree can be used for comparing the battery pack structure, quickly positioning the battery core and performing subordinate certification on the battery core.
An individual user in the battery management system can look up the state information and the record information of the power battery system related to the individual user through a client or a browser and participate in the data verification process of the power battery system; if the power battery system needs to be overhauled and maintained, the power battery system needs to be conveyed to a maintenance department for safety maintenance, the maintenance department needs to perform maintenance registration after the maintenance is completed, the registration content is recorded in the block chain network, and the registration content comprises maintenance content, maintenance time and information of maintenance personnel. When the power battery system is used to a low-power state, the electric automobile is required to be connected with an electric automobile charging facility for charging, the electric automobile can perform bidirectional energy and information exchange with the electric automobile charging facility in the charging process, namely, the electric automobile charging facility transmits the electric energy to the power battery system, and the power battery system transmits the self operation data to the battery systemAfter data transmission is completed, the electric vehicle charging facility randomly connects an available node in a file management network, digitally signs the acquired data using the own identity information and uploads the data to the file management network, after the data transmission is completed, the file management network feeds back a hash file name of the electric vehicle charging facility, the hash file name is an information abstract of the transmitted data and has uniqueness, then the electric vehicle charging facility triggers a data verification process in a battery management system and starts a timer T, at the moment, the battery management system generates a random number X which is not more than the total number N of users in the system, when the number X is larger, if all X users participate in the verification process, the resources of the system are wasted, therefore, the following method is adopted, if the number X is smaller than a random threshold value M, the system randomly selects X users to participate in the verification and needs to collect the selection of X users, if X is larger than the random threshold value M, the system randomly selects X users to participate in verification and at least collects the selection of A (A is smaller than X) users, and the value of A is selected according to the formula 1. Equation 1: assuming that there are N users in the system, X users are selected to participate in the verification process, and then the probability of each user being selected is X/N, let X
1,X
2,X
3,…,X
nRespectively, the voting results of the 1 st to Nth users are received by the system, the voting results are 1 and are not 0, because the voting results are independent from one another and have X for any i e {1, 2, 3, …, N }
i∈[0,1]Let S
n=X
1+X
2+X
3+…+X
nFor S
nIs provided with
If t is equal to X-A, then
Namely S
nThere is an upper bound on the probability of being less than a, and the appropriate value of a is selected based on this upper bound. The system informs the selected user to participate in the verification process and sends the hash value of the data and the uniqueness identifier of the power battery system to the participating user, and the user can check the power battery system history according to the uniqueness identifierHistory data, corresponding data content is obtained from the file management system according to the hash file name, a user gives a self selection result after comparison, matching and verification, and if the power battery system is in an abnormal operation state at the stage, the user can quickly inform a manager of the battery management system of the user, so that dangerous accidents are prevented; if the system still does not collect the user selection of the target number when the timer T overflows, the verification process is determined to be invalid, the timer T is reset and the data verification process is started again, if the resetting times of the timer are more than 3, the manager of the battery management system performs data verification, if the timer T does not overflow and the system collects the user selection of the target number, data judgment is performed according to most of user selection results, namely more than two thirds of users consider that the data is valid, otherwise, the data is invalid, if the judgment result is invalid, the data is abandoned, if the judgment result is valid, the battery management system records the hash file name of the data and the current state of the power battery system, the verification process result is recorded in a block chain network, and the verification process is shown in fig. 3.
A trade department in the battery management system is responsible for recording the sales process of the power battery system, including sales price, salesman information, purchasing staff information and quality assurance information; when the power battery system reaches the retirement standard, the power battery system is required to be conveyed to a recovery department, the recovery department registers the retired power battery system, the registration content can be recorded in a block chain network, the recovery department can acquire the current state of the corresponding power battery system from the block chain network according to the unique identification and can perform flow line type audit, experimental testing is avoided, the retired power battery system is rapidly graded and recombined, and the gradient utilization efficiency of the power battery system is improved.