Energy storage system encryption method and device, equipment, storage medium and program product
By performing identity authentication and encryption processing in the energy storage system, the problem of insufficient security measures in the traditional energy storage system is solved, comprehensive security protection of the energy storage system is achieved, and the system security and data transmission reliability are improved.
Patent Information
- Application Number
- CN202411030476.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-12-27
AI Technical Summary
There are blind spots in the encryption and security measures of traditional energy storage systems, which leads to low security, especially in the process of communication between energy storage systems and external factors, which is difficult to effectively defend against attacks.
By introducing identity authentication modules and encryption modules in the energy storage system, identity authentication is performed for the access request of the target module, and after passing the identity authentication, the target configuration file, data to be transmitted and control instructions are encrypted to ensure that it is trustworthy only The module connects and transmits data to realize security protection of system configuration, data transmission and control processes.
It effectively improves the security of the energy storage system, defends against external attacks, guarantees the integrity and privacy of internal data, and ensures the security and reliability of system processes.
Smart Images

Figure CN119210759A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of energy storage technology, and in particular to an energy storage system encryption method, device, computer equipment, computer-readable storage medium and computer program product. Background Art
[0002] With the growing global demand for sustainable energy, as well as the continuous advancement of technology and the continuous reduction of costs, energy storage systems have gradually become one of the important development directions of the energy industry. At present, most of the research on energy storage systems focuses on the efficient management and optimization control of energy, and adopts a series of monitoring, scheduling and data analysis technologies to improve the performance and economy of energy storage systems.
[0003] In traditional technologies, encryption and security measures for energy storage systems mainly focus on controlling device access by setting username and password authentication, relying on standard SSL (Secure Sockets Layer) protocol or TLS (Transport Layer Security) protocol to protect data transmitted in the network from being eavesdropped or tampered with.
[0004] However, the encryption and security measures of energy storage systems in traditional methods are mostly aimed at the process of communication between the energy storage system and the outside world, which has a protection blind spot and leads to low security of the energy storage system. Summary of the invention
[0005] Based on this, it is necessary to provide an energy storage system encryption method, device, computer equipment, computer-readable storage medium and computer program product that can improve the security of the energy storage system in response to the above technical problems.
[0006] In a first aspect, the present application provides an energy storage system encryption method, comprising:
[0007] In response to an access request sent by the target module to the energy storage system, performing identity authentication on the target module;
[0008] When it is determined that the target module passes the identity authentication and a target configuration file for the target module is detected, the target configuration file is encrypted to obtain a target encrypted configuration file, and the target encrypted configuration file is sent to the target module;
[0009] When it is determined that the target module has passed the identity authentication and the data to be transmitted for the target module is detected, the data to be transmitted is encrypted to obtain encrypted transmission data, and the encrypted transmission data is sent to the target module;
[0010] When it is determined that the target module passes the identity authentication and a target control instruction for the target module is detected, the target control instruction is encrypted to obtain a target encrypted control instruction, and the target encrypted control instruction is sent to the target module.
[0011] In one embodiment, authenticating the target module includes:
[0012] Sending a first random challenge message to a target module, where the first random challenge message is used to generate a first digital signature, where the first digital signature is obtained by signing the first random challenge message by the target module based on a first private key stored in the target module;
[0013] Receiving a first digital certificate and a first digital signature sent by a target module;
[0014] When it is determined that the first digital certificate is valid, verifying the first digital signature according to the first random challenge message in the energy storage system and the first public key in the first digital certificate;
[0015] When it is determined that the first digital signature verification passes, it is determined that the target module passes the identity authentication.
[0016] In one embodiment, the energy storage system encryption method further includes:
[0017] Receive a second random challenge message sent by the target module, and sign the second random challenge message based on a second private key stored in the energy storage system to obtain a second digital signature;
[0018] The second digital certificate and the second digital signature of the energy storage system are sent to the target module, so that the target module can verify the second digital signature according to the second random challenge message in the target module and the second public key in the second digital certificate when the second digital certificate is determined to be valid. When it is determined that the second digital signature verification is successful, it is determined that the energy storage system has passed the identity authentication.
[0019] In one of the embodiments, encrypting a target configuration file to obtain a target encrypted configuration file includes:
[0020] Obtaining a first static key and an initialization vector;
[0021] The target configuration file is symmetrically encrypted based on the initialization vector and the first static key to obtain a target encrypted configuration file.
[0022] In one embodiment, encrypting the data to be transmitted to obtain the encrypted transmission data includes:
[0023] Obtaining a first security connection timestamp, a first random number, a first shared public value, and a shared parameter;
[0024] Performing a hash operation on the first security connection timestamp, the first random number, and the shared parameter to obtain a session key;
[0025] The data to be transmitted is symmetrically encrypted based on the session key to obtain encrypted transmission data.
[0026] In one embodiment, encrypting the target control instruction to obtain the target encrypted control instruction includes:
[0027] Based on the second private key private to the sender of the target control instruction in the energy storage system, asymmetric encryption is performed on the instruction summary of the target control instruction to generate a third digital signature;
[0028] The third digital signature and the target control instruction are encapsulated to obtain the target encrypted control instruction.
[0029] In a second aspect, the present application also provides an energy storage system encryption device, comprising:
[0030] An identity authentication module, configured to perform identity authentication on a target module in response to an access request sent by the target module to the energy storage system;
[0031] A first encryption module is used to encrypt the target configuration file to obtain a target encrypted configuration file, and send the target encrypted configuration file to the target module when it is determined that the target module has passed the identity authentication and a target configuration file for the target module is detected;
[0032] A second encryption module is used to encrypt the data to be transmitted, obtain encrypted transmission data, and send the encrypted transmission data to the target module when it is determined that the target module has passed the identity authentication and the data to be transmitted for the target module is detected;
[0033] The third encryption module is used to encrypt the target control instruction to obtain the target encrypted control instruction and send the target encrypted control instruction to the target module when it is determined that the target module has passed the identity authentication and the target control instruction for the target module is detected.
[0034] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0035] In response to an access request sent by the target module to the energy storage system, performing identity authentication on the target module;
[0036] When it is determined that the target module passes the identity authentication and a target configuration file for the target module is detected, the target configuration file is encrypted to obtain a target encrypted configuration file, and the target encrypted configuration file is sent to the target module;
[0037] When it is determined that the target module has passed the identity authentication and the data to be transmitted for the target module is detected, the data to be transmitted is encrypted to obtain encrypted transmission data, and the encrypted transmission data is sent to the target module;
[0038] When it is determined that the target module passes the identity authentication and a target control instruction for the target module is detected, the target control instruction is encrypted to obtain a target encrypted control instruction, and the target encrypted control instruction is sent to the target module.
[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:
[0040] In response to an access request sent by the target module to the energy storage system, performing identity authentication on the target module;
[0041] When it is determined that the target module passes the identity authentication and a target configuration file for the target module is detected, the target configuration file is encrypted to obtain a target encrypted configuration file, and the target encrypted configuration file is sent to the target module;
[0042] When it is determined that the target module has passed the identity authentication and the data to be transmitted for the target module is detected, the data to be transmitted is encrypted to obtain encrypted transmission data, and the encrypted transmission data is sent to the target module;
[0043] When it is determined that the target module passes the identity authentication and a target control instruction for the target module is detected, the target control instruction is encrypted to obtain a target encrypted control instruction, and the target encrypted control instruction is sent to the target module.
[0044] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:
[0045] In response to an access request sent by the target module to the energy storage system, performing identity authentication on the target module;
[0046] When it is determined that the target module passes the identity authentication and a target configuration file for the target module is detected, the target configuration file is encrypted to obtain a target encrypted configuration file, and the target encrypted configuration file is sent to the target module;
[0047] When it is determined that the target module has passed the identity authentication and the data to be transmitted for the target module is detected, the data to be transmitted is encrypted to obtain encrypted transmission data, and the encrypted transmission data is sent to the target module;
[0048] When it is determined that the target module passes the identity authentication and a target control instruction for the target module is detected, the target control instruction is encrypted to obtain a target encrypted control instruction, and the target encrypted control instruction is sent to the target module.
[0049] The energy storage system encryption method, apparatus, computer equipment, computer-readable storage medium and computer program product perform identity authentication on the target module in response to an access request sent by the target module to the energy storage system, thereby realizing authentication of whether the target module requesting access to the energy storage device is credible; further, by encrypting the target configuration file to obtain a target encrypted configuration file and sending the target encrypted configuration file to the target module when it is determined that the target module has passed the identity authentication and the target configuration file for the target module has been detected, thereby realizing security protection of the system configuration process in the energy storage system; by encrypting the data to be transmitted to obtain encrypted transmission data and sending the encrypted transmission data to the target module when it is determined that the target module has passed the identity authentication and the data to be transmitted for the target module has been detected, thereby realizing security protection of the data transmission process in the energy storage system; by encrypting the target control instruction to obtain a target encrypted control instruction and sending the target encrypted control instruction to the target module when it is determined that the target module has passed the identity authentication and the target control instruction for the target module has been detected, thereby realizing security protection of the control process in the energy storage system. In this way, only trusted target modules can be allowed to access the energy storage system and become part of the energy storage system. By comprehensively protecting the system configuration process, data transmission process, and control process between the various modules within the energy storage system, the security and effectiveness of the internal processes of the energy storage system can be ensured. This can not only effectively defend against external attacks, but also ensure the integrity and privacy of internal data, thereby effectively improving the security of the energy storage system. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0051] Figure 1 A schematic diagram of a flow chart of an energy storage system encryption method in one embodiment;
[0052] Figure 2 A schematic diagram of a flow chart of an energy storage system encryption method in another embodiment;
[0053] Figure 3 A schematic diagram of the hierarchical structure of an energy storage system in one embodiment;
[0054] Figure 4 A schematic diagram of the module structure of an energy storage system in one embodiment;
[0055] Figure 5 It is a structural block diagram of an energy storage system encryption device in one embodiment;
[0056] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] In an exemplary embodiment, Figure 1 As shown, a method for encrypting an energy storage system is provided. This embodiment uses the method applied to a terminal as an example, wherein the terminal may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, projection devices, and the like. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, and the like. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, and the like. It is understandable that the method may also be applied to a server, and may also be applied to a system including a terminal and a server, and may be implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps S10-S40. Among them:
[0059] Step S10: in response to an access request sent by the target module to the energy storage system, perform identity authentication on the target module.
[0060] Among them, the energy storage system refers to a device or facility that can store electrical energy and release it when needed. In order for the energy storage system to realize the charging, storage and release of electrical energy, multiple functional modules need to be coordinated. By connecting different functional modules to the energy storage system, the functions and functional expansion of the energy storage system can be realized. Functional modules include at least one of EMS (Energy Management System), PMS (Power Management System), PCS (Power Conversion System), BMS (Battery Management System), etc. The target module refers to the functional module that requests access to the energy storage system. That is, any functional module in EMS, PMS, PCS, BMS, etc. needs to be authenticated before accessing the energy storage system, so as to ensure that each functional module connected to the energy storage system is credible, avoid the situation where attackers arbitrarily or impersonate functional modules to access the energy storage system, and improve the defense capability of the energy storage system against external attacks.
[0061] Exemplarily, after receiving an access request sent by a target module requesting access to the energy storage system, the energy storage system can obtain the module identity information sent by the target module together with the access request, and then query a preset authorization module list based on the module identity information. If an authorization module matching the received module identity information is found in the authorization module list, it is determined that the target module has passed the identity authentication, the target module is allowed to access the energy storage system, and a communication connection is allowed to be established between the target module and other functional modules that have been connected to the energy storage system; if an authorization module matching the received module identity information is not found in the authorization module list, it is determined that the target module has not passed the identity authentication, the target module is prohibited from accessing the energy storage system, and a communication connection is prohibited between the target module and other functional modules that have been connected to the energy storage system.
[0062] Step S20: when it is determined that the target module passes the identity authentication and a target configuration file for the target module is detected, the target configuration file is encrypted to obtain a target encrypted configuration file, and the target encrypted configuration file is sent to the target module.
[0063] Among them, the target configuration file is used to configure the target module's operating parameters, equipment settings, and interface details with other modules. After the target module is connected to the energy storage system, it may be necessary to change the target module's configuration information as the actual situation changes. For example, when adding other functional modules to the energy storage system, it may be necessary to configure the target module's interface protocol, data exchange frequency, security authentication, etc.; in the daily operation and maintenance of the energy storage system, it may be necessary to optimize the target module. In this case, it may be necessary to update the target module's configuration information; during the normal operation of the energy storage system, if the grid side or other external systems that interact with the energy storage system update the rules or regulations, the energy storage system also needs to be updated synchronously. In this case, it may be necessary to update the target module's configuration information. In the process of updating the configuration information, configuration files will be transmitted between the modules inside the energy storage system. In order to prevent these configuration files from being attacked or stolen during transmission, these configuration files can be encrypted.
[0064] For example, after determining that the target module has passed the identity authentication, it is possible to monitor whether the target module has a configuration requirement. When any module needs to configure the target module, it will first generate or obtain a target configuration file for the target module, and then use a preset configuration file encryption algorithm to encrypt the target configuration file to obtain a target encrypted configuration file, and then send the encrypted target encrypted configuration file to the target module. Among them, the configuration file encryption algorithm can be selected according to actual conditions, such as a symmetric encryption algorithm, an asymmetric encryption algorithm, a hash function, etc.
[0065] In this way, the target module or any attacker obtains the encrypted target encrypted configuration file. For the target module, the target encrypted configuration file can be inversely operated based on the pre-agreed configuration file encryption algorithm, decrypted to obtain the target configuration file, and then the configuration information of the target module is updated based on the decrypted target configuration file. For the attacker, even if the target encrypted configuration file is obtained, the target configuration file cannot be obtained due to the unknown configuration file encryption algorithm and key information. In addition, for any attacker, if he wants to send a configuration file to the target module to tamper with the configuration information of the target module, he cannot generate the correct target encrypted configuration file due to the unknown configuration file encryption algorithm and key information. Even if the target module receives the configuration file sent by the attacker, it is easy to identify that the configuration file is abnormal after the decryption operation.
[0066] Step S30, when it is determined that the target module has passed the identity authentication and the data to be transmitted for the target module is detected, the data to be transmitted is encrypted to obtain encrypted transmission data, and the encrypted transmission data is sent to the target module.
[0067] The data to be transmitted refers to the data that other functional modules in the energy storage system need to transmit to the target module. For example, the BMS can transmit battery status data to the EMS, and the PCS can transmit the voltage level and current value of the input or output of the PCS to the EMS.
[0068] For example, after determining that the target module has passed the identity authentication, it is possible to monitor whether each functional module in the energy storage system needs to transmit data to the target module. Before any module needs to transmit data to the target module, the data to be transmitted can be obtained first, and then the data to be transmitted is encrypted using a preset data encryption algorithm to obtain encrypted transmission data, and then the encrypted encrypted transmission data is sent to the target module. Among them, the data encryption algorithm can be selected according to the actual situation, such as a symmetric encryption algorithm, an asymmetric encryption algorithm, a hash function, etc.
[0069] In this way, the target module or any attacker obtains the encrypted transmission data. For the target module, it can perform an inverse operation on the encrypted transmission data based on the pre-agreed data encryption algorithm, decrypt and restore the data to be transmitted, and realize the encrypted transmission of the data to be transmitted. For the attacker, even if the encrypted transmission data is obtained, the data to be transmitted cannot be restored due to the unknown data encryption algorithm and key information. In addition, for any attacker, if he wants to send data to the target module, due to the unknown data encryption algorithm and key information, he cannot generate the correct encrypted transmission data. Even if the target module receives the data sent by the attacker, it is easy to identify that the data is abnormal after the decryption operation.
[0070] Step S40, when it is determined that the target module passes the identity authentication and a target control instruction for the target module is detected, the target control instruction is encrypted to obtain a target encrypted control instruction, and the target encrypted control instruction is sent to the target module.
[0071] Among them, the target control instruction refers to a command used to instruct the target module to perform a specific action. After the target module is connected to the energy storage system, other functional modules in the energy storage system may send a target control instruction to the target module to instruct the target module to perform a specific action. For example, the EMS can send a control instruction to the BMS to suspend charging and discharging when it detects that the BMS temperature is too high; the EMS can send a voltage control instruction to the PCS to instruct the PCS to use a specific voltage level when charging or discharging.
[0072] For example, after determining that the target module has passed the identity authentication, it is possible to monitor whether each functional module in the energy storage system needs to send a target control instruction to the target module. Before any module needs to send a target control instruction to the target module, the target control instruction to be sent can be obtained first, and then the target control instruction is encrypted using a preset instruction encryption algorithm to obtain a target encrypted control instruction, and then the encrypted target encrypted control instruction is sent to the target module. Among them, the instruction encryption algorithm can be selected according to the actual situation, such as a symmetric encryption algorithm, an asymmetric encryption algorithm, a hash function, etc.
[0073] In this way, the target module or any attacker obtains the encrypted target encryption control instruction. For the target module, the target encryption control instruction can be inversely operated based on the pre-agreed instruction encryption algorithm, and the target control instruction can be decrypted and restored to achieve encryption control of the target module. For the attacker, even if the target encryption control instruction is obtained, the target control instruction cannot be restored due to the unknown instruction encryption algorithm and key information. In addition, for any attacker, if he wants to send a control instruction to the target module, he cannot generate the correct target encryption control instruction due to the unknown data encryption algorithm and key information. Even if the target module receives the control instruction sent by the attacker, it is easy to identify that the encryption instruction is abnormal after the decryption operation.
[0074] It is understandable that step S20, step S30 and step S40 are not used to indicate the order relationship between the steps, and there is no clear order relationship between step S20, step S30 and step S40, that is, after determining that the target module has passed the identity authentication, one or more steps in step S20, step S30 and step S40 can be triggered in any order at any time. For example, when it is determined that the target module has passed the identity authentication, and the target control instruction for the target module is detected, but the data to be transmitted for the target module is not detected, and the target configuration file for the target module is not detected, only step S40 can be executed; when it is determined that the target module has passed the identity authentication, and the target control instruction for the target module and the target configuration file for the target module are detected in sequence, but the data to be transmitted for the target module is not detected, step S40 can be executed first, and then step S20 can be executed, and step S30 is not executed.
[0075] It can be understood that in actual applications, step S10 and any one of step S20, step S30 and step S40 may be performed discontinuously. For example, EMS, PMS, PCS, BMS, etc. can be connected to the energy storage system as target modules at different times, and then the energy storage system starts to operate normally. Then, if BMS needs to upload battery status data to EMS, EMS can be used as the target module, and BMS transmits the encrypted battery status data to EMS. If PMS needs to update configuration information, PMS can be used as the target module, and EMS can send an encrypted configuration file to PMS.
[0076] As an example, various digital certificates, keys and other information involved in the energy storage system encryption method can be stored in the corresponding key management system. When needed, the target module establishes a communication connection with the corresponding key management system, so that the various digital certificates, keys and other information stored in the key management system can be used. Among them, the key management system refers to a device that can be physically isolated from any terminal, including a USB flash drive or a hardware security module. Since the key management system can be physically disconnected from any terminal, it can effectively reduce the probability of being attacked by a network, thereby protecting the data and information stored therein from being obtained by remote attackers. The key management systems corresponding to different modules can be the same or different, and can be determined according to the actual situation. This embodiment does not limit this.
[0077] As an example, in the transmission process of data, files, information, etc. involved in the energy storage system encryption method, a secure channel can be established between the sending end and the receiving end first, and then transmitted through the secure channel. For example, each functional module can be configured in advance so that each functional module can communicate using the TLS / SSL protocol, and then before transmission between any sending end and the output end, a TLS / SSL secure channel is established between the sending end and the output end. During the process of establishing the secure channel, a handshake process will be automatically performed, which includes steps such as digital certificate verification, key exchange, and encryption algorithm selection. If the handshake is successful, a secure channel can be established.
[0078] In the above energy storage system encryption method, in response to an access request sent by the target module to the energy storage system, the target module is authenticated, thereby realizing authentication of whether the target module requesting access to the energy storage device is credible; further, by encrypting the target configuration file to obtain a target encrypted configuration file and sending the target encrypted configuration file to the target module when it is determined that the target module has passed the identity authentication and the target module has been detected, the security protection of the system configuration process in the energy storage system is realized; by encrypting the data to be transmitted to obtain encrypted transmission data and sending the encrypted transmission data to the target module when it is determined that the target module has passed the identity authentication and the target control instruction for the target module has been detected, the target control instruction is encrypted to obtain a target encrypted control instruction and the target encrypted control instruction is sent to the target module, thereby realizing security protection of the control process in the energy storage system. In this way, only trusted target modules can be allowed to access the energy storage system and become part of the energy storage system. By comprehensively protecting the system configuration process, data transmission process, and control process between the various modules within the energy storage system, the security and effectiveness of the internal processes of the energy storage system can be ensured. This can not only effectively defend against external attacks, but also ensure the integrity and privacy of internal data, thereby effectively improving the security of the energy storage system.
[0079] In an exemplary embodiment, Figure 2 As shown, the identity authentication of the target module includes steps S11 to S14. Among them:
[0080] Step S11, sending a first random challenge message to a target module, the first random challenge message is used to generate a first digital signature, the first digital signature is obtained by signing the first random challenge message by the target module based on a first private key stored in the target module.
[0081] The random challenge message refers to a randomly generated data string. The first private key refers to a private key used for identity authentication.
[0082] Exemplarily, after receiving the access request sent by the target module, the energy storage system may first generate a first random challenge message through a random number generator, and then send the generated first random challenge message to the target module. After receiving the first random challenge message, the target module may use the first private key of the target module to sign the first random challenge message, obtain a first digital signature, and send the first digital signature and the first digital certificate of the target module to the energy storage system.
[0083] As an example, the first private key can be stored in the key management system corresponding to the target module. When it is needed, the target module establishes a communication connection with the corresponding key management system, so that the first private key stored in the key management system can be used. Among them, the key management system refers to a device that can be physically isolated from any terminal, including a USB flash drive or a hardware security module. Since the key management system can be physically disconnected from any terminal, it can effectively reduce the probability of being attacked by a network, thereby protecting the data and information stored therein from being obtained by remote attackers.
[0084] Among them, the first digital certificate is pre-installed in the target module before leaving the factory, and the first digital certificate contains at least the module identity information of the target module and the first public key corresponding to the first private key. As an example, the first digital certificate can be a CA (Certificate Authority) certificate, which is signed by the CA center using the private key of the CA center to ensure the authenticity of the certificate. As an example, at the target module end, the first digital certificate can be stored in the key management system corresponding to the target module. When it is needed, the target module establishes a communication connection with the corresponding key management system, so that the first digital certificate can be obtained from the key management system corresponding to the target module, wherein the key management system refers to a device that can be physically isolated from any terminal, including a USB flash drive or a hardware security module. Since the key management system can be physically disconnected from any terminal, the first digital certificate can be prevented from being easily tampered with or extracted.
[0085] Step S12, receiving a first digital certificate and a first digital signature sent by the target module.
[0086] Exemplarily, a first digital certificate and a first digital signature returned by the target module based on a first random challenge message are received.
[0087] Step S13: When it is determined that the first digital certificate is valid, verify the first digital signature according to the first random challenge message in the energy storage system and the first public key in the first digital certificate.
[0088] Exemplarily, after receiving the first digital certificate and the first digital signature, the validity of the first digital certificate is first verified, and the manner of verifying the validity of the first digital certificate includes at least one of the following: by verifying the signature of the CA center in the first digital certificate, checking whether the certificate is issued by a trusted CA center, accessing the latest certificate revocation list issued by the CA center, querying the online certificate status protocol, confirming whether the first digital certificate has been marked as revoked and the current status of the first digital certificate, checking whether the identification information of the target module is consistent with the pre-authorization of the energy storage system, etc. After verifying that the first digital certificate is valid, the first public key can be extracted from the first digital certificate, and then the first digital signature can be decrypted based on the first public key, and the decrypted first digital signature can be compared with the first random challenge message previously generated by the energy storage system.
[0089] Step S14: when it is determined that the first digital signature verification has passed, it is determined that the target module has passed the identity authentication.
[0090] Exemplarily, if the decrypted first digital signature is consistent with the first random challenge message previously generated by the energy storage system, it can be proved that the response is indeed from the target module holding the corresponding first private key, that is, the authenticity of the target module is verified, and therefore, it can be determined that the target module has passed the identity authentication. If the decrypted first digital signature is inconsistent with the first random challenge message previously generated by the energy storage system, it means that the identity authenticity of the target module is in doubt, and it can be determined that the target module has not passed the identity authentication.
[0091] In this embodiment, by double-verifying the validity and authenticity of the target module, the probability of an attacker accessing the energy storage system arbitrarily or in an impersonated manner can be effectively reduced, thereby improving the energy storage system's defense capability against external attacks and further improving the security of the energy storage system.
[0092] In an exemplary embodiment, the energy storage system encryption method further includes:
[0093] Receive a second random challenge message sent by the target module, and sign the second random challenge message based on a second private key stored in the energy storage system to obtain a second digital signature;
[0094] The second digital certificate and the second digital signature of the energy storage system are sent to the target module, so that the target module can verify the second digital signature according to the second random challenge message in the target module and the second public key in the second digital certificate when the second digital certificate is determined to be valid. When it is determined that the second digital signature verification is successful, it is determined that the energy storage system has passed the identity authentication.
[0095] Before the target module is connected to the energy storage system, the energy storage system needs to authenticate the target module, and the target module can also authenticate the energy storage system.
[0096] Exemplarily, before the target module is connected to the energy storage system, the target module may first generate a second random challenge message through a random number generator, and then send the generated second random challenge message to the energy storage system. After receiving the second random challenge message, the energy storage system may use the second private key of the energy storage system to sign the second random challenge message, obtain a second digital signature, and send the second digital signature and the second digital certificate of the energy storage system to the target module. After receiving the second digital certificate and the second digital signature sent by the energy storage system based on the second random challenge message, the target module first verifies the validity of the second digital certificate. The method for verifying the validity of the second digital certificate includes at least one of the following: by verifying the signature of the CA center in the second digital certificate, checking whether the certificate is issued by a trusted CA center, accessing the latest certificate revocation list issued by the CA center, querying the online certificate status protocol, confirming whether the second digital certificate has been marked as revoked and the current status of the second digital certificate, checking whether the identification information of the target module is consistent with the pre-authorization of the energy storage system, etc. After verifying that the second digital certificate is valid, the second public key can be extracted from the second digital certificate, and then the second digital signature can be decrypted based on the second public key, and the decrypted second digital signature can be compared with the second random challenge message previously generated by the energy storage system. If the decrypted second digital signature is consistent with the second random challenge message previously generated by the target module, it can be proved that the response is indeed from the energy storage system holding the corresponding second private key, that is, the authenticity of the energy storage system is verified, and therefore, it can be determined that the energy storage system has passed the identity authentication. If the decrypted second digital signature is inconsistent with the second random challenge message previously generated by the target module, it means that the identity authenticity of the energy storage system is in doubt, it can be determined that the energy storage system has not passed the identity authentication, and access to the energy storage system can be terminated.
[0097] As an example, the target module is connected to the energy storage system only when both the energy storage system and the target module pass identity authentication.
[0098] As an example, the second private key can be stored in the key management system corresponding to the energy storage system. The key management system refers to a device that can be physically isolated from any terminal, including a USB flash drive or a hardware security module. Since the key management system can be physically disconnected from any terminal, it can effectively reduce the probability of being attacked by a network, thereby protecting the data and information stored therein from being obtained by remote attackers.
[0099] Among them, the second digital certificate is pre-installed in the energy storage system before leaving the factory, and the second digital certificate contains at least the module identity information of the energy storage system and the second public key corresponding to the second private key. As an example, the second digital certificate can be a CA (Certificate Authority) certificate, which is signed by the CA center using the private key of the CA center to ensure the authenticity of the certificate. As an example, at the energy storage system end, the second digital certificate can be maintained in the key management system corresponding to the energy storage system, wherein the key management system refers to a device that can be physically isolated from any terminal, including a USB flash drive or a hardware security module. Since the key management system can be physically disconnected from any terminal, the second digital certificate can be prevented from being easily tampered with or extracted.
[0100] In this embodiment, after the target module is connected to the energy storage system, its security will also affect the security of the energy storage system. Through two-way authentication between the energy storage system and the target module, it can be ensured that both parties in subsequent communications are trustworthy, thereby improving the security of the target module, that is, the security of the energy storage system.
[0101] In an exemplary embodiment, assume that a BMS_A needs to access an EMS. Both need to confirm the identity of the other party to ensure the security of data transmission. BMS_A is built-in with a digital certificate issued by the CA center when it leaves the factory. The certificate contains the unique public key PU_A of BMS and the device ID (Identity document, identity information). The digital certificate header contains the digital signature of the CA center, which is used to verify the authenticity of the certificate. BMS_A sends an access request to EMS, which contains its digital certificate and the digital signature Sig_A (Challenge_EMS) of the random string "Challenge_EMS" generated instantly by EMS using the BMS_A private key PR_A. Before generating the digital signature for "Challenge_EMS", BMS_A can first request a timestamp from the timestamp server to prove the current time point to ensure the timeliness of the signature. After receiving the request, EMS first uses the public key of the CA center to verify the authenticity and validity period of the BMS_A certificate to confirm that the identity information of BMS_A is correct. Next, EMS uses the public key PU_A in the BMS_A certificate to verify the digital signature Sig_A(Challenge_EMS) of "Challenge_EMS". If the verification is successful, it indicates that the response is indeed from the real BMS_A. After the verification is successful, EMS sends a message Sig_EMS(Challenge_BMSA) containing the public key PU_EMS of EMS and the digital signature of the newly generated random string "Challenge_BMSA" using the EMS private key PR_EMS to BMS_A. Before generating the digital signature for "Challenge_BMSA", EMS first requests a timestamp from the timestamp server TSA to prove the current time point to ensure the timeliness of the digital signature. BMS_A verifies the signature of EMS using the EMS public key that is previously known or obtained through a secure channel. At the same time, verify the validity of the EMS digital certificate. BMS_A verifies the digital signature Sig_EMS(Challenge_BMSA) of "Challenge_BMSA" using the public key PU_EMS of EMS. Successful verification indicates that the response comes from the real EMS.
[0102] In an exemplary embodiment, encrypting the target configuration file to obtain the target encrypted configuration file includes steps S21 to S22. In which:
[0103] Step S21, obtaining a first static key and an initialization vector.
[0104] The first static key refers to a static key used for encrypting the configuration file, and the static key refers to a key that remains unchanged throughout the entire usage cycle. The first static key for encrypting the configuration file can be generated in advance in a secure environment, which is usually a high-strength random key, such as a 256-bit AES (Advanced Encryption Standard) key; then, the generated first static key is securely stored in a key management system. The key management system refers to a device that can be physically isolated from any terminal, including a USB flash drive or a hardware security module. Since the key management system can be physically disconnected from any terminal, it can effectively reduce the probability of being attacked by a network, thereby protecting the data and information stored therein from being obtained by remote attackers. The key management system can also have strict access control and audit functions. The initialization vector refers to a random or pseudo-random number sequence used to enhance the security of the encryption process.
[0105] Exemplarily, after detecting the target configuration file, an initialization vector can be randomly generated by a random number generator, and a communication connection is established with a key management system corresponding to the sender of the target configuration file, and a first static key is obtained from the key management system corresponding to the sender of the target configuration file.
[0106] Step S22: symmetrically encrypt the target configuration file based on the initialization vector and the first static key to obtain a target encrypted configuration file.
[0107] Exemplarily, the AES encryption algorithm can be used to symmetric encrypt the target configuration file based on the initialization vector and the first static key to obtain the target encrypted configuration file. The encryption mode of the symmetric encryption can be CBC (CipherBlock Chaining) mode, CFB (Cipher Feedback) mode, OFB (Output Feedback) mode or GCM (Galois / Counter Mode, an authenticated encryption mode) mode, etc., which can be determined according to actual conditions, and this embodiment does not limit this.
[0108] After obtaining the target encrypted configuration file, the encrypted target encrypted configuration file can be assembled with the initialization vector and sent to the target module. For example, the initialization vector can be spliced in the header of the target encrypted configuration file or other agreed positions. After receiving the assembled file, the target module splits it into the target encrypted configuration file and the initialization vector. Then, the decryption key corresponding to the first static key can be obtained from the key management system corresponding to the target module. Then, the AES encryption algorithm is used to decrypt the target encrypted configuration file based on the decryption key corresponding to the first static key and the received initialization vector to restore the target configuration file.
[0109] As an example, the target module may be a PMS, and the target configuration file may be generated by an EMS and sent to the PMS. The energy storage system may first obtain a first static key from the key management system corresponding to the EMS, and randomly generate an initialization vector, and then perform AES encryption on the target configuration file based on the first static key and the initialization vector to obtain a target encrypted configuration file, assemble the initialization vector in the header of the target encrypted configuration file, and transmit the assembled file to the PMS through a secure channel, wherein the secure channel includes HTTPS (Hypertext Transfer Protocol Secure), SSH (Secure Shell) or encrypted FTP (File Transfer Protocol). The PMS splits the received file into a target encrypted configuration file and an initialization vector, and obtains a decryption key corresponding to the first static key from the key management system corresponding to the PMS in a secure manner, and then uses the obtained decryption key and the received initialization vector to decrypt the target encrypted configuration file, restore the original configuration content, apply the decrypted target configuration file to the PMS, and perform the corresponding configuration update operation.
[0110] In this embodiment, the calculation amount of the encryption process can be effectively reduced by symmetric encryption. At the same time, the unpredictability of the target encrypted configuration file is improved by the initialization vector, thereby achieving the purpose of improving the efficiency of updating configuration information while ensuring the secure transmission of the configuration file.
[0111] In an exemplary embodiment, encrypting the data to be transmitted to obtain the encrypted transmission data includes steps S31 to S34. In which:
[0112] Step S31, obtaining a first security connection timestamp, a first random number, a first shared public value and a shared parameter.
[0113] Among them, the first security connection timestamp is the moment when the handshake between the target module determined by the sender of the data to be transmitted and the sender of the data to be transmitted is successful. After the target module is connected to the energy storage system, any functional module in the energy storage system can be used as a sender to transmit data to the target module, and the data can be transmitted through a secure channel. In the process of establishing a secure channel, the sender of the data to be transmitted will automatically handshake with the target module, and perform digital certificate verification, key exchange, and encryption algorithm selection through handshake. After the handshake is successful, both parties will receive handshake information with timestamps respectively, and the timestamp in the handshake information can be determined as the first security connection timestamp.
[0114] The first shared public value refers to the value calculated by the target module based on the second random number generated by the target module. The sending end of the data to be transmitted will also use a pre-agreed algorithm that is the same as the first shared public value to calculate the second shared public value based on the first random number, and send the second shared public value to the target module for the target module to calculate the session key. In this way, the first random number and the second random number are generated separately at both ends, but through the shared public value, the same shared key can be calculated, and then the same session key can be calculated based on the same shared key. For example, if the sending end of the data to be transmitted is PCS and the target module is EMS, EMS generates a private random number a, and PCS generates a private random number b; EMS calculates the public value A=g a mod p, PCS calculates the public value B=g b mod p, where g is the primitive root and p is a large prime number. These two values are pre-agreed shared parameters. Then, EMS and PCS exchange public values A and B. After EMS receives B, it calculates the shared key K. client =B a mod p, after receiving A, PCS calculates the shared key K server =A b mod p, due to B a mod p=(g b ) a modp=g ab mod p,A b mod p=(g a ) b mod p=g ab mod p, so the shared key K calculated by EMS and PCS client and K server are the same.
[0115] Shared parameters refer to the parameters required for encryption and decryption of data to be transmitted. They can be agreed upon in advance and stored securely, such as large prime numbers and primitive roots in the Diffie-Hellman key exchange protocol.
[0116] Exemplarily, after determining that the target module has passed the identity authentication, it is possible to monitor whether each functional module in the energy storage system needs to transmit data to the target module. Before any module needs to transmit data to the target module, the data to be transmitted can be obtained first. Then, a secure channel is established between the transmitter of the data to be transmitted and the target module. If the handshake is successful, the handshake information is obtained, and the first secure connection timestamp is extracted from the handshake information. Then, a first random number can be generated by a random number generator, and a communication connection is made with a key management system to obtain the shared parameters required for encryption during data transmission from the key management system.
[0117] Step S32: Perform a hash operation on the first security connection timestamp, the first random number and the shared parameter to obtain a session key.
[0118] Exemplarily, a preset hash function is used to calculate the session key based on the first security connection timestamp, the first random number and the shared parameter, wherein the hash function includes one of SHA256, SHA224, SHA384, SHA512 and the like.
[0119] Step S33: symmetrically encrypt the data to be transmitted based on the session key to obtain encrypted transmission data.
[0120] Exemplarily, the data to be transmitted is symmetrically encrypted based on the session key to obtain encrypted transmission data.
[0121] Then, the encrypted transmission data is sent to the target module. After receiving the encrypted transmission data, the target module can obtain the second security connection timestamp, the second random number and the shared parameter, perform a hash operation on the second security connection timestamp, the second random number and the shared parameter, and obtain the same session key as that calculated by the sender. Therefore, the received encrypted transmission data can be decrypted based on the session key to restore the data to be transmitted.
[0122] The second security connection timestamp is the same as or close to the first security connection timestamp. For hash operations, even if the second security connection timestamp is not exactly the same as the first security connection timestamp, as long as they are close enough and within the allowed time difference range, the calculated session key is still the same. As an example, after a successful handshake, the handshake success time difference of both parties can be verified by sending handshake messages with timestamps to each other. If the handshake success time difference exceeds the allowed threshold, the session establishment can be rejected or the time can be required to be resynchronized.
[0123] As an example, after the data to be transmitted is transmitted to the target module, the session ends and the session key can be safely destroyed to ensure the single use and security of the session key.
[0124] As an example, the target module may be EMS, the sender of the data to be transmitted may be BMS, and the data to be transmitted may be battery status data, including at least one of the monitoring data such as battery temperature, state of charge, total voltage, etc., that is, BMS transmits battery status data to EMS. In the energy storage system, BMS periodically sends the status data of the battery pack to EMS for analysis and decision-making. Before the start of this communication, BMS generates a session key through the SHA-256 algorithm based on the timestamp of the successful handshake (for example, 2024-06-05 14:00:00 UTC), the first random number generated by itself, the first shared public value sent by EMS, and the shared parameters shared with EMS. Use the newly generated session key to symmetrically encrypt the battery status data. The encrypted data is sent to EMS through the established TLS / SSL secure channel. During the transmission process, the data is encapsulated and encrypted by the TLS protocol to ensure the confidentiality and integrity of the data. After receiving the encrypted data, EMS uses the second random number generated by itself, the second shared public value sent by BMS, and the shared parameters shared with BMS to generate the same session key through the SHA-256 algorithm, decrypt the data based on the session key, restore the battery status data, and then analyze the battery status to decide whether to adjust the charging strategy or issue an alarm. After the battery status data is transmitted, the session key will be securely destroyed on both the BMS and EMS ends to ensure that the newly generated key is used for the next communication. Through this process, the monitoring data sent by PCS to EMS is effectively protected, preventing the data from being stolen or tampered with during transmission, while ensuring the real-time and efficiency of the system.
[0125] In this embodiment, since the amount of data to be transmitted is relatively large, the stacking encryption method can effectively reduce the computing power requirement and improve the encryption efficiency. At the same time, generating a session key through hash operation can improve the encryption strength and ensure the security of the data.
[0126] In an exemplary embodiment, encrypting the target control instruction to obtain the target encrypted control instruction includes steps S41 to S42. Among them:
[0127] Step S41: Based on the private second key of the sender of the target control instruction in the energy storage system, the instruction summary of the target control instruction is asymmetrically encrypted to generate a third digital signature.
[0128] The instruction summary is a fixed-length output obtained by operating the target control instruction using a hash function. The second private key refers to a private key used to encrypt the control instruction.
[0129] Exemplarily, after determining that the target module has passed identity authentication, it is possible to monitor whether each functional module in the energy storage system needs to send a target control instruction to the target module. Before any module needs to send a target control instruction to the target module, the target control instruction to be sent can be obtained first, and a hash operation can be performed on the target control instruction to obtain an instruction summary; then, a second private key is obtained from the key management system corresponding to the sending end of the target control instruction; the second private key is used to asymmetrically encrypt the instruction summary to generate a third digital signature.
[0130] Step S42: encapsulate the third digital signature and the target control instruction to obtain the target encrypted control instruction.
[0131] Exemplarily, the third digital signature and the target control instruction are encapsulated to obtain a target encrypted control instruction, and then the target encrypted control instruction is sent to the target module.
[0132] As an example, encapsulating the third digital signature and the target control instruction to obtain the target encrypted control instruction includes: encapsulating the third digital signature and the target control instruction to obtain an intermediate control instruction; symmetrically encrypting or asymmetrically encrypting the intermediate control instruction to obtain the target encrypted control instruction. The method for obtaining the key used for symmetrically encrypting the intermediate control instruction includes: obtaining a third security connection timestamp, a third random number, a third shared public value, and a shared parameter; performing a hash operation on the third security connection timestamp, the third random number, and the shared parameter to obtain the key used for symmetrically encrypting the intermediate control instruction.
[0133] As an example, after the target module receives the target encrypted control instruction, it uses the second public key of the sender to verify the validity of the third digital signature to confirm that the target control instruction has not been tampered with and is indeed from the agreed sender. The target module can then execute the target control instruction and return a confirmation message to the sender. The confirmation message is also encrypted and signed to ensure the closed-loop security of the communication.
[0134] As an example, the sending end may be EMS, the target module may be PCS, and the target control instruction may be a charge and discharge instruction, that is, EMS sends a charge and discharge instruction to PCS. EMS decides to send a charging instruction to PCS based on the grid demand and the state of the energy storage system. EMS may first generate a target control instruction, such as "start charging immediately, target SOC 80%", and then use the private second private key of EMS to sign the instruction summary of the target control instruction, generate a digital signature, encapsulate the target control instruction and the digital signature together, and perform symmetrical encryption on the entire package to obtain the target encrypted control instruction, and send the target encrypted control instruction to PCS through the established TLS / SSL secure channel. After receiving the target encrypted control instruction, PCS uses the second public key of EMS to verify the digital signature and confirm the authenticity of the target encrypted control instruction. If symmetrical encryption is also performed, the target encrypted control instruction is first decrypted and verified to be correct. PCS starts the charging process according to the instruction and feeds back the execution status data to EMS through the secure channel.
[0135] In this embodiment, the instruction summary of the target control instruction is asymmetrically encrypted. The calculation speed of asymmetric encryption is slow, but the encryption strength is high, which can effectively verify the source and integrity of the instruction, thereby ensuring the safe and accurate issuance of the control instruction.
[0136] In an exemplary embodiment, referring to Figure 3 The energy storage system can include acquisition layer, communication layer, control layer, and management layer. Each layer integrates corresponding encryption modules to ensure full-chain encryption protection of data from source to destination.
[0137] The data acquisition layer is responsible for collecting real-time operating data from sensors and devices, such as battery status, current and voltage. In the data acquisition layer, an encryption module can be integrated at the data acquisition point to perform preliminary encryption processing on the original data. Symmetric encryption algorithms can be used to quickly encrypt large amounts of data to ensure the security of data before storage and transmission. An external USB flash drive is used as a physical carrier of the encryption key to store temporary or long-term encryption keys.
[0138] The communication layer is used to ensure secure communication between different levels and with external systems, including the interaction between the energy storage system and the power grid, and the interaction between EMS, PMS, PCS, and BMS. The communication layer can use TLS / SSL protocol to ensure the security of network communication, and combine the key management system for identity authentication and data transmission encryption. Additional encryption is performed on the communication of sensitive data to enhance the confidentiality and integrity of the communication.
[0139] The control layer is used to receive instructions from the management layer and send control signals to specific devices (such as PCS, BMS, etc.) to implement system operations. The encryption module of the control layer can implement digital signatures and asymmetric encryption on control instructions, and use the private key stored in the external USB flash drive to sign to ensure the authenticity and non-repudiation of the instructions. At the same time, the transmission of control instructions should also be encrypted to prevent the instructions from being intercepted and tampered with.
[0140] The management level is responsible for overall monitoring, decision making, and issuing instructions. The encryption module of the management level is responsible for managing the encryption strategy at the system level, including key management, encryption algorithm selection, etc. The USB flash drive is used as a secure key storage medium to encrypt and protect internal data, logs, and issued instructions. In addition, when securely connecting with external systems, the USB flash drive is also used as a trust root to enhance the security of external interactions.
[0141] In an exemplary embodiment, referring to Figure 4 , the corresponding encryption interaction module can be embedded in each functional module connected to the energy storage system, and each encryption interaction module can communicate with the key management module.
[0142] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0143] Based on the same inventive concept, the embodiment of the present application also provides an energy storage system encryption device for implementing the energy storage system encryption method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more energy storage system encryption device embodiments provided below can refer to the limitations of the energy storage system encryption method above, and will not be repeated here.
[0144] In an exemplary embodiment, Figure 5 As shown, an energy storage system encryption device is provided, including: an identity authentication module 502, a first encryption module 504, a second encryption module 506 and a first encryption module 508, wherein:
[0145] An identity authentication module 502, configured to perform identity authentication on a target module in response to an access request sent by the target module to the energy storage system;
[0146] The first encryption module 504 is used to encrypt the target configuration file to obtain a target encrypted configuration file and send the target encrypted configuration file to the target module when it is determined that the target module has passed the identity authentication and a target configuration file for the target module is detected;
[0147] The second encryption module 506 is used to encrypt the data to be transmitted to obtain encrypted transmission data and send the encrypted transmission data to the target module when it is determined that the target module has passed the identity authentication and the data to be transmitted for the target module is detected;
[0148] The third encryption module 508 is used to encrypt the target control instruction to obtain the target encrypted control instruction and send the target encrypted control instruction to the target module when it is determined that the target module has passed the identity authentication and the target control instruction for the target module is detected.
[0149] In an exemplary embodiment, the identity authentication module 502 is further configured to:
[0150] Sending a first random challenge message to a target module, where the first random challenge message is used to generate a first digital signature, where the first digital signature is obtained by signing the first random challenge message by the target module based on a first private key stored in the target module;
[0151] Receiving a first digital certificate and a first digital signature sent by a target module;
[0152] When it is determined that the first digital certificate is valid, verifying the first digital signature according to the first random challenge message in the energy storage system and the first public key in the first digital certificate;
[0153] When it is determined that the first digital signature verification passes, it is determined that the target module passes the identity authentication.
[0154] In an exemplary embodiment, the identity authentication module 502 is further configured to:
[0155] Receive a second random challenge message sent by the target module, and sign the second random challenge message based on a second private key stored in the energy storage system to obtain a second digital signature;
[0156] The second digital certificate and the second digital signature of the energy storage system are sent to the target module, so that the target module can verify the second digital signature according to the second random challenge message in the target module and the second public key in the second digital certificate when the second digital certificate is determined to be valid. When it is determined that the second digital signature verification is successful, it is determined that the energy storage system has passed the identity authentication.
[0157] In an exemplary embodiment, the first encryption module 504 is further configured to:
[0158] Obtaining a first static key and an initialization vector;
[0159] The target configuration file is symmetrically encrypted based on the initialization vector and the first static key to obtain a target encrypted configuration file.
[0160] In an exemplary embodiment, the second encryption module 506 is further configured to:
[0161] Obtaining a first security connection timestamp, a first random number, a first shared public value, and a shared parameter;
[0162] Performing a hash operation on the first security connection timestamp, the first random number, and the shared parameter to obtain a session key;
[0163] The data to be transmitted is symmetrically encrypted based on the session key to obtain encrypted transmission data.
[0164] In an exemplary embodiment, the third encryption module 508 is further configured to:
[0165] Based on the second private key private to the sender of the target control instruction in the energy storage system, asymmetric encryption is performed on the instruction summary of the target control instruction to generate a third digital signature;
[0166] The third digital signature and the target control instruction are encapsulated to obtain the target encrypted control instruction.
[0167] Each module in the energy storage system encryption device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0168] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a method for encrypting an energy storage system is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0169] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0170] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0171] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0172] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0173] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0174] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0175] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0176] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. An energy storage system encryption method, characterized in that: The method comprises: In response to an access request sent by the target module to the energy storage system, performing identity authentication on the target module; When it is determined that the target module passes identity authentication and a target configuration file for the target module is detected, encrypting the target configuration file to obtain a target encrypted configuration file, and sending the target encrypted configuration file to the target module; When it is determined that the target module passes the identity authentication and data to be transmitted for the target module is detected, the data to be transmitted is encrypted to obtain encrypted transmission data, and the encrypted transmission data is sent to the target module; When it is determined that the target module passes the identity authentication and a target control instruction for the target module is detected, the target control instruction is encrypted to obtain a target encrypted control instruction, and the target encrypted control instruction is sent to the target module.
2. The method according to claim 1, characterized in that: The performing identity authentication on the target module includes: Sending a first random challenge message to the target module, where the first random challenge message is used to generate a first digital signature, where the first digital signature is obtained by the target module signing the first random challenge message based on a first private key stored in the target module; Receiving a first digital certificate and a first digital signature sent by the target module; When it is determined that the first digital certificate is valid, verifying the first digital signature according to a first random challenge message in the energy storage system and a first public key in the first digital certificate; When it is determined that the first digital signature verification passes, it is determined that the target module passes identity authentication.
3. The method according to claim 1, characterized in that The method further comprises: receiving a second random challenge message sent by the target module, and signing the second random challenge message based on a second private key stored in the energy storage system to obtain a second digital signature; The second digital certificate and the second digital signature of the energy storage system are sent to the target module, so that when the target module determines that the second digital certificate is valid, the second digital signature is verified according to the second random challenge message in the target module and the second public key in the second digital certificate; when it is determined that the second digital signature verification is successful, it is determined that the energy storage system has passed the identity authentication.
4. The method according to claim 1, characterized in that: The step of encrypting the target configuration file to obtain a target encrypted configuration file includes: Obtaining a first static key and an initialization vector; The target configuration file is symmetrically encrypted based on the initialization vector and the first static key to obtain a target encrypted configuration file.
5. The method according to claim 1, characterized in that The step of encrypting the data to be transmitted to obtain encrypted transmission data includes: Obtaining a first security connection timestamp, a first random number, a first shared public value, and a shared parameter; Performing a hash operation on the first security connection timestamp, the first random number, and the shared parameter to obtain a session key; The data to be transmitted is symmetrically encrypted based on the session key to obtain encrypted transmission data.
6. The method according to claim 1, characterized in that The step of encrypting the target control instruction to obtain the target encrypted control instruction includes: Based on a second private key private to a sender of the target control instruction in the energy storage system, asymmetric encryption is performed on the instruction summary of the target control instruction to generate a third digital signature; The third digital signature and the target control instruction are encapsulated to obtain a target encrypted control instruction.
7. An energy storage system encryption device, characterized in that: The device comprises: An identity authentication module, configured to perform identity authentication on the target module in response to an access request sent by the target module to the energy storage system; A first encryption module is used to encrypt the target configuration file to obtain a target encrypted configuration file, and send the target encrypted configuration file to the target module when it is determined that the target module passes the identity authentication and a target configuration file for the target module is detected; A second encryption module is used to encrypt the data to be transmitted to obtain encrypted transmission data, and send the encrypted transmission data to the target module when it is determined that the target module has passed the identity authentication and the data to be transmitted for the target module is detected; The third encryption module is used to encrypt the target control instruction to obtain the target encrypted control instruction and send the target encrypted control instruction to the target module when it is determined that the target module has passed the identity authentication and the target control instruction for the target module is detected.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Cooperative control method of solid-state transformer cluster system
CN122178415A
A cooperative control method of a solid-state transformer cluster system
CN122178415B