Encryption protection methods, devices, and energy storage systems for energy storage systems

By storing the root key in the non-volatile storage medium of the energy storage system and generating working keys and temporary keys for encryption protection, the vulnerability of the root key to attacks is solved, thus improving the security of the energy storage system.

CN121051810BActive Publication Date: 2026-03-06ZHEJIANG JINKO ENERGY STORAGE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511589376.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-03
Publication Date
2026-03-06
Estimated Expiration
2045-11-03

AI Technical Summary

Technical Problem

Existing encryption technologies for energy storage systems rely on root keys, which are vulnerable to attacks, resulting in insufficient security and an inability to effectively protect the control commands and operational data of the energy storage system.

Method used

The root key is stored in the non-volatile storage medium of the energy storage system. The working key is loaded through the protection certificate, and a temporary key is generated to encrypt and protect the working transactions, thus preventing the root key from being exposed.

Benefits of technology

This achieves effective protection of the root key, improves the security of the energy storage system, and prevents attackers from stealing sensitive data and control commands.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121051810B_ABST
    Figure CN121051810B_ABST
Patent Text Reader

Abstract

This application relates to an encryption protection method, apparatus, and energy storage system for an energy storage system. The method includes: generating a root key in a non-volatile storage medium of the energy storage system; in response to receiving a protection credential, loading the root key, generating a working key based on the root key, and sending the working key to the volatile storage medium of the energy storage system; in response to the energy storage system executing a working transaction, generating a temporary key corresponding to the working transaction based on the working key; and encrypting the working transaction using the temporary key. With this method, the root key is stored locally (in a non-volatile storage medium), and the encryption protection of working transactions in the energy storage system is performed by the working key and the temporary key. During the encryption process of the working transaction, the root key is not exposed, thereby achieving effective protection of the root key.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security technology, and in particular to an encryption protection method, device and energy storage system for an energy storage system. Background Technology

[0002] In modern energy storage systems, encryption technology is becoming increasingly crucial to ensure the security of various control commands and operational data. Typically, such encryption relies on one or more root keys at the top of a trust chain. If the root key is compromised, an attacker can derive all subordinate keys, thereby decrypting the energy storage system's historical data and potentially causing serious consequences for the system and even the entire power grid.

[0003] In some traditional encryption techniques that utilize software storage solutions, the root key is stored as a regular file in the operating system's file system, relying on the energy storage system's access permissions for protection. This approach is relatively inexpensive but has poor security. Once an attacker gains high-level access to the energy storage system, they can steal the root key through various methods such as memory scanning and debugger injection.

[0004] It is evident that encryption techniques using traditional software storage schemes are ineffective against attacks and fail to provide effective protection for the root key. Summary of the Invention

[0005] Therefore, it is necessary to provide an encryption protection method, device, and energy storage system for energy storage systems to address the aforementioned technical problems and achieve effective protection of the root key.

[0006] Firstly, this application provides a method for encrypted protection of an energy storage system, including:

[0007] Generate a root key in the non-volatile storage medium of the energy storage system;

[0008] In response to receiving the protection credential, the root key is loaded, a working key is generated based on the root key, and the working key is sent to the volatile storage medium of the energy storage system.

[0009] In response to the energy storage system executing a work transaction, a temporary key corresponding to the work transaction is generated based on the work key;

[0010] The work transactions are encrypted and protected using the temporary key.

[0011] In one embodiment, the working transaction includes external session communication transactions and internal process call transactions of the energy storage system, the temporary key includes a first temporary key and a second temporary key, and the step of generating a temporary key corresponding to the working transaction based on the working key in response to the energy storage system executing the working transaction includes:

[0012] In response to the energy storage system executing the external session communication transaction, a first temporary key is generated based on the working key; wherein, the first temporary key is used to encrypt and protect the external session communication transaction;

[0013] In response to the energy storage system executing the internal process call transaction, a second temporary key is generated based on the working key; wherein the second temporary key is used to encrypt and protect the internal process call transaction.

[0014] In one embodiment, the step of encrypting and protecting the work transaction using the temporary key includes:

[0015] When the working transaction is the external session communication transaction, a session key corresponding to the transport layer security protocol session of the energy storage system is generated based on the first temporary key to encrypt and protect the external session communication transaction.

[0016] In one embodiment, the step of encrypting and protecting the work transaction using the temporary key includes:

[0017] In the case that the work transaction is the internal process call transaction, at least one of the following is encrypted using the second temporary key: the communication message between the internal components of the energy storage system, the connection of the energy storage system to the local database, and the private key of the local certificate of the energy storage system, in order to encrypt and protect the internal process call transaction.

[0018] In one embodiment, generating the root key in the non-volatile storage medium of the energy storage system includes:

[0019] An encrypted partition is created in the non-volatile storage medium of the energy storage system using a Linux unified key setting;

[0020] The root key is generated in the encrypted partition.

[0021] In one embodiment, after encrypting the work transaction with the temporary key, the method further includes:

[0022] Upon determining that the work transaction has ended, the temporary key corresponding to the work transaction is destroyed.

[0023] In one embodiment, after encrypting the work transaction with the temporary key, the method further includes:

[0024] If the key update conditions are met, at least one of the root key or the working key is updated; wherein the key update conditions are related to the operating parameters of the energy storage system or the encryption parameters of the working key.

[0025] In one embodiment, the operating parameters include the operating time of the energy storage system, and the method further includes:

[0026] Obtain the operating time of the energy storage system;

[0027] If the runtime is greater than or equal to a preset runtime threshold, the key update condition is determined to be satisfied.

[0028] In one embodiment, the operating parameters include the number of charge-discharge cycles of the energy storage system, and the method further includes:

[0029] Obtain the number of charge and discharge cycles of the energy storage system;

[0030] If the number of charge / discharge cycles is greater than or equal to a preset charge / discharge cycle threshold, the key update condition is determined to be met.

[0031] In one embodiment, the encryption parameters include the amount of encrypted data of the working key, and the method further includes:

[0032] Obtain the amount of encrypted data for the working key;

[0033] If the amount of encrypted data in the working key is greater than or equal to a preset threshold for the amount of encrypted data, the key update condition is determined to be met.

[0034] In one embodiment, after generating the root key in the non-volatile storage medium of the energy storage system, the method further includes:

[0035] In response to the identification of a critical operation, the system instructs the input of the protection credentials; wherein the critical operation includes a system configuration operation for the energy storage system, an energy storage configuration operation for the energy storage system, and a confidentiality configuration operation for the energy storage system.

[0036] Secondly, this application provides an encryption protection device for an energy storage system, comprising:

[0037] The first generation module is used to generate a root key in the non-volatile storage medium of the energy storage system;

[0038] The second generation module is used to load the root key in response to receiving the protection credential, generate a working key based on the root key, and send the working key to the volatile storage medium of the energy storage system.

[0039] The third generation module is used to generate a temporary key corresponding to the work transaction based on the work key in response to the energy storage system executing a work transaction.

[0040] An encryption protection module is used to encrypt and protect the work transactions using the temporary key.

[0041] Thirdly, this application provides an energy storage system, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any of the embodiments of the first aspect above.

[0042] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the embodiments of the first aspect above.

[0043] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any of the embodiments of the first aspect above.

[0044] The aforementioned encryption protection method, device, and energy storage system store the root key in the non-volatile storage medium of the energy storage system. During encryption, the root key is invoked through the protection credential to create a working key in the volatile storage medium of the energy storage system. Then, a temporary key is created based on the working key to encrypt and protect the work transactions executed by the energy storage system. Therefore, in the technical solution provided in this application, the root key is stored locally (in a non-volatile storage medium), and the encryption protection of work transactions in the energy storage system is performed by the working key and the temporary key. During the encryption process of work transactions, the root key is not exposed, thereby achieving effective protection of the root key. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a flowchart illustrating an encryption protection method for an energy storage system in one embodiment;

[0047] Figure 2 This is a flowchart illustrating the encryption protection method for an energy storage system in another embodiment;

[0048] Figure 3 This is a flowchart illustrating the encryption protection method for an energy storage system in yet another embodiment;

[0049] Figure 4 This is a flowchart illustrating the encryption protection method for an energy storage system in yet another embodiment;

[0050] Figure 5 This is a flowchart illustrating the encryption protection method for an energy storage system in yet another embodiment;

[0051] Figure 6 This is a structural block diagram of the encryption protection device for an energy storage system in one embodiment;

[0052] Figure 7 This is an internal structural diagram of the control equipment of an energy storage system in one embodiment. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0054] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0055] In one embodiment, such as Figure 1As shown, an encryption protection method for an energy storage system is provided. This embodiment illustrates the application of this method to the control terminal of an energy storage system. An energy storage system refers to a system that stores energy in a certain form through a specific medium or device and releases it in a specific form when needed. The control terminal of an energy storage system refers to a terminal deployed at the user end of the energy storage system for managing the system. It can both collect data at the user end and provide human-machine interaction for the user. The user end of the energy storage system refers to the deployment location of the energy storage system on the user side, which can specifically consist of energy storage cabinets, an energy management system, communication equipment, and the control terminal. The control terminal can specifically be a smart device such as a personal computer, laptop, smartphone, or tablet computer, which monitors the energy storage system. In this embodiment, the method includes the following steps S110 to S140, wherein:

[0056] S110: Generate the root key in the non-volatile storage medium of the energy storage system.

[0057] Specifically, in response to a root key generation command, the management terminal of the energy storage system generates a root key in the non-volatile storage medium of the energy storage system. The root key generation command instructs the management terminal of the energy storage system to generate a root key. In some feasible embodiments, the root key generation command is generated when the user performs initial security configuration on the management terminal of the energy storage system; initial security configuration refers to the user's first active activation of the key protection procedure for the energy storage system. In other feasible embodiments, the root key generation command is automatically generated during the initial initialization of the energy storage system.

[0058] The non-volatile storage medium of an energy storage system can be the non-volatile storage medium on the control terminal of the energy storage system. Specifically, the non-volatile storage medium on the control terminal of the energy storage system is the storage hardware used for persistent data storage. As an example, the non-volatile storage medium on the control terminal of the energy storage system can be an embedded MultiMediaCard (eMMC), a Solid-State Drive (SSD), NOR / NAND flash memory chips, or other types of persistent storage hardware.

[0059] The root key is the highest-level key in key management. It is used to derive various secondary keys, such as working keys or various temporary keys, when encrypting and protecting energy storage systems. The root key is generated in the non-volatile storage medium of the energy storage system and, in most cases, stored in the non-volatile storage medium of the energy storage system in a static state, thereby maximizing the security of the root key.

[0060] As an example, the control terminal of the energy storage system uses the Linux operating system, and the root key can be generated by the Linux kernel of the Linux operating system. For example, the control terminal of the energy storage system can generate the root key based on the Cryptographically Secure Pseudorandom Number Generator (CSPRNG) maintained by the Linux kernel, or it can generate the root key based on the Linux Unified Key Setup (LUKS) technology carried in the Linux kernel.

[0061] S120: In response to receiving the protection certificate, load the root key, generate the working key based on the root key, and send the working key to the volatile storage medium of the energy storage system.

[0062] Specifically, the user interacts with the energy storage system's management terminal and inputs a protection credential. After the management terminal recognizes the input protection credential, it loads the root key from the energy storage system's non-volatile storage medium, making the root key readable. It then performs a one-way calculation on the root key using a key derivation function to obtain the corresponding working key and sends the working key to the energy storage system's volatile storage medium for subsequent encryption protection based on the working key.

[0063] The protection credential is used to load the root key. Upon receiving the protection credential, the energy storage system's management terminal loads the root key from the energy storage system's non-volatile storage medium, thus transforming the root key from its static state at storage to its operational state. As an example, the protection credential can exist in the form of a protection password. To further ensure the security of the root key, the protection credential is stored according to the principle of zero-knowledge protection, meaning it is not stored anywhere within the energy storage system. As another example, the energy storage system's management terminal simultaneously generates a protection credential in the form of a protection password when generating the root key. After showing the protection password to the user, the management terminal immediately clears the protection password. After learning the protection password, the user can either rely solely on memory to save it, or record or write the protection password to a physical medium, such as an external, physically isolated USB flash drive or other independent device.

[0064] The working key is the second-highest level key in key management. It is used to distribute various secondary keys, such as temporary keys, to encrypt and protect actual operational transactions within the energy storage system. The working key is generated based on the loaded root key. In some embodiments, the working key is calculated one-way by processing the root key through a key derivation function. This function can be based on a hash-based message authentication code (HMAC) function, such as HMAC-SHA3. In this case, the root key, acting as the master secret, is used for one-way calculation via HMAC-SHA3 to obtain the corresponding working key.

[0065] The volatile storage medium of an energy storage system can be the volatile storage medium on the control terminal of the energy storage system. Specifically, the volatile storage medium on the control terminal of the energy storage system is the non-persistent storage hardware used as runtime memory. As an example, the volatile storage medium on the control terminal of the energy storage system can be random access memory (RAM), external cache memory, or other types of non-persistent storage hardware.

[0066] S130: In response to the energy storage system executing a work transaction, a temporary key corresponding to the work transaction is generated based on the work key.

[0067] Specifically, the control terminal of the energy storage system monitors the execution of various tasks in the energy storage system. When it is determined that the energy storage system is executing a task, a temporary key is generated based on the working key. The generated temporary key corresponds to the currently executed task.

[0068] A work transaction is any specific operation or task of an energy storage system. Work transactions can be broadly divided into external session communication transactions and internal process call transactions. Work transactions in which the energy storage system communicates with external entities are external session communication transactions, while work transactions in which the energy storage system communicates and calls data between its own internal processes are internal process call transactions.

[0069] A temporary key is the lowest level of key in key management, used to actually perform encryption protection actions on working transactions. The temporary key is generated based on the working key. In some embodiments, the working key is processed by a key derivation function to unidirectionally calculate the temporary key. The key derivation function can be a function based on a hash message authentication code, such as HMAC-SHA3. In this case, the working key, as the master secret, is used to unidirectionally calculate the corresponding temporary key using HMAC-SHA3. The temporary key corresponds to the working transaction it needs to encrypt. Specifically, a temporary key is used to encrypt only one corresponding working transaction. When the energy storage system's management terminal generates a temporary key due to the execution of a working transaction, this temporary key is used to encrypt and protect the working transaction that triggered its generation.

[0070] S140: Encrypt and protect work transactions using a temporary key.

[0071] Specifically, after generating a temporary key corresponding to the work transaction based on the work key, the work transaction is encrypted and protected based on the generated temporary key.

[0072] In the aforementioned encryption protection method for energy storage systems, the root key is stored in the non-volatile storage medium of the energy storage system. During encryption, the root key is invoked through the protection credential to create a working key in the volatile storage medium of the energy storage system. Then, a temporary key is created based on the working key to encrypt and protect the work transactions executed by the energy storage system. Therefore, in the technical solution provided in this application, the root key is stored locally (in a non-volatile storage medium), and the encryption protection of work transactions in the energy storage system is performed by the working key and the temporary key. During the encryption process of work transactions, the root key is not exposed, thus achieving effective protection of the root key.

[0073] In one exemplary embodiment, such as Figure 2 As shown, the working transactions include external session communication transactions and internal process call transactions of the energy storage system. The temporary keys include a first temporary key and a second temporary key. S130 includes S210 to S220, wherein:

[0074] S210: In response to the energy storage system executing an external session communication transaction, a first temporary key is generated based on the working key.

[0075] The first temporary key is used to encrypt and protect external session communication transactions.

[0076] S220: In response to the energy storage system executing an internal process call transaction, a second temporary key is generated based on the working key.

[0077] The second temporary key is used to encrypt and protect internal process call transactions.

[0078] Specifically, the control terminal of the energy storage system monitors the execution of work transactions and determines the specific type of the work transaction during execution, classifying it as either an external session communication transaction or an internal process call transaction. When the energy storage system executes an external session communication transaction, the control terminal generates a corresponding first temporary key based on the working key in the volatile storage medium to encrypt and protect the external session communication transaction. When the energy storage system executes an internal process call transaction, the control terminal generates a corresponding second temporary key based on the working key in the volatile storage medium to encrypt and protect the internal process call transaction.

[0079] As an example, the control terminal of an energy storage system can determine the specific type of a work transaction based on the interaction object indicated by the work transaction during its execution, identifying whether the currently executing work transaction is an external session communication transaction or an internal process call transaction. For instance, when the interaction object indicated by the work transaction is an external entity, the work transaction is determined to be an external session communication transaction. As another example, when the interaction object indicated by the work transaction is an internal process, the work transaction is determined to be an internal process call transaction.

[0080] Both the first temporary key and the second temporary key are generated based on the working key. The generation methods of the first temporary key and the second temporary key can be the same or different, which can be set by the user and are not limited here.

[0081] In this embodiment, work transactions are distinguished into external session communication transactions and internal process call transactions, and different temporary keys are derived for each. This ensures that even if a part of the energy storage system is attacked, the impact on the energy storage system is limited to the corresponding local area and will not spread to the core business logic and sensitive data storage of the energy storage system, which helps to improve the overall anti-attack capability of the energy storage system.

[0082] In one exemplary embodiment, such as Figure 3 As shown, S210 includes S310, wherein:

[0083] S310: When the working transaction is an external session communication transaction, generate a session key corresponding to the transport layer security protocol session of the energy storage system based on the first temporary key, so as to encrypt and protect the external session communication transaction.

[0084] Specifically, when the energy storage system is performing a work transaction, if the control terminal of the energy storage system recognizes that the currently executed work transaction is an external session communication transaction, it generates a first temporary key based on the work key, and generates a session key corresponding to the Transport Layer Security (TLS) session of the energy storage system based on the first temporary key, and uses the session key to encrypt and protect the external session communication transaction.

[0085] The transport layer security protocol of an energy storage system is a security protocol that the energy storage system follows when communicating with external entities. For example, when the energy storage system connects and communicates with an external cloud platform or an external remote operation and maintenance terminal, it interacts in accordance with the transport layer security protocol and establishes a transport layer security protocol session.

[0086] The session key corresponding to a Transport Layer Security (TLS) session is a temporary symmetric encryption key used for a single TLS session. It is jointly generated by the client (i.e., the energy storage system) and the server (i.e., the external entity) during the TLS handshake process and is valid only during that single TLS session. As an example, when the energy storage system communicates with any external entity, a TLS handshake is first performed. During this handshake, the energy storage system exchanges a first temporary key as an encryption parameter with the external entity. This allows both the energy storage system and the external entity to calculate the same session key based on the first temporary key and the handshake message, and then use this session key to encrypt subsequent TLS sessions.

[0087] In this embodiment, the security of external session communication transactions is decoupled from the core key system of the energy storage system. The first temporary key itself is not directly used for data encryption, but rather serves as a one-time session key. Even if the session key of a certain transport layer security protocol session is cracked for some reason, an attacker can only decrypt the traffic of that transport layer security protocol session, but cannot deduce the first temporary key in reverse, let alone access the upper-layer working key and root key. Therefore, the technical solution provided by this embodiment effectively protects external session communication transactions while also ensuring the security of the core key system of the energy storage system.

[0088] In one exemplary embodiment, such as Figure 4 As shown, S220 includes S410, wherein:

[0089] S410: When the working transaction is an internal process call transaction, at least one of the following is encrypted using a second temporary key: communication messages between internal components of the energy storage system, the connection of the energy storage system to the local database, and the private key of the local certificate of the energy storage system, to provide encrypted protection for the internal process call transaction.

[0090] Specifically, when the energy storage system executes a task, if the control terminal of the energy storage system identifies the currently executed task as an internal process call transaction, it generates a second temporary key based on the working key and uses the second temporary key to encrypt and protect various internal process call transactions. The operating system of the energy storage system's control terminal typically runs multiple different internal processes, such as data acquisition processes, control command execution processes, and local database service processes. Communication and data calls between these internal processes constitute internal process call transactions. These internal process call transactions include at least one of the following: communication messages between internal components of the energy storage system, the energy storage system's connection to the local database, and the private key of the energy storage system's local certificate.

[0091] The communication messages between internal components of an energy storage system can specifically be inter-process communication (IPC) messages between two internal components, such as the IPC messages exchanged between the data acquisition process and the control command execution process. When transmitting communication messages between two internal components, a second temporary key directly encrypts the communication messages to ensure their security. Since the internal components of the energy storage system transmit business data through these communication messages, the encryption of these messages prevents attackers from eavesdropping on the communication messages between internal components through malicious processes, ensuring that the business data transmitted between internal components is difficult to steal.

[0092] Energy storage systems may store historical operational data, alarm logs, and other business data in a local database such as SQLite. A second temporary key is used to encrypt the credentials for connecting to the local database, or the entire local database file is encrypted. This prevents attackers from directly copying and analyzing the local database content after gaining file system read access, thus avoiding the theft of business data stored in the local database.

[0093] The energy storage system includes a local certificate and its corresponding private key for authentication. The local certificate is used for identity verification and encrypted sessions, while the private key is used to decrypt data encrypted by the local certificate. As an example, the energy storage system is equipped with an X.509 certificate and its corresponding private key for verifying the identity of local devices and encrypting sessions or data. A second temporary key is used to encrypt and store the private key corresponding to the local certificate. When the private key is needed for a signing operation, it is temporarily decrypted into memory using the second temporary key, and the plaintext copy in memory is immediately cleared after use. This minimizes the exposure of the plaintext private key of the local certificate.

[0094] In this embodiment, the second temporary key encrypts and protects various internal process call transactions, making it difficult for attackers to steal business data during the internal process interaction of the energy storage system, thus ensuring the security of various internal process call transactions in the energy storage system.

[0095] In an exemplary embodiment, S110 includes S510 to S520, wherein:

[0096] S510: Creates encrypted partitions on the non-volatile storage media of the energy storage system using Linux unified key settings.

[0097] S520: Generate the root key in the encrypted partition.

[0098] Specifically, the root key is generated based on Linux unified key setting technology. The control terminal of the energy storage system creates an encrypted partition in the non-volatile storage medium of the energy storage system based on Linux unified key setting, and creates the root key in the encrypted partition.

[0099] As an example, the control terminal of the energy storage system uses Linux unified key setting technology based on the dm-crypt kernel module. It partitions an independent physical partition as an encrypted partition on the non-volatile storage medium of the energy storage system and performs LUKS formatting on this encrypted partition. During the LUKS formatting process, a high-strength encryption key is generated as the root key, and a protection credential corresponding to the root key is synchronously generated to encrypt both the encrypted partition and the root key. The encrypted root key, along with other metadata, is stored in the partition header of the encrypted partition.

[0100] As an example, when a user enters the corresponding protection credential through the energy storage system's management terminal, the terminal uses this credential to decrypt the encrypted partition header and load the root key from the encrypted partition. The management terminal then uses the decrypted root key to create a virtual device mapping in memory. Subsequently, the management terminal can mount the file system on this virtual device mapping and read the root key from it into memory, thus deriving the corresponding working key from the root key.

[0101] In existing technologies, maintaining the root key in the non-volatile storage medium of a device typically relies on a Trusted Platform Module (TPM) or Hardware Security Module (HSM) chip. Such solutions are costly and difficult to adapt to the management terminals of mainstream domestically produced energy storage systems. In this embodiment, a Linux unified key setting technology is used, relying on the Linux kernel of the energy storage system's management terminal to generate the root key in the non-volatile storage medium of the energy storage system. This is applicable to most management terminals of energy storage systems using the Linux operating system, is simple to implement, low-cost, and highly adaptable, enabling secure storage of the root key at a relatively low cost and providing good compatibility with management terminals of domestically produced energy storage systems.

[0102] In an exemplary embodiment, after S140, S610 is further included, wherein:

[0103] S610: When it is determined that the work transaction has ended, destroy the temporary key corresponding to the work transaction.

[0104] Specifically, when a task begins to be executed, the control terminal of the energy storage system monitors the execution status of the task. When the task ends, it performs a temporary key destruction operation to destroy the temporary key in the volatile storage medium.

[0105] Temporary key destruction refers to the secure erasure of the data corresponding to a temporary key from volatile storage media to prevent the data from being recovered by subsequent memory analysis tools. As an example, the control terminal of an energy storage system locates the data area storing the temporary key. Upon detecting the end of the transaction corresponding to the temporary key, it writes random data or all-zero data to this data area, and then releases the data area, completing the temporary key destruction operation.

[0106] As an example, when an energy storage system executes an external session communication transaction, a first temporary key is generated to encrypt and protect the transaction. This external session communication transaction is specifically a Transport Layer Security (TLS) session. When the energy storage system's control terminal detects that the TLS session has been normally closed or disconnected due to timeout, it performs a temporary key destruction operation, immediately destroying the first temporary key corresponding to the current TLS session and simultaneously destroying all session keys derived from that first temporary key.

[0107] As an example, the energy storage system executes an internal process call transaction. When the internal process call transaction begins execution, a second temporary key is generated to encrypt and protect it. Specifically, the internal process call transaction is a connection of the energy storage system to a local database. After the energy storage system's control terminal detects that a certain number of local database queries have been completed, it disconnects from the local database. Upon disconnection, the control terminal performs a temporary key destruction operation, immediately destroying the second temporary key corresponding to the current connection to the local database.

[0108] In this embodiment, the lifecycle of the temporary key is strictly bound to the lifecycle of the working transaction, which shortens the residence time of the temporary key in the volatile storage medium and directly combats key theft techniques using memory snapshots, core dumps or cold start attacks, thereby improving the security of the energy storage system.

[0109] In one exemplary embodiment, such as Figure 5 As shown, after S140, S710 is also included, wherein:

[0110] S710: If it is determined that the key update conditions are met, update at least one of the root key or the working key.

[0111] The key update conditions are related to the operating parameters of the energy storage system or the encryption parameters of the working key.

[0112] Specifically, the control terminal of the energy storage system continuously monitors whether the key update conditions are met. After the control terminal identifies that the key update conditions are met, it updates at least one of the root key or the working key. In particular, the control terminal of the energy storage system can update the root key alone, the working key alone, or both the root key and the working key simultaneously, provided that the key update conditions are met.

[0113] Key update conditions are related to the operating parameters of the energy storage system, which refer to the parameters generated during the actual operation of the energy storage system. As an example, the operating parameters of the energy storage system may include the operating time of the energy storage system, the number of charge and discharge cycles, the number of charge and discharge command receptions, the aging status of the energy storage system, and so on.

[0114] The key update conditions are also related to the encryption parameters of the working key. The encryption parameters of the working key refer to the specific parameters used when the working key is actually encrypting data or deriving secondary keys (such as the first temporary key and the second temporary key). As an example, the encryption parameters of the working key may include the amount of data encrypted by the working key, the number of times the first temporary key and the second temporary key are generated, the number of times the working key is called, and so on.

[0115] As an example, key update conditions include root key update conditions. If the root key update conditions are met, the root key is updated. The root key update condition can be that the energy storage system's management terminal receives a manual key update operation from a user.

[0116] As an example, the key update conditions include working key update conditions. If the working key update conditions are met, the working key is updated. These working key update conditions could be: the energy storage system's management terminal detecting that the energy storage system's operating time is greater than or equal to a pre-set operating time threshold; the energy storage system's management terminal detecting that the energy storage system's charge / discharge count is greater than or equal to a pre-set charge / discharge count threshold; or the energy storage system's management terminal detecting that the amount of encrypted data in the working key is greater than or equal to a pre-set encrypted data amount threshold.

[0117] When updating the root key or working key, the original root key and working key are destroyed, and subsequent encryption protection of the energy storage system is based on the newly generated root key and working key.

[0118] In this embodiment, at least one of the root key or working key is updated when the key update conditions are met, and the key update conditions are associated with the operating parameters of the energy storage system or the encryption parameters of the working key. This embodiment considers the actual operation of the energy storage system and the operation of its core key system, enabling lifecycle management of the root key and working key, and ensuring that the energy storage system can use relatively effective root keys and working keys for encryption protection.

[0119] In an exemplary embodiment, the method further includes S810 to S820, wherein:

[0120] S810: Obtain the runtime of the energy storage system.

[0121] S820: If the runtime is greater than or equal to a preset runtime threshold, determine that the key update condition is met.

[0122] Specifically, the energy storage system's control terminal continuously monitors the system's runtime and synchronously compares it with a user-preset runtime threshold. If the runtime is greater than or equal to the preset runtime threshold, it determines that the key update condition is met; if the runtime is less than the preset runtime threshold, it determines that the key update condition is not met.

[0123] The runtime of an energy storage system refers to the cumulative runtime from its last startup to the present, or the cumulative runtime since the last key update. The runtime threshold can be predetermined by the user based on actual conditions and stored in the energy storage system's management terminal. It is retrieved after the management terminal obtains the system's runtime. As an example, the runtime threshold could be set to 180 days.

[0124] In this embodiment, the root key or working key is updated periodically to ensure that the root key or working key is not used indefinitely, thus ensuring the security of the core key system of the energy storage system.

[0125] In an exemplary embodiment, the method further includes S910 to S920, wherein:

[0126] S910: Obtain the number of charge and discharge cycles of the energy storage system.

[0127] S920: If the number of charge / discharge cycles is greater than or equal to a preset charge / discharge cycle threshold, determine that the key update condition is met.

[0128] Specifically, the energy storage system's control terminal continuously monitors the number of charge and discharge cycles of the energy storage system and simultaneously compares the number of charge and discharge cycles with the user-preset charge and discharge cycle threshold. If the number of charge and discharge cycles is greater than or equal to the preset charge and discharge cycle threshold, it is determined that the key update condition is met; if the number of charge and discharge cycles is less than the preset charge and discharge cycle threshold, it is determined that the key update condition is not met.

[0129] The charge / discharge cycle of an energy storage system refers to the number of complete full-charge and full-discharge operations performed by energy storage components such as batteries. The charge / discharge cycle threshold can be predetermined by the user based on actual conditions and stored in the energy storage system's management terminal. It is retrieved after the management terminal obtains the energy storage system's charge / discharge cycle count. For example, the charge / discharge cycle threshold could be set to 1000 times.

[0130] In this embodiment, the actual workflow of the energy storage system is bound to the key update system, and the life cycle of the key is directly linked to the actual usage intensity and business value of the energy storage system. This enables the core key system of the energy storage system to adapt to the actual working conditions of the energy storage system and optimizes the actual application of the core key system of the energy storage system in specific industrial scenarios.

[0131] In an exemplary embodiment, the method further includes S1010 to S1020, wherein:

[0132] S1010: The amount of encrypted data to obtain the working key.

[0133] S1020: If the amount of encrypted data for the working key is greater than or equal to a pre-set threshold for the amount of encrypted data, determine that the key update condition is met.

[0134] Specifically, the control terminal of the energy storage system continuously monitors the amount of encrypted data of the working key and synchronously compares the amount of encrypted data of the working key with the user-preset encrypted data threshold. If the amount of encrypted data of the working key is greater than or equal to the preset encrypted data threshold, it is determined that the key update condition is met. If the amount of encrypted data of the working key is less than the preset encrypted data threshold, it is determined that the key update condition is not met.

[0135] The encrypted data volume of the working key refers to the total amount of data encrypted with the working key in the energy storage system. The encrypted data volume threshold can be predetermined by the user based on actual conditions and stored in the energy storage system's control terminal. It is retrieved after the control terminal obtains the encrypted data volume of the working key. As an example, the encrypted data volume threshold can be set to 2^64 bytes.

[0136] In this embodiment, since any encryption algorithm that derives a large number of secondary keys from the same working key increases the risk of collisions among the derived secondary keys, the security of the working key may decrease. Therefore, the amount of encrypted data for the working key is counted, and once the amount of encrypted data for the working key reaches a certain order of magnitude, the key update condition is determined, triggering an update of the working key, thereby preventing a decrease in the security of the working key.

[0137] In one feasible embodiment, after S110, the method further includes:

[0138] S1110: In response to the identification of a critical operation, instruct the input of protection credentials; wherein, the critical operation includes system configuration operation of the energy storage system, energy storage configuration operation of the energy storage system, and confidentiality configuration operation of the energy storage system.

[0139] Specifically, the energy storage system's control terminal monitors critical operations performed by users on the system. When a critical operation is detected, the terminal instructs the user to input protection credentials to enable encryption and integrity protection for that operation. Critical operations refer to actions that have a significant impact on the energy storage system. These operations can be pre-instructed by the user or confirmed according to a pre-set list of critical operations in the energy storage system's control terminal.

[0140] Key operations include system configuration operations, energy storage configuration operations, and security configuration operations for the energy storage system. Specifically, system configuration operations refer to user operations that configure the operating system settings, operating system version, and operating system software of the energy storage system, such as instructing the energy storage system to update the operating system or instructing the energy storage system to load the operating system. Energy storage configuration operations refer to user operations that configure the energy storage components of the energy storage system, such as instructing the energy storage components to charge or discharge, or instructing the energy storage system to connect or unload energy storage components. Security configuration operations refer to user operations that configure the core encryption system of the energy storage system, such as instructing the user to read the root key or clear the working key.

[0141] In this embodiment, critical operations of the energy storage system require the use of the root key to generate corresponding working and temporary keys for protection. When the root key is invoked, a protection credential is required to further ensure its security. Simultaneously, the energy storage system's management terminal automatically identifies critical operations, effectively providing encrypted protection for operations that have a significant impact on the energy storage system. Operations that are less peripheral and have a smaller impact on the energy storage system can be exempted from encryption protection, thus saving computing resources.

[0142] In one feasible embodiment, after S140, the following is further included:

[0143] In response to receiving a key update operation, update at least one of the root key or the working key.

[0144] Specifically, the control terminal of the energy storage system can accept key update operations from users. A key update operation refers to the user actively configuring and updating the root key or working key. When the control terminal of the energy storage system receives a key update operation, it triggers a key update for the root key or working key.

[0145] In one possible embodiment, after S140, the following is further included:

[0146] In response to system attack characteristics, the system prompts the user to perform a key update operation.

[0147] Specifically, the control terminal of the energy storage system can identify system attack characteristics, which refer to a series of operating states or characteristics that may occur when the energy storage system is under attack. When the control terminal of the energy storage system identifies system attack characteristics, it prompts the user to perform a key update operation so that the user can promptly trigger a key update for the root key or working key.

[0148] As an example, the management terminal of an energy storage system can deploy a monitoring daemon. This daemon can analyze the usage of system resources such as CPU and memory. When it detects that the CPU usage rate has been consistently above 90% for more than 30 minutes, it identifies system attack characteristics and prompts the user to perform a key update. The monitoring daemon can also periodically check the mount status of the encrypted partition storing the root key. If it finds that the encrypted partition has been remounted in an unexpected read / write mode, this may mean that an attacker is attempting to tamper with the root key or related security configurations. Upon identifying system attack characteristics, the management terminal prompts the user to perform a key update.

[0149] In this embodiment, the energy storage system's management terminal actively identifies potential system attack characteristics and promptly alerts the user when such characteristics are detected. This allows the user to perform security maintenance on the energy storage system in a short period of time, effectively improving the system's security.

[0150] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0151] Based on the same inventive concept, this application also provides an encryption protection device for an energy storage system to implement the encryption protection method for the energy storage system described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the encryption protection device for an energy storage system provided below can be found in the limitations of the encryption protection method for the energy storage system described above, and will not be repeated here.

[0152] In one exemplary embodiment, such as Figure 6 As shown, an encryption protection device for an energy storage system is provided, comprising: a first generation module 601, a second generation module 602, a third generation module 603, and an encryption protection module 604, wherein:

[0153] The first generation module 601 is used to generate a root key in the non-volatile storage medium of the energy storage system;

[0154] The second generation module 602 is used to load the root key in response to receiving the protection credential, generate the working key based on the root key, and send the working key to the volatile storage medium of the energy storage system.

[0155] The third generation module 603 is used to generate a temporary key corresponding to the work transaction based on the work key in response to the energy storage system executing a work transaction.

[0156] The encryption protection module 604 is used to encrypt and protect work transactions using a temporary key.

[0157] In one embodiment, the third generation module 603 is further configured to:

[0158] In response to the energy storage system executing an external session communication transaction, a first temporary key is generated based on the working key; wherein the first temporary key is used to encrypt and protect the external session communication transaction; in response to the energy storage system executing an internal process call transaction, a second temporary key is generated based on the working key; wherein the second temporary key is used to encrypt and protect the internal process call transaction.

[0159] In one embodiment, the encryption protection module 604 is further configured to:

[0160] When the working transaction is an external session communication transaction, a session key corresponding to the transport layer security protocol session of the energy storage system is generated based on the first temporary key to encrypt and protect the external session communication transaction.

[0161] In one embodiment, the encryption protection module 604 is further configured to:

[0162] In the case where the work transaction is an internal process call transaction, at least one of the following is encrypted using a second temporary key: communication messages between internal components of the energy storage system, the connection of the energy storage system to the local database, and the private key of the local certificate of the energy storage system, in order to provide encrypted protection for the internal process call transaction.

[0163] In one embodiment, the first generation module 601 is further configured to:

[0164] Create an encrypted partition on the non-volatile storage medium of the energy storage system using Linux unified key settings; generate the root key in the encrypted partition.

[0165] In one embodiment, the device further includes a key destruction module, which is used to:

[0166] Once the task is confirmed to be complete, the temporary key corresponding to the task is destroyed.

[0167] In one embodiment, the device further includes a key update module, which is used to:

[0168] If the key update conditions are met, at least one of the root key or the working key is updated; wherein the key update conditions are related to the operating parameters of the energy storage system or the encryption parameters of the working key.

[0169] In one embodiment, the key update module is further configured to:

[0170] Obtain the runtime of the energy storage system; if the runtime is greater than or equal to a pre-set runtime threshold, determine if the key update conditions are met.

[0171] In one embodiment, the key update module is further configured to:

[0172] Obtain the number of charge and discharge cycles of the energy storage system; if the number of charge and discharge cycles is greater than or equal to a preset charge and discharge cycle threshold, determine that the key update condition is met.

[0173] In one embodiment, the key update module is further configured to:

[0174] Obtain the amount of encrypted data for the working key; if the amount of encrypted data for the working key is greater than or equal to a pre-set threshold for the amount of encrypted data, determine that the key update conditions are met.

[0175] The various modules in the encryption protection device of the aforementioned energy storage system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0176] In one exemplary embodiment, an energy storage system is provided, which includes a management terminal for the energy storage system. The internal structure diagram of the management terminal can be as follows: Figure 7As shown. The control terminal of the energy storage system includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor of the control terminal provides computing and control capabilities. The memory of the control terminal includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface of the control terminal is used for exchanging information between the processor and external devices. The communication interface of the control terminal is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an encryption protection method for the energy storage system. Those skilled in the art will understand that... Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the control terminal of the energy storage system to which the present application is applied. The control terminal of a specific energy storage system may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0177] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0178] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0179] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media 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. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0180] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.

[0181] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for encrypting a storage energy system, characterized by, The method comprises: generating a root key in a non-volatile storage medium of the energy storage system; in response to receiving a protection credential, loading the root key, generating a working key according to the root key, and sending the working key to a volatile storage medium of the energy storage system; in response to the energy storage system performing a working transaction, generating a temporary key corresponding to the working transaction according to the working key; wherein the working transaction comprises an external session communication transaction and an internal process call transaction of the energy storage system, the temporary key is used to encrypt and protect the working transaction currently triggered to generate the temporary key, the temporary key comprises a first temporary key and a second temporary key, and the response to the energy storage system performing a working transaction, generating a temporary key corresponding to the working transaction according to the working key, comprises: in response to the energy storage system performing the external session communication transaction, generating the first temporary key according to the working key; in response to the energy storage system performing the internal process call transaction, generating the second temporary key according to the working key; wherein the first temporary key is used to encrypt and protect the external session communication transaction, and the second temporary key is used to encrypt and protect the internal process call transaction; encrypting and protecting the working transaction by the temporary key; The method further comprises: in a case where it is determined that a key update condition is met, performing key update on at least one of the root key or the working key; wherein the key update condition is related to an operation parameter of the energy storage system or an encryption parameter of the working key, and the operation parameter of the energy storage system comprises at least one of a running time of the energy storage system, a number of charging and discharging of the energy storage system, a number of receiving charging and discharging instructions of the energy storage system, and an aging condition of the energy storage system.

2. The method of claim 1, wherein, The encrypting and protecting the working transaction by the temporary key comprises: in a case where the working transaction is the external session communication transaction, generating a session key corresponding to a transmission layer security protocol session of the energy storage system according to the first temporary key to encrypt and protect the external session communication transaction.

3. The method of claim 1, wherein, The encrypting and protecting the working transaction by the temporary key comprises: in a case where the working transaction is the internal process call transaction, encrypting at least one of a communication message between internal components of the energy storage system, a connection of the energy storage system to a local database, and a private key of a local certificate of the energy storage system by the second temporary key to encrypt and protect the internal process call transaction.

4. The method of claim 1, wherein, The generating a root key in a non-volatile storage medium of the energy storage system comprises: creating an encrypted partition in the non-volatile storage medium of the energy storage system by Linux unified key setting; generating the root key in the encrypted partition.

5. The method of claim 1, wherein, After the encrypting and protecting the working transaction by the temporary key, the method further comprises: in a case where it is determined that the working transaction is ended, destroying the temporary key corresponding to the working transaction.

6. The method of claim 1, wherein, The operation parameter comprises a running time of the energy storage system, and the method further comprises: acquire a running duration of the energy storage system; determine that the key update condition is satisfied in a case where the running duration is greater than or equal to a preset running duration threshold.

7. The method of claim 1, wherein, The running parameter includes a charge-discharge number of the energy storage system, and the method further includes: acquiring the charge-discharge number of the energy storage system; determining that the key update condition is satisfied in a case where the charge-discharge number is greater than or equal to a preset charge-discharge number threshold.

8. The method of claim 1, wherein, The encryption parameter includes an encryption data amount of the working key, and the method further includes: acquiring the encryption data amount of the working key; determining that the key update condition is satisfied in a case where the encryption data amount of the working key is greater than or equal to a preset encryption data amount threshold.

9. The method of claim 1, wherein, After the root key is generated in the non-volatile storage medium of the energy storage system, the method further includes: in response to identifying a critical operation, instructing to input the protection credential; wherein the critical operation includes a system configuration operation on the energy storage system, an energy storage configuration operation on the energy storage system, and a security configuration operation on the energy storage system.

10. An encryption protection device for an energy storage system, characterized by The device includes: a first generation module configured to generate a root key in a non-volatile storage medium of the energy storage system; a second generation module configured to, in response to receiving a protection credential, load the root key, generate a working key based on the root key, and send the working key to a volatile storage medium of the energy storage system; a third generation module configured to, in response to the energy storage system executing a working transaction, generate a temporary key corresponding to the working transaction based on the working key; wherein the working transaction includes an external session communication transaction and an internal process call transaction of the energy storage system, the temporary key is used to encrypt and protect the working transaction currently triggered to generate the temporary key, and the temporary key includes a first temporary key and a second temporary key; the third generation module is further configured to, in response to the energy storage system executing the external session communication transaction, generate the first temporary key based on the working key; and in response to the energy storage system executing the internal process call transaction, generate the second temporary key based on the working key; wherein the first temporary key is used to encrypt and protect the external session communication transaction, and the second temporary key is used to encrypt and protect the internal process call transaction; an encryption protection module configured to encrypt and protect the working transaction by using the temporary key. The device further includes: a key update module configured to, in a case where it is determined that a key update condition is satisfied, perform key update on at least one of the root key or the working key; wherein the key update condition is related to a running parameter of the energy storage system or an encryption parameter of the working key, and the running parameter of the energy storage system includes at least one of a running duration of the energy storage system, a charge-discharge number of the energy storage system, a charge-discharge instruction receiving number of the energy storage system, and an aging condition of the energy storage system.

11. An energy storage system comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor implements the steps of the method of any one of claims 1 to 9 when executing the computer program.

Citation Information

Patent Citations

  • Data encryption and decryption method and device, equipment and medium

    CN120128380A

  • Battery data chain for multi-stage hybrid encryption of data battery

    CN120301650A