CN112073199B - Battery authentication method, device, terminal equipment and medium - Google Patents

Battery authentication method, device, terminal equipment and medium Download PDF

Info

Publication number
CN112073199B
CN112073199B CN202010831078.3A CN202010831078A CN112073199B CN 112073199 B CN112073199 B CN 112073199B CN 202010831078 A CN202010831078 A CN 202010831078A CN 112073199 B CN112073199 B CN 112073199B
Authority
CN
China
Prior art keywords
authentication
super battery
charging
battery
super
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010831078.3A
Other languages
Chinese (zh)
Other versions
CN112073199A (en
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 Immotor Technology Co ltd
Original Assignee
Shenzhen Immotor 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 Immotor Technology Co ltd filed Critical Shenzhen Immotor Technology Co ltd
Priority to CN202010831078.3A priority Critical patent/CN112073199B/en
Publication of CN112073199A publication Critical patent/CN112073199A/en
Application granted granted Critical
Publication of CN112073199B publication Critical patent/CN112073199B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3271Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using challenge-response
    • H04L9/3273Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using challenge-response for mutual authentication
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00045Authentication, i.e. circuits for checking compatibility between one component, e.g. a battery or a battery charger, and another component, e.g. a power source
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3226Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using a predetermined code, e.g. password, passphrase or PIN
    • H04L9/3228One-time or temporary data, i.e. information which is sent for every authentication or authorization, e.g. one-time-password, one-time-token or one-time-key

Abstract

The application is applicable to the technical field of batteries, and provides a battery authentication method, a device, terminal equipment and a medium, wherein the method comprises the following steps: when a super battery is detected, sending a first authentication request to the super battery; when first authentication data returned by the super battery aiming at the first authentication request are received, generating first authentication information according to the first authentication data, and sending the first authentication information to the super battery; when a second authentication request returned by the super battery is received, second authentication data are sent to the super battery; receiving second authentication information returned by the super battery aiming at the second authentication data, and authenticating the super battery according to the second authentication information; and if the super battery is successfully authenticated, performing charging or discharging operation on the super battery. By the method, the safety of authentication between the battery and the charging and discharging equipment can be improved.

Description

Battery authentication method, device, terminal equipment and medium
Technical Field
The present application belongs to the field of battery technologies, and in particular, to a battery authentication method, apparatus, terminal device, and medium.
Background
The battery replacement cabinet can provide a charged battery for the electric vehicle. At present, when the battery is replaced, the identity of the battery can be confirmed through data communication between the power replacement cabinet and the battery, and then the battery can be charged. After the battery is mounted on the electric vehicle, the battery can be discharged only after data communication.
However, only data transmission between the charging and discharging device and the battery results in the battery being easily cloned. In the existing communication, when communication data between the charging and discharging equipment and the battery is monitored, the communication rule can be broken through long-time analysis, and the battery capable of communicating with the charging and discharging equipment is duplicated, so that in the existing battery replacement mode, authentication between the charging and discharging equipment and the battery is easy to break, and the existing battery replacement mode is not safe enough.
Disclosure of Invention
The embodiment of the application provides a battery authentication method, a battery authentication device, a terminal device and a battery authentication medium, which can solve the problem that identity authentication is easy to crack in the existing battery replacement mode.
In a first aspect, an embodiment of the present application provides a battery authentication method, which is applied to a charging and discharging device, and the method includes:
when a super battery is detected, sending a first authentication request to the super battery;
when first authentication data returned by the super battery aiming at the first authentication request are received, generating first authentication information according to the first authentication data, and sending the first authentication information to the super battery;
when a second authentication request returned by the super battery is received, second authentication data are sent to the super battery;
receiving second authentication information returned by the super battery aiming at the second authentication data, and authenticating the super battery according to the second authentication information;
and if the super battery is successfully authenticated, performing charging or discharging operation on the super battery.
In a second aspect, an embodiment of the present application provides a battery authentication method, which is applied to a super battery, and the method includes:
when a first authentication request from charging and discharging equipment is received, first authentication data are sent to the charging and discharging equipment;
receiving first authentication information returned by the charging and discharging equipment aiming at the first authentication data, and comparing a first numerical value obtained by encrypting the first authentication data with the first authentication information;
if the first numerical value is the same as the third authentication information, sending a second authentication request to the charging and discharging equipment;
receiving second authentication data returned by the charging and discharging equipment aiming at the second authentication request, and generating second authentication information according to the second authentication data;
and returning the second authentication information to the charging and discharging equipment, wherein the second authentication information is used for authenticating the super battery by the charging and discharging equipment.
In a third aspect, an embodiment of the present application provides a battery authentication apparatus, which is applied to a charging and discharging device, and includes:
the first authentication request sending module is used for sending a first authentication request to the super battery when the super battery is detected;
the first authentication information sending module is used for generating first authentication information according to the first authentication data when receiving first authentication data returned by the super battery aiming at the first authentication request, and sending the first authentication information to the super battery;
the second authentication data sending module is used for sending second authentication data to the super battery when receiving a second authentication request returned by the super battery;
the authentication module is used for receiving second authentication information returned by the super battery aiming at the second authentication data and authenticating the super battery according to the second authentication information;
and the charge-discharge module is used for charging or discharging the super battery if the super battery is successfully authenticated.
In a fourth aspect, an embodiment of the present application provides a battery authentication apparatus, which is applied to a super battery, and the apparatus includes:
the charging and discharging device comprises a first authentication data sending module, a second authentication data sending module and a charging and discharging module, wherein the first authentication data sending module is used for sending first authentication data to the charging and discharging device when receiving a first authentication request from the charging and discharging device;
the first authentication information receiving module is used for receiving first authentication information returned by the charging and discharging equipment aiming at the first authentication data, and comparing a first numerical value obtained by encrypting the first authentication data with the first authentication information;
a second authentication request sending module, configured to send a second authentication request to the charging and discharging device if the first value is the same as the third authentication information;
the second authentication information generation module is used for receiving second authentication data returned by the charging and discharging equipment aiming at the second authentication request and generating second authentication information according to the second authentication data;
and the second authentication information sending module is used for returning the second authentication information to the charging and discharging equipment, and the second authentication information is used for authenticating the super battery by the charging and discharging equipment.
In a fifth aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor, when executing the computer program, implements the method according to the first aspect.
In a sixth aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor, when executing the computer program, implements the method according to the second aspect.
In a seventh aspect, this application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method according to the first aspect.
In an eighth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when executed by a processor, the computer program implements the method according to the second aspect.
In a ninth aspect, embodiments of the present application provide a computer program product, which, when run on a terminal device, causes the terminal device to execute the method described in the first aspect.
In a tenth aspect, embodiments of the present application provide a computer program product, which, when run on a terminal device, causes the terminal device to execute the method described in the second aspect.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, when the charging and discharging equipment detects the super battery, a first authentication request is sent to the super battery; the method comprises the steps that when a super battery receives a first authentication request from charging and discharging equipment, first authentication data are sent to the charging and discharging equipment; after receiving the first authentication data, the charging and discharging equipment generates first authentication information according to the first authentication data and sends the first authentication information to the super battery; after receiving the first authentication information, the super battery performs identity authentication on the charging and discharging equipment according to the first authentication information; if the charging and discharging equipment passes the authentication of the super battery, the super battery sends a second authentication request to the charging and discharging equipment, and the charging and discharging equipment sends second authentication data to the super battery when receiving the second authentication request from the super battery; after receiving the second authentication data, the super battery generates second authentication information according to the second authentication data, and sends the second authentication information to the charging and discharging equipment; after receiving the second authentication information, the charging and discharging equipment performs identity authentication on the super battery according to the second authentication information; if the charging and discharging equipment successfully authenticates the super battery, the charging and discharging equipment can perform charging or discharging operation on the super battery. In the embodiment of the application, the charging and discharging equipment can perform primary identity authentication on the super battery, the super battery also needs to perform primary identity authentication on the charging and discharging equipment, and the super battery can be charged or discharged only after the two authentications are passed, so that the accuracy of the identity authentication is guaranteed; meanwhile, when identity authentication is carried out, random numbers and an irreversible encryption algorithm are adopted, so that authentication information has no regularity, cannot be copied and cannot be cracked, and cloning of the super battery is avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a battery authentication method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a battery authentication method according to a second embodiment of the present application;
fig. 3 is a schematic flowchart of a battery authentication method according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of a battery authentication device according to a fourth embodiment of the present application;
fig. 5 is a schematic structural diagram of a battery authentication device according to a fifth embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to a sixth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
Fig. 1 is a schematic flowchart of a battery authentication method according to an embodiment of the present application, and as shown in fig. 1, the method includes:
s101, when the super battery is detected, a first authentication request is sent to the super battery.
The execution main body of the embodiment is charging and discharging equipment, and can comprise a power exchange cabinet and an intelligent central control. The power exchange cabinet is used for charging the super battery, and the intelligent central control can be installed on the electric vehicle to control the discharge of the super battery. The super battery is a battery on the electric vehicle, and the super battery can comprise a single chip microcomputer for data processing and identity authentication.
Specifically, the charging and discharging device may continuously detect whether there is a super battery, and when the super battery is detected, communicate with the super battery to obtain device information of the super battery, such as a model, a voltage, and the like of the battery. The device information may include an identification code for identifying whether the super battery needs to be charged or discharged, and if the super battery needs to be charged or discharged, the charging and discharging device may send a first authentication request to the super battery.
The first authentication request refers to an authentication request sent by the charging device to the super battery. Specifically, the communication between the super battery and the charge and discharge device may be achieved by near field communication.
S102, when first authentication data returned by the super battery aiming at the first authentication request are received, first authentication information is generated according to the first authentication data, and the first authentication information is sent to the super battery.
Specifically, the first authentication data may be a random number. After receiving the first authentication request, the super battery generates a random number, and then the random number is used as first authentication data and sent to the charging and discharging equipment.
The charging and discharging equipment and the super battery can be agreed with an encryption algorithm and a secret key in advance. And the encryption algorithm and the key are stored in both the charging and discharging device and the super battery. After receiving the first authentication data, the charging and discharging equipment encrypts the first authentication data by adopting a pre-agreed encryption algorithm and a key, and sends a ciphertext value as first authentication information to the super battery.
After receiving the first authentication information, the super battery may encrypt the first authentication data previously sent to the charging and discharging device by using a pre-agreed encryption algorithm and a key to obtain a ciphertext value, and compare the ciphertext value with the first authentication information, if the ciphertext value is the same as the first authentication information, it may be indicated that the charging and discharging device is a legal device for the super battery.
In practical application, a certain company can produce the power exchange cabinet, the intelligent central control unit and the super battery, and in the production process, the same encryption algorithm and the same key can be written into the power exchange cabinet, the intelligent central control unit and the super battery respectively to ensure that the super battery of the power exchange cabinet is used by the company, so that the power exchange cabinet is prevented from being stolen.
S103, when a second authentication request returned by the super battery is received, second authentication data is sent to the super battery.
Specifically, after the identity of the charging and discharging device is confirmed, the super battery may send a second authentication request to the charging and discharging device, where the second authentication request is an authentication request sent by the super battery to the charging and discharging device.
And after receiving a second authentication request of the super battery, the charging and discharging equipment generates a random number as second authentication data and sends the random number to the super battery.
S104, receiving second authentication information returned by the super battery aiming at the second authentication data, and authenticating the super battery according to the second authentication information.
After receiving the second authentication data, the super battery encrypts the second authentication data by adopting a pre-agreed encryption algorithm and a key, and sends a ciphertext value obtained by encryption to the charging and discharging equipment as second authentication information.
And S105, if the super battery is successfully authenticated, performing charging or discharging operation on the super battery.
Specifically, after the super battery is successfully authenticated, if the charging and discharging equipment is a battery replacement cabinet, the super battery can be charged; if the charging and discharging equipment is intelligently controlled, the super battery can be controlled to discharge.
In this embodiment, the charging and discharging device and the super battery are authenticated by twice encryption, so as to ensure that the charging and discharging devices and the super battery are legal, thereby ensuring correct charging or discharging. The authentication is carried out by adopting a random number encryption mode, so that the authentication mode cannot be copied, the battery is not easy to copy, and the battery replacement is safer and more reliable.
Fig. 2 is a schematic flowchart of a battery authentication method according to a second embodiment of the present application, and as shown in fig. 2, the method includes:
s201, when a super battery is detected, reading equipment information of the super battery; the device information includes an identification code.
The execution main body of the embodiment is charging and discharging equipment, and can comprise a power exchange cabinet and an intelligent central control. The power exchange cabinet is used for charging the super battery, and the intelligent central control can be installed on the electric vehicle to control the discharge of the super battery. The super battery is a battery on the electric vehicle, and the super battery can comprise a single chip microcomputer for data processing and identity authentication.
Specifically, the device information refers to information of the super battery, and may be stored in the super battery, and when the charging and discharging device detects the super battery, the charging and discharging device may communicate with the super battery, so as to obtain the device information of the super battery. The device information summary may include information about the manufacturer, model, voltage, etc. of the super cell. The device information may include an identification code to identify whether the super battery needs to be authenticated.
S202, if the identification code is a preset numerical value, a first authentication request is sent to the super battery.
Specifically, the identification code may be a value, and if the identification code is a preset value, it may be determined that the super battery needs to be authenticated, and a first authentication request is sent to the super battery.
In another possible implementation manner, the identification code may be a system code of the super battery, the system code may be managed by a battery management system, after the charging and discharging device reads the identification code, it may be found whether the system includes the identification code through the battery management system, if the system includes the identification code, it indicates that the super battery may be charged or discharged, and at this time, the super battery needs to be subjected to identity authentication.
S203, when first authentication data returned by the super battery aiming at the first authentication request is received, encrypting the first authentication data by adopting a preset first secret key to generate first authentication information, and sending the first authentication information to the super battery.
Specifically, the first key may exist in both the super battery and the charging and discharging device, and is used for the super battery to authenticate the charging and discharging device.
An authentication register may be included in the super cell and may store a set of random numbers that are different each time they are read. After receiving the first authentication request, the super battery reads a random number from the authentication register, and then sends the random number as first authentication data to the charging and discharging equipment.
After receiving the first authentication data, the charging and discharging equipment encrypts the first authentication data by adopting a pre-agreed encryption algorithm and a first key, and sends a ciphertext value as first authentication information to the super battery.
After receiving the first authentication information, the super battery may encrypt first authentication data previously sent to the charge and discharge device by using a pre-agreed encryption algorithm and a first key to obtain a ciphertext value, and compare the ciphertext value with the first authentication information, if the ciphertext value is the same as the first authentication information, it may be indicated that the charge and discharge device is a valid device for the super battery.
And S204, when a second authentication request returned by the super battery is received, reading the random number generated by the authentication register.
Specifically, after confirming the identity of the charging and discharging device, the super battery may send a second authentication request to the charging and discharging device.
The charging and discharging device may also include an authentication register, which may generate a random number. And after receiving a second authentication request of the super battery, the charging and discharging equipment reads the random number from the authentication register.
S205, sending the random number as the second authentication data to the super battery.
And the charging and discharging equipment sends the random number read from the authentication register to the super battery as second authentication data.
And S206, receiving second authentication information returned by the super battery aiming at the second authentication data, and encrypting the second authentication data by adopting a preset second key to generate a message digest.
Specifically, the second key is used for the charging and discharging device to perform identity authentication on the super battery, and is stored in the charging and discharging device and the super battery, and the first key and the second key may be the same or different.
After receiving the second authentication data, the super battery encrypts the second authentication data by adopting a pre-agreed encryption algorithm and a second key, and sends a ciphertext value obtained by encryption as second authentication information to the charging and discharging equipment. And after receiving the second authentication information, the charging and discharging equipment encrypts second authentication data which is sent to the super battery by adopting the same encryption algorithm and a second key to obtain a message digest. The message digest may be a ciphertext value.
S207, if the message digest is the same as the second authentication information, the super battery is judged to pass the authentication.
Specifically, the obtained message digest is compared with the second authentication information, and if the two are the same, the super battery is legal for the charging and discharging device, that is, the super battery can be charged or discharged.
If the two are different, the super battery is illegal, and the super battery cannot be charged or discharged.
S208, if the super battery is successfully authenticated, charging or discharging the super battery.
Specifically, after the super battery is successfully authenticated, if the charging and discharging equipment is a battery replacement cabinet, the super battery can be charged; if the charging and discharging equipment is intelligently controlled, the super battery can be controlled to discharge.
And S209, stopping charging or discharging the super battery at preset time intervals.
There is a case where, after the super battery has been authenticated with the charge and discharge device, the authenticated super battery is replaced with a clone battery. To avoid this situation, the charging or discharging operation of the super battery may be stopped at intervals, and the authentication may be performed again.
And S210, after the charging or discharging operation of the super battery is stopped, authenticating the super battery again, and if the super battery passes the authentication, continuing to perform the charging or discharging operation of the super battery.
Specifically, the steps described in S201-S208 are adopted to authenticate the identity of the super battery, and if the authentication is passed, the charging or discharging of the super battery can be resumed.
In the embodiment, the charging and discharging equipment performs primary identity authentication on the super battery, the super battery also performs primary identity authentication on the charging and discharging equipment, and the super battery can be charged or discharged only after the two authentications pass, so that the accuracy of the identity authentication is guaranteed; meanwhile, the authentication data is randomly generated data, has no regularity and can not be copied, so that the cloning of the super battery is avoided; in addition, the super battery is subjected to identity authentication once at intervals, so that the reliability of the identity authentication is further guaranteed.
Fig. 3 is a schematic flowchart of a battery authentication method according to a third embodiment of the present application, and as shown in fig. 3, the method includes:
s301, when a first authentication request from the charging and discharging equipment is received, first authentication data is sent to the charging and discharging equipment.
The execution main body of the embodiment of the application is the super battery. The charging and discharging equipment can comprise a power exchange cabinet and an intelligent central control. When the super battery is charged in the power exchange cabinet, the super battery can communicate with the power exchange cabinet; when the super battery is installed on the electric vehicle for discharging, the super battery can be communicated with the intelligent central control.
Specifically, when the super battery is charged in the battery replacement cabinet or the super battery is mounted on the electric vehicle, identity authentication is required.
Specifically, the charging and discharging device may continuously detect whether there is a super battery, and when the super battery is detected, communicate with the super battery to obtain device information of the super battery, such as a model, a voltage, and the like of the battery. The device information may include an identification code for identifying whether the super battery needs to be charged or discharged, and if the super battery needs to be charged or discharged, the charging and discharging device may send a first authentication request to the super battery. After receiving the first authentication request of the charging and discharging device, the super battery may send first authentication data to the charging and discharging device, where the first authentication data may be a random number. The communication between the super battery and the charging and discharging device can be realized through near field communication.
S302, receiving first authentication information returned by the charging and discharging equipment aiming at the first authentication data, and comparing a first numerical value obtained by encrypting the first authentication data with the first authentication information.
Specifically, the charging and discharging device and the super battery can be agreed with an encryption algorithm and a secret key in advance. And the encryption algorithm and the key are stored in both the charging and discharging device and the super battery. After receiving the first authentication data, the charging and discharging equipment encrypts the first authentication data by adopting a pre-agreed encryption algorithm and a key, and sends a ciphertext value as first authentication information to the super battery.
After receiving the first authentication information, the super battery may encrypt the first authentication data previously sent to the charging and discharging device by using a pre-agreed encryption algorithm and a key to obtain a ciphertext value, and compare the ciphertext value with the first authentication information, if the ciphertext value is the same as the first authentication information, it may be indicated that the charging and discharging device is a legal device for the super battery.
And S303, if the first numerical value is the same as the first authentication information, sending a second authentication request to the charging and discharging equipment.
Specifically, after the identity of the charging and discharging device is confirmed, the super battery may send a second authentication request to the charging and discharging device, where the second authentication request is an authentication request sent by the super battery to the charging and discharging device.
If the super battery judges that the identity of the charging and discharging equipment is illegal, the identity authentication is terminated, the identity authentication fails, and prompt information can be sent to a user.
And S304, receiving second authentication data returned by the charging and discharging equipment according to the second authentication request, and generating second authentication information according to the second authentication data.
Specifically, after receiving a second authentication request of the super battery, the charging and discharging device generates a random number, and sends the random number as second authentication data to the super battery.
After receiving the second authentication data, the super battery encrypts the second authentication data by adopting a pre-agreed encryption algorithm and a key, and the obtained ciphertext value is the second authentication information.
S305, returning the second authentication information to the charging and discharging equipment, wherein the second authentication information is used for the charging and discharging equipment to authenticate the super battery.
Specifically, the super battery sends the second authentication information to the charging and discharging device, after receiving the second authentication information, the charging and discharging device encrypts second authentication data sent to the super battery by using the same encryption algorithm and key, compares the obtained ciphertext value with the second authentication information, and if the ciphertext value and the second authentication information are the same, the super battery is legal for the charging and discharging device, that is, the super battery can be charged or discharged.
In another possible implementation manner, the super battery may send an authentication request to the charging and discharging device, the charging and discharging device sends the authentication request to the super battery after passing the authentication of the super battery, and the charging or discharging may be performed only after passing both the authentications.
In the embodiment, the charging and discharging equipment performs primary identity authentication on the super battery, the super battery also performs primary identity authentication on the charging and discharging equipment, and the super battery can be charged or discharged only after the two authentications pass, so that the accuracy of the identity authentication is ensured; meanwhile, during identity authentication, random number encryption is adopted, the random number cannot be copied, the encryption result is irreversible, and the authentication process between the charging and discharging equipment and the super battery is guaranteed not to be cracked, so that the super battery is prevented from being cloned.
Fig. 4 is a schematic structural diagram of a battery authentication apparatus provided in a fourth embodiment of the present application, where the apparatus may be applied to a charging and discharging device, and as shown in fig. 4, the apparatus includes:
a first authentication request sending module 41, configured to send a first authentication request to a super battery when the super battery is detected;
a first authentication information sending module 42, configured to, when first authentication data returned by the super battery for the first authentication request is received, generate first authentication information according to the first authentication data, and send the first authentication information to the super battery;
a second authentication data sending module 43, configured to send second authentication data to the super battery when receiving a second authentication request returned by the super battery;
the authentication module 44 is configured to receive second authentication information returned by the super battery for the second authentication data, and authenticate the super battery according to the second authentication information;
and the charging and discharging module 45 is configured to perform charging or discharging operation on the super battery if the super battery is successfully authenticated.
The first authentication request transmission module 41 includes:
the device information reading submodule is used for reading the device information of the super battery when the super battery is detected; the equipment information comprises an identification code;
and the first judgment submodule is used for sending a first authentication request to the super battery if the identification code is a preset numerical value.
The first authentication information transmission module 42 includes:
the first authentication information generation sub-module is used for encrypting the first authentication data by adopting a preset first key to generate first authentication information;
and the first authentication information sending submodule is used for sending the first authentication information to the super battery, and the first authentication information is used for the super battery to carry out identity authentication on the charging and discharging equipment.
The second authentication data transmission module 43 includes:
the random number reading submodule is used for reading the random number generated by the authentication register when receiving a second authentication request returned by the super battery;
and the random number sending submodule is used for sending the random number serving as the second authentication data to the super battery.
The authentication module 44 includes:
the message digest generation submodule is used for encrypting the second authentication data by adopting a preset second key to generate a message digest;
and the comparison submodule is used for judging that the super battery passes the authentication if the message abstract is the same as the second authentication information.
The above-mentioned device still includes:
the charging and discharging stopping module is used for stopping charging or discharging the super battery every other preset time period;
and the re-authentication module is used for re-authenticating the super battery after stopping the charging or discharging operation of the super battery, and if the super battery passes the authentication, continuing to perform the charging or discharging operation on the super battery.
Fig. 5 is a schematic structural diagram of a battery authentication device according to a fifth embodiment of the present application, where the device may be applied to a super battery, and as shown in fig. 5, the device includes:
a first authentication data sending module 51, configured to send first authentication data to the charging and discharging device when receiving a first authentication request from the charging and discharging device;
a first authentication information receiving module 52, configured to receive first authentication information returned by the charging and discharging device for the first authentication data, and compare a first numerical value obtained by encrypting the first authentication data with the first authentication information;
a second authentication request sending module 53, configured to send a second authentication request to the charging and discharging device if the first value is the same as the third authentication information;
a second authentication information generation module 54, configured to receive second authentication data returned by the charging and discharging device in response to the second authentication request, and generate second authentication information according to the second authentication data;
a second authentication information sending module 55, configured to return the second authentication information to the charging and discharging device, where the second authentication information is used for the charging and discharging device to authenticate the super battery.
Fig. 6 is a schematic structural diagram of a terminal device according to a sixth embodiment of the present application. As shown in fig. 6, the terminal device 6 of this embodiment includes: at least one processor 60 (only one shown in fig. 6), a memory 61, and a computer program 62 stored in the memory 61 and executable on the at least one processor 60, the processor 60 implementing the steps in any of the various method embodiments described above when executing the computer program 62. For example, the terminal device 6 may be the charging and discharging device in the foregoing embodiments, and when the processor 60 of the terminal device 6 executes the computer program 62, the steps in the charging and discharging device-side embodiments may be implemented; alternatively, the terminal device 6 may be a super battery in the foregoing embodiments, and when the processor 60 of the terminal device 6 executes the computer program 62, the steps in the foregoing embodiments on the super battery side may also be implemented.
The terminal device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is only an example of the terminal device 6, and does not constitute a limitation to the terminal device 6, and may include more or less components than those shown, or combine some components, or different components, such as an input/output device, a network access device, and the like.
The processor 60 may be a Central Processing Unit (CPU), and the processor 60 may be other general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may in some embodiments be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6 in other embodiments, such as a plug-in hard disk, a smart card (SMC), a Secure Digital (SD) card, a flash card (FlashCard), and the like, which are provided on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a terminal device, enables the terminal device to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer memory, Read-only memory (ROM), random-access memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (6)

1. A battery authentication method is applied to charge and discharge equipment, wherein the charge and discharge equipment is a battery replacement cabinet and is used for charging a super battery, and the method comprises the following steps:
when a super battery is detected, sending a first authentication request to the super battery, including: when a super battery is detected, reading equipment information of the super battery; the equipment information comprises an identification code; if the identification code is a preset value, sending a first authentication request to the super battery; after receiving the first authentication request, the super battery generates a random number, and the random number is used as first authentication data and is sent to the charging and discharging equipment;
when first authentication data returned by the super battery for the first authentication request is received, generating first authentication information according to the first authentication data, and sending the first authentication information to the super battery, wherein the method comprises the following steps: encrypting the first authentication data by adopting a preset first secret key to generate first authentication information; sending the first authentication information to the super battery, receiving the first authentication information by the super battery, encrypting first authentication data by adopting a preset encryption algorithm and a first key to obtain a first numerical value, comparing the first numerical value with the first authentication information, and if the first numerical value and the first authentication information are the same, judging that the charging and discharging equipment is legal equipment for the super battery, wherein the first authentication information is used for authenticating the identity of the charging and discharging equipment by the super battery;
when a second authentication request returned by the super battery is received, sending second authentication data to the super battery, wherein the second authentication data comprises: when a second authentication request returned by the super battery is received, reading a random number generated by the authentication register; sending the random number serving as the second authentication data to the super battery, receiving the second authentication data by the super battery, encrypting the second authentication data by adopting a preset encryption algorithm and a second key, and sending a ciphertext value obtained by encryption as second authentication information to the charging and discharging equipment; the charging and discharging equipment comprises an authentication register;
receiving second authentication information returned by the super battery aiming at the second authentication data, and authenticating the super battery according to the second authentication information, wherein the authentication comprises the following steps: encrypting the second authentication data by adopting a preset second key to generate a message digest; if the message abstract is the same as the second authentication information, judging that the super battery passes the authentication;
and if the super battery is successfully authenticated, performing charging operation on the super battery.
2. The method of claim 1, further comprising:
stopping charging or discharging the super battery every a preset time period;
and after the super battery is stopped being charged or discharged, the super battery is authenticated again, and if the super battery passes the authentication, the super battery is continuously charged or discharged.
3. A battery authentication method is applied to a super battery, and the method comprises the following steps:
when receiving a first authentication request from a charging and discharging device, sending first authentication data to the charging and discharging device, including: after receiving a first authentication request, generating a random number, and sending the random number serving as first authentication data to the charging and discharging equipment; the charging and discharging equipment is a battery replacement cabinet and is used for charging the super battery; when charging equipment detects a super battery, reading equipment information of the super battery, wherein the equipment information comprises an identification code, and if the identification code is a preset value, sending a first authentication request to the super battery;
receiving first authentication information returned by the charging and discharging equipment aiming at the first authentication data, and comparing a first numerical value obtained by encrypting the first authentication data with the first authentication information, wherein the method comprises the following steps: the charging and discharging equipment encrypts the first authentication data by adopting a preset first secret key to generate first authentication information and sends the first authentication information to the super battery;
if the first numerical value is the same as the first authentication information, sending a second authentication request to the charging and discharging equipment; the charging and discharging equipment comprises an authentication register, and when receiving a second authentication request returned by the super battery, the charging and discharging equipment reads a random number generated by the authentication register; sending the random number as the second authentication data to the super battery;
receiving second authentication data returned by the charging and discharging equipment aiming at the second authentication request, and generating second authentication information according to the second authentication data;
returning the second authentication information to the charging and discharging equipment, where the second authentication information is used for the charging and discharging equipment to authenticate the super battery, and the method includes: the charging and discharging equipment encrypts the second authentication data by adopting a preset second key to generate a message digest; and if the message digest is the same as the second authentication information, judging that the super battery passes the authentication.
4. The utility model provides a battery authentication device which characterized in that is applied to charge-discharge equipment, charge-discharge equipment trades the battery cabinet for charge super battery, the device includes:
the first authentication request sending module is used for reading equipment information of the super battery when the super battery is detected, wherein the equipment information comprises an identification code; if the identification code is a preset value, sending a first authentication request to the super battery, generating a random number after the super battery receives the first authentication request, and sending the random number serving as first authentication data to the charging and discharging equipment;
the first authentication information sending module is used for generating first authentication information according to the first authentication data when receiving first authentication data returned by the super battery aiming at the first authentication request, and sending the first authentication information to the super battery; the first authentication information transmission module includes: the first authentication information generation sub-module is used for encrypting the first authentication data by adopting a preset first key to generate first authentication information; the first authentication information sending submodule is used for sending the first authentication information to the super battery, the super battery receives the first authentication information, a preset encryption algorithm and a first key are adopted to encrypt first authentication data to obtain a first numerical value, the first numerical value is compared with the first authentication information, if the first numerical value and the first authentication information are the same, the charging and discharging equipment is legal equipment for the super battery, and the first authentication information is used for the super battery to perform identity authentication on the charging and discharging equipment;
the second authentication data sending module is used for sending second authentication data to the super battery when receiving a second authentication request returned by the super battery; the second authentication data transmission module includes: the random number reading submodule is used for reading the random number generated by the authentication register when receiving a second authentication request returned by the super battery; the random number sending submodule is used for sending the random number serving as the second authentication data to the super battery; the super battery receives the second authentication data, encrypts the second authentication data by adopting a preset encryption algorithm and a second key, and sends a ciphertext value obtained by encryption as second authentication information to the charging and discharging equipment;
the authentication module is used for receiving second authentication information returned by the super battery aiming at the second authentication data and authenticating the super battery according to the second authentication information; the authentication module includes: the message digest generation submodule is used for encrypting the second authentication data by adopting a preset second key to generate a message digest; the comparison submodule is used for judging that the super battery passes the authentication if the message abstract is the same as the second authentication information;
and the charge-discharge module is used for charging the super battery if the super battery is successfully authenticated.
5. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to claim 1 or 2 when executing the computer program.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to claim 1 or 2.
CN202010831078.3A 2020-08-18 2020-08-18 Battery authentication method, device, terminal equipment and medium Active CN112073199B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010831078.3A CN112073199B (en) 2020-08-18 2020-08-18 Battery authentication method, device, terminal equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010831078.3A CN112073199B (en) 2020-08-18 2020-08-18 Battery authentication method, device, terminal equipment and medium

Publications (2)

Publication Number Publication Date
CN112073199A CN112073199A (en) 2020-12-11
CN112073199B true CN112073199B (en) 2022-01-04

Family

ID=73661996

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010831078.3A Active CN112073199B (en) 2020-08-18 2020-08-18 Battery authentication method, device, terminal equipment and medium

Country Status (1)

Country Link
CN (1) CN112073199B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109638914A (en) * 2018-12-21 2019-04-16 深圳运存科技有限公司 Intelligent control method is used in a kind of charging of battery

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102111272B (en) * 2010-12-24 2014-04-09 武汉天喻信息产业股份有限公司 Method for authenticating external equipment by using mobile terminal
CN105914820A (en) * 2016-05-05 2016-08-31 深圳市三颗子弹科技有限公司 Separated mobile power supply with identification function and authentication identification method thereof
CN107453444A (en) * 2017-09-15 2017-12-08 苏州易换骑网络科技有限公司 A kind of charging method for changing electric cabinet and battery of electric vehicle
WO2019134138A1 (en) * 2018-01-05 2019-07-11 深圳市大疆创新科技有限公司 Non-smart battery authentication method, device and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109638914A (en) * 2018-12-21 2019-04-16 深圳运存科技有限公司 Intelligent control method is used in a kind of charging of battery

Also Published As

Publication number Publication date
CN112073199A (en) 2020-12-11

Similar Documents

Publication Publication Date Title
EP3941014B1 (en) Digital key-based identity authentication method, terminal apparatus, and medium
CN107508679B (en) Binding and authentication method for intelligent terminal main control chip and encryption chip
CN101102574A (en) Terminal verification method and device
AU2014256377A1 (en) Systems and methods for secure processing with embedded cryptographic unit
CN102904719A (en) USB (universal serial bus)-key and application method thereof
CN109041021B (en) File transmission method based on Bluetooth, terminal equipment and storage medium
CN111163044B (en) Battery management method, equipment, server and system
CN111160879B (en) Hardware wallet and security improving method and device thereof
CN112019326B (en) Vehicle charging safety management method and system
CN103269271A (en) Method and system for back-upping private key in electronic signature token
CN111651748A (en) Safety access processing system and method for ECU in vehicle
CN103248491A (en) Method and system for backing up electronic signed token private key
CN111814132B (en) Security authentication method and device, security authentication chip and storage medium
CN112248844A (en) Charging starting method of charging pile, intelligent terminal and charging system
CN114444134A (en) Data use authorization method, system and device
CN114040401B (en) Terminal authentication method and system
CN102202057B (en) System and method for safely dumping data of mobile memory
CN105430649A (en) Wifi access method and apparatus
CN112073199B (en) Battery authentication method, device, terminal equipment and medium
CN103281188A (en) Method and system for backing up private key in electronic signature token
CN103248490A (en) Method and system for backing-up information in electronic signature token
CN111523127B (en) Authority authentication method and system for password equipment
CN114390478A (en) Equipment authentication system, method and terminal equipment
CN115118438B (en) Block chain-based terminal digital identity management method and system
CN115118439B (en) Method and system for verifying terminal digital identity

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant