Energy storage data transmission method, electronic equipment and storage medium
By encrypting the energy storage data based on the current time information selection encryption algorithm in the energy storage system, the problem of low security in the energy storage data transmission process is solved, and high security of data transmission is achieved.
Patent Information
- Application Number
- CN202411329427.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-07
AI Technical Summary
In the energy storage system, there are problems with low security during transmission, which are prone to stolen or tampered, resulting in large losses for enterprises.
By determining the encryption algorithm corresponding to the current time information among multiple preset encryption algorithms and using the encryption algorithm to encrypt the energy storage data, the encryption complexity of the data is improved and the security of the data is ensured during transmission.
It effectively reduces the risk of energy storage data being stolen and tampered during transmission and improves the security of data transmission.
Smart Images

Figure CN119276554A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of energy storage technology, and in particular to a method for transmitting energy storage data, an electronic device, and a storage medium. Background Art
[0002] As an important part of the energy field, the data of energy storage systems has become one of the core assets of enterprises, and its assetization trend is becoming increasingly obvious.
[0003] However, in the energy storage system, during the network communication between EMS (Energy Management System) and backend servers, backend servers and energy storage cloud platforms, energy storage data is often transmitted in the form of plain text fields, which has low security. Due to the complexity and uncertainty of the network environment, energy storage data faces the risk of being stolen and tampered with during transmission. If energy storage data is leaked, it will cause great losses to related companies. Summary of the invention
[0004] The embodiments of the present application provide a method for transmitting energy storage data, an electronic device, and a storage medium, which are intended to improve the security of energy storage data transmission and reduce the risk of energy storage data being stolen or tampered with during transmission.
[0005] In a first aspect, an embodiment of the present application provides a method for transmitting energy storage data, wherein the method for transmitting energy storage data is applied to a first terminal, and includes:
[0006] Obtain target energy storage data to be sent;
[0007] Get current time information;
[0008] Determine a first encryption algorithm corresponding to the current time information among multiple preset encryption algorithms;
[0009] Based on the target energy storage data, encrypting the target energy storage data using the current time information and the first encryption algorithm to obtain first encrypted energy storage data;
[0010] The first encrypted energy storage data is sent to the second terminal.
[0011] In one embodiment, determining a first encryption algorithm corresponding to the current time information among a plurality of preset encryption algorithms includes:
[0012] In the current time information, obtain a time numerical string representing the current time point;
[0013] In the time value string, determining a time value at a preset position;
[0014] Among the multiple preset encryption algorithms, a first encryption algorithm corresponding to the time value is determined.
[0015] In one embodiment, determining a first encryption algorithm corresponding to the time value from among the plurality of preset encryption algorithms includes:
[0016] Obtaining a preset value type associated with each of the preset encryption algorithms;
[0017] Among the multiple preset encryption algorithms, a preset encryption algorithm associated with a preset value type matching the time value is determined and used as the first encryption algorithm.
[0018] In one embodiment, the encryption processing based on the target energy storage data using the current time information and the first encryption algorithm to obtain the first encrypted energy storage data includes:
[0019] Generate a first initialization vector required to be used by the first encryption algorithm according to the current time information;
[0020] Based on the target energy storage data, encryption processing is performed using the first initialization vector and the first encryption algorithm to obtain the first encrypted energy storage data.
[0021] In one embodiment, the step of performing encryption processing based on the target energy storage data using the first initialization vector and the first encryption algorithm to obtain the first encrypted energy storage data includes:
[0022] Determine a second encryption algorithm among the plurality of preset encryption algorithms, and generate a second initialization vector required to be used by the second encryption algorithm;
[0023] Using the second initialization vector and the second encryption algorithm, encrypting the target energy storage data to obtain second encrypted energy storage data;
[0024] The second energy storage data is encrypted using the first initialization vector and the first encryption algorithm to obtain the first encrypted energy storage data.
[0025] In one embodiment, generating a second initialization vector required to be used by the second encryption algorithm includes:
[0026] Acquire an encryption key agreed upon by the first terminal and the second terminal;
[0027] A second initialization vector required to be adopted by the second encryption algorithm is generated according to the encryption key.
[0028] In one embodiment, sending the first encrypted energy storage data to the second terminal includes:
[0029] Obtaining manufacturer information of the energy storage device where the first terminal is located;
[0030] The first encrypted energy storage data and the manufacturer information are sent to the second terminal as associated information, so that the second terminal can decrypt the first encrypted energy storage data after verifying the manufacturer information.
[0031] In a second aspect, an embodiment of the present application provides a method for transmitting energy storage data, wherein the method for transmitting energy storage data is applied to a second terminal, and includes:
[0032] Obtaining first encrypted energy storage data sent by the first terminal;
[0033] Get current time information;
[0034] Determine a first encryption algorithm corresponding to the current time information among multiple preset encryption algorithms;
[0035] Based on the first encrypted energy storage data, decryption processing is performed using the current time information and the first encryption algorithm to obtain target energy storage data.
[0036] In a third aspect, an embodiment of the present application provides a first terminal, including:
[0037] A first acquisition module, used to acquire target energy storage data to be sent;
[0038] The second acquisition module is used to obtain current time information;
[0039] A first determination module, used to determine a first encryption algorithm corresponding to the current time information from among a plurality of preset encryption algorithms;
[0040] A data encryption module, used to perform encryption processing based on the target energy storage data using the current time information and the first encryption algorithm to obtain first encrypted energy storage data;
[0041] A data sending module is used to send the first encrypted energy storage data to a second terminal.
[0042] In a fourth aspect, an embodiment of the present application provides a second terminal, including:
[0043] A third acquisition module, used to acquire first encrypted energy storage data sent by the first terminal;
[0044] The fourth acquisition module is used to obtain current time information;
[0045] A second determination module, used to determine a first encryption algorithm corresponding to the current time information from among a plurality of preset encryption algorithms;
[0046] A data decryption module is used to perform decryption processing based on the first encrypted energy storage data using the current time information and the first encryption algorithm to obtain target energy storage data.
[0047] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is configured to be executed by the processor to implement the energy storage data transmission method as described in any one of the above items.
[0048] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is configured to be executed by a processor to implement the energy storage data transmission method as described in any one of the above items.
[0049] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program or instructions, which are executed by a processor to implement the energy storage data transmission method as described in any one of the above items.
[0050] Beneficial effects of the embodiments of the present application:
[0051] In an embodiment of the present application, among multiple preset encryption algorithms, a first encryption algorithm corresponding to the current time information is determined, and then the current time information and the first encryption algorithm are used for encryption processing, thereby improving the encryption complexity of the target energy storage data, thereby improving the security of energy storage data transmission and reducing the risk of the energy storage data being stolen or tampered with during transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0053] Figure 1 It is a flowchart of an embodiment of a method for transmitting energy storage data of a first terminal provided in an embodiment of the present application;
[0054] Figure 2 It is a flowchart of another embodiment of the method for transmitting energy storage data of the first terminal provided in an embodiment of the present application;
[0055] Figure 3 It is a flowchart of another embodiment of the method for transmitting energy storage data of the first terminal provided in the embodiment of the present application;
[0056] Figure 4 It is a schematic flow chart of an embodiment of a method for transmitting energy storage data of a second terminal provided in an embodiment of the present application;
[0057] Figure 5 It is a schematic diagram of the structure of an embodiment of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0059] In the description of this application, the meaning of "plurality" is two or more, unless otherwise expressly and specifically defined. In addition, in the description of this application, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0060] In order to improve the security of energy storage data transmission, the embodiment of the present application provides a method for transmitting energy storage data, an electronic device and a storage medium. Among multiple preset encryption algorithms, a first encryption algorithm corresponding to the current time information is determined, and then the current time information and the first encryption algorithm are used for encryption processing, thereby improving the encryption complexity of the target energy storage data, thereby improving the security of energy storage data transmission and reducing the risk of energy storage data being stolen or tampered with during transmission. For specific solutions, please refer to the following specific description.
[0061] In a first aspect, an embodiment of the present application provides a method for transmitting energy storage data. Specifically, referring to Figure 1 , Figure 1 FIG. 1 is a flow chart of an embodiment of a method for transmitting energy storage data. Figure 1 In the embodiment, the energy storage data transmission method is applied to the first terminal and may include:
[0062] 101. Obtain target energy storage data to be sent.
[0063] In an embodiment of the present application, energy storage data refers to data transmitted during network communications between an EMS (Energy Management System) and a backend server, a backend server and an energy storage cloud platform, etc. in an energy storage system. The target energy storage data to be sent refers to energy storage data that the first terminal needs to send to the second terminal, that is, the first terminal is the sending end and the second terminal is the receiving end. For example, the first terminal may be one of the EMS and the backend server, and the second terminal may be the other of the EMS and the backend server. For another example, the first terminal may be one of the backend server and the energy storage cloud platform, and the second terminal may be the other of the backend server and the energy storage cloud platform.
[0064] 102. Get current time information.
[0065] In an embodiment of the present application, the current time information represents information of the current time point of the first terminal, and the current time point may be specific to the current month, day, hour, minute, second, etc. Taking the current time point specific to the current date as an example, the current time information may include information in the form of "YYYYMMDD", where "YYYY" is a four-digit value corresponding to the year, such as "2024", "MM" is a two-digit value corresponding to the month, such as "01", and "DD" is a two-digit value corresponding to the date, such as "02".
[0066] 103. Determine a first encryption algorithm corresponding to the current time information among multiple preset encryption algorithms.
[0067] In an embodiment of the present application, the preset encryption algorithm can be preset based on actual needs, and the multiple preset encryption algorithms can be, for example, DES (Data Encryption Standard) encryption algorithm, AES (Advanced Encryption Standard) encryption algorithm, IDEA (International Data Encryption Algorithm), etc. In addition, the preset encryption algorithm can be stored in the CryptoJS database, so different preset encryption algorithms or encryption functions in the preset encryption algorithms can be replaced by introducing different CryptoJS databases.
[0068] In an embodiment of the present application, the first encryption algorithm is one of multiple preset encryption algorithms and is determined based on current time information. That is, when the current time information is different, the first encryption algorithm determined among the multiple preset encryption algorithms may also be different, so that the determined first encryption algorithm changes with the current time information.
[0069] 104. Based on the target energy storage data, encryption processing is performed using current time information and a first encryption algorithm to obtain first encrypted energy storage data.
[0070] In an embodiment of the present application, the target energy storage data is taken as the data to be encrypted, and encryption processing is performed using current time information and a first encryption algorithm to obtain corresponding encrypted data, namely, first encrypted energy storage data.
[0071] 105. Send the first encrypted energy storage data to the second terminal.
[0072] In an embodiment of the present application, after obtaining the first encrypted energy storage data, the first encrypted energy storage data is sent to the corresponding second terminal. Since the encryption complexity of the first encrypted energy storage data is higher, even if the first encrypted energy storage data is stolen during transmission, it is difficult to be correctly decrypted and leaked. In addition, the first encrypted energy storage data may be in the form of a string, so the first encrypted energy storage data may be embedded in a request or response in HTTP (Hypertext Transfer Protocol) format and / or HTTPS (Hypertext Transfer Protocol Secure) format and sent to the second terminal to facilitate the transmission of the first encrypted energy storage data.
[0073] It can be seen that in the above-mentioned embodiment of the present application, among multiple preset encryption algorithms, the first encryption algorithm corresponding to the current time information is determined, and then the current time information and the first encryption algorithm are used for encryption processing, which improves the encryption complexity of the target energy storage data, thereby improving the security of energy storage data transmission and reducing the risk of the energy storage data being stolen or tampered with during the transmission process.
[0074] In some embodiments of the present application, sending the first encrypted energy storage data to the second terminal may include: obtaining the manufacturer information of the energy storage device where the first terminal is located, the manufacturer information may be, for example, the copyright information of the manufacturer; sending the first encrypted energy storage data and the manufacturer information as associated information to the second terminal, so that the second terminal can decrypt the first encrypted energy storage data after verifying the manufacturer information. If the second terminal fails to verify the manufacturer information, it indicates that the first encrypted energy storage data associated with the manufacturer information may not be compliant, so the first encrypted energy storage data may be deleted.
[0075] In some embodiments of the present application, Figure 2 As shown, in Figure 1 Based on the illustrated embodiment, determining the first encryption algorithm corresponding to the current time information from among multiple preset encryption algorithms may include:
[0076] 201. In the current time information, obtain a time numerical string representing the current time point.
[0077] In an embodiment of the present application, the current time information includes a time numerical string representing the current time point, and the time numerical string may be, for example, a numerical string in the form of "YYYYMMDD".
[0078] In some embodiments of the present application, the time value string may also be a value string obtained after a preset data processing is performed on the current time point. The preset data processing may be, for example, a preset encoding processing, such as UTF-8 (Unicode Transformation Format-8). Since the value string is obtained after a preset data processing is performed on the current time point, the complexity of the encryption processing can be further increased, and the security of energy storage data transmission can be further improved.
[0079] 202. In the time value character string, determine the time value at a preset position.
[0080] In an embodiment of the present application, the preset position may be any position in the time value string. For example, the preset position may be the end of the time value string. The preset position may be pre-set based on actual needs.
[0081] 203. Determine a first encryption algorithm corresponding to the time value from among multiple preset encryption algorithms.
[0082] In an embodiment of the present application, the first encryption algorithm is determined based on a time value, that is, when the time value is different, the first encryption algorithm determined among multiple preset encryption algorithms may also be different, so that the determined first encryption algorithm changes with different time values.
[0083] In some embodiments of the present application, among multiple preset encryption algorithms, determining a first encryption algorithm corresponding to a time value may include: obtaining a preset value type associated with each preset encryption algorithm, wherein different preset encryption algorithms are associated with different preset value types, and the preset value type may be, for example, an odd value type, an even value type, etc. The preset value type associated with the DES encryption algorithm may be, for example, an odd value type, and the preset value type associated with the AES encryption algorithm may be, for example, an even value type; among multiple preset encryption algorithms, determining a preset encryption algorithm associated with a preset value type that matches the time value, and using it as the first encryption algorithm, for example, when the time value is 1, 3, 5, 7, 9, etc., the matching preset value type is an odd value type, then the corresponding first encryption algorithm is the DES encryption algorithm, and for example, when the time value is 0, 2, 4, 6, 8, etc., the matching preset value type is an even value type, then the corresponding first encryption algorithm is the AES encryption algorithm, thereby achieving the correspondence between the time value and the first encryption algorithm.
[0084] In some embodiments of the present application, among multiple preset encryption algorithms, determining a first encryption algorithm corresponding to a time value may include: obtaining a preset value type associated with each preset encryption algorithm, wherein the preset value type may be, for example, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, etc., each preset encryption algorithm is associated with at least one preset value type, and the preset value types associated with different preset encryption algorithms are different; among multiple preset encryption algorithms, determining a preset encryption algorithm associated with a preset value type that matches the time value, and using it as the first encryption algorithm, for example, when the time value is 1, the matching preset value type is type "1", thereby determining the corresponding first encryption algorithm, and for example, when the time value is 2, the matching preset value type is type "2", thereby determining the corresponding first encryption algorithm.
[0085] It can be seen that in the above-mentioned embodiment of the present application, in the current time information, a time value string representing the current time point is obtained, the time value at a preset position is determined in the time value string, and then the first encryption algorithm corresponding to the time value is determined among multiple preset encryption algorithms, thereby realizing the correspondence between the first encryption algorithm and the current time information.
[0086] In some embodiments of the present application, Figure 3 As shown, in Figure 1 or Figure 2 On the basis of the illustrated embodiment, based on the target energy storage data, encryption processing is performed using current time information and a first encryption algorithm to obtain first encrypted energy storage data, including:
[0087] 301. Generate a first initialization vector required to be used by a first encryption algorithm according to current time information.
[0088] In the embodiments of the present application, an initialization vector (IV) refers to an input value of a fixed length in the field of cryptography. In the first encryption algorithm, the plaintext data to be encrypted is encrypted in groups, and the initialization vector is a parameter used to link the plaintext data of the previous group with the plaintext data of the next group, so that the plaintext data with the same content in different groups can obtain different ciphertext data after encryption, thereby improving the security of the ciphertext data.
[0089] In some embodiments of the present application, generating a first initialization vector required to be used by a first encryption algorithm based on current time information may include: directly using a time value string representing the current time point in the current time information as the first initialization vector, or further processing the time value string representing the current time point in the current time information to obtain the first initialization vector. The further processing may, for example, be performing a mathematical operation on the time value string and a preset value, and the mathematical operation may, for example, be addition, subtraction, multiplication, and division, thereby further increasing the complexity of encryption.
[0090] 302. Based on the target energy storage data, encrypt the data using a first initialization vector and a first encryption algorithm to obtain first encrypted energy storage data.
[0091] In some embodiments of the present application, the target energy storage data is encrypted only once. Specifically, based on the target energy storage data, the first initialization vector and the first encryption algorithm are used to perform encryption processing to obtain the first encrypted energy storage data, which may include: inputting the target energy storage data and the first initialization vector into the first encryption algorithm for encryption processing, and receiving the first encrypted energy storage data output by the first encryption algorithm.
[0092] In the step of inputting the target energy storage data and the first initialization vector into the first encryption algorithm for encryption processing, for example, it can include: dividing the target energy storage data into multiple plaintext data blocks, and the multiple plaintext data blocks are sequentially arranged as the first plaintext data, the second plaintext data, the third plaintext data, etc.; performing an XOR operation on the first initialization vector and the first plaintext data block to obtain a first block to be encrypted; using the encryption function in the first encryption algorithm to encrypt the first block to be encrypted to obtain a first ciphertext data block; using the first ciphertext data block as a new first initialization vector, thereby realizing the update of the first initialization vector.
[0093] After obtaining a new first initialization vector, an XOR operation is performed on the new first initialization vector and the next plaintext data block of the first plaintext data block to obtain the next block to be encrypted of the first block to be encrypted; the next block to be encrypted of the first block to be encrypted is encrypted using an encryption function in the first encryption algorithm to obtain the next ciphertext data block of the first ciphertext data block; the next ciphertext data block of the first ciphertext data block is used as a new first initialization vector, thereby realizing another update of the first initialization vector.
[0094] By analogy, after obtaining the ciphertext data block corresponding to each plaintext data block, the ciphertext data blocks corresponding to all the plaintext data blocks are spliced to obtain the first encrypted energy storage data.
[0095] In some embodiments of the present application, the target energy storage data is encrypted twice. Specifically, based on the target energy storage data, the first initialization vector and the first encryption algorithm are used to perform encryption processing to obtain the first encrypted energy storage data, which may include: determining the second encryption algorithm among multiple preset encryption algorithms, and generating the second initialization vector required to be used by the second encryption algorithm; using the second initialization vector and the second encryption algorithm, encrypting the target energy storage data to obtain the second encrypted energy storage data; using the first initialization vector and the first encryption algorithm, encrypting the second energy storage data to obtain the first encrypted energy storage data. It can be seen that in this embodiment, the target energy storage data is encrypted twice in succession, thereby further improving the encryption complexity of the target energy storage data and enhancing the security of the data, so that even if the first layer of encryption is cracked, the second layer of encryption can provide additional protection. The specific data processing process of each encryption process in the two encryption processes can refer to the data processing process of only one encryption process mentioned above, which will not be repeated here.
[0096] Among them, generating the second initialization vector required for the second encryption algorithm may include: obtaining the encryption key agreed upon by the first terminal and the second terminal (customizable), the encryption key is generally a symmetric key, that is, the encryption key of the first terminal is the same as the encryption key of the second terminal; according to the encryption key, generating the second initialization vector required for the second encryption algorithm, for example, the encryption key can be directly used as the second initialization vector, or the encryption key can be further processed to obtain the first initialization vector. Among them, the further processing may be, for example, performing mathematical operations on the encryption key and a preset value, and the mathematical operations may be, for example, addition, subtraction, multiplication, and division, so as to further increase the complexity of encryption. In addition, it can be seen that the first initialization vector is generated differently from the first initialization vector, which helps to prevent replay attacks and certain types of cryptanalysis attacks.
[0097] In a second aspect, an embodiment of the present application provides a method for transmitting energy storage data. The method for transmitting energy storage data is applied to Figures 1 to 3The second terminal in any of the embodiments shown includes:
[0098] 401. Obtain first encrypted energy storage data sent by a first terminal.
[0099] In an embodiment of the present application, after the first terminal sends the first encrypted energy storage data to the second terminal, the second terminal may obtain the first encrypted energy storage data through an interceptor.
[0100] In some embodiments of the present application, the second terminal may also receive the manufacturer information sent as associated information together with the first encrypted energy storage data while obtaining the first encrypted energy storage data sent by the first terminal. Therefore, after the second terminal obtains the first encrypted energy storage data sent by the first terminal, it may also include: verifying the manufacturer information, for example, comparing the manufacturer information with the manufacturer information of the energy storage device where the second terminal is located. If the comparison is consistent, it is determined that the verification is passed, and if the comparison is inconsistent, it is determined that the verification is not passed; after the verification is passed, step 402 and subsequent steps are executed. If the verification fails, it indicates that the first encrypted energy storage data associated with the manufacturer information may not be compliant, so the manufacturer information and the first encrypted energy storage data can be deleted.
[0101] 402. Get current time information.
[0102] In an embodiment of the present application, the current time information of the second terminal may be obtained by sending the first terminal in plain text or in cipher text, or may be generated based on the current time point of the second terminal. Taking the current time point in the current time information of the first terminal as an example, which is specific to the current date, the second terminal may generate the corresponding current time information based on the current time point of the second terminal. Taking the current time point in the current time information of the first terminal as an example, which is specific to the current number of seconds, the current time information of the second terminal may be obtained by sending the first terminal in plain text or in cipher text, so as to avoid the situation where the current time information of the second terminal is inconsistent with the current time information of the first terminal.
[0103] 403. Determine a first encryption algorithm corresponding to the current time information among multiple preset encryption algorithms.
[0104] In the embodiment of the present application, the specific content of step 403 can refer to the specific content of step 103, which will not be repeated here.
[0105] 404. Based on the first encrypted energy storage data, decryption processing is performed using current time information and a first encryption algorithm to obtain target energy storage data.
[0106] In the embodiment of the present application, the decryption process of the second terminal corresponds to the encryption process of the first terminal, so the specific content of step 403 can refer to the specific content of step 104, which will not be repeated here.
[0107] In a third aspect, based on the energy storage data transmission method of the above embodiment, an embodiment of the present application provides a first terminal, which is used to execute the steps in any embodiment of the energy storage data transmission method of the first terminal. Specifically, the first terminal may include:
[0108] A first acquisition module, used to acquire target energy storage data to be sent;
[0109] The second acquisition module is used to obtain current time information;
[0110] A first determination module, used to determine a first encryption algorithm corresponding to the current time information among multiple preset encryption algorithms;
[0111] A data encryption module, used to perform encryption processing based on the target energy storage data using current time information and a first encryption algorithm to obtain first encrypted energy storage data;
[0112] The data sending module is used to send the first encrypted energy storage data to the second terminal.
[0113] In a fourth aspect, based on the energy storage data transmission method of the above embodiment, an embodiment of the present application provides a second terminal, which is used to execute the steps of any embodiment of the energy storage data transmission method of the second terminal. Specifically, the second terminal may include:
[0114] A third acquisition module, used to acquire first encrypted energy storage data sent by the first terminal;
[0115] The fourth acquisition module is used to obtain current time information;
[0116] A second determination module, used to determine a first encryption algorithm corresponding to the current time information from among a plurality of preset encryption algorithms;
[0117] The data decryption module is used to perform decryption processing based on the first encrypted energy storage data using current time information and a first encryption algorithm to obtain target energy storage data.
[0118] In a fifth aspect, an embodiment of the present application provides an electronic device, which integrates any first terminal and / or second terminal provided in the embodiments of the present application. The electronic device includes a processor and a memory, and a computer program is stored in the memory. The computer program is configured to be executed by the processor to implement the energy storage data transmission method described in any of the above embodiments, for example:
[0119] Obtain target energy storage data to be sent; obtain current time information; determine a first encryption algorithm corresponding to the current time information among multiple preset encryption algorithms; perform encryption processing based on the target energy storage data using the current time information and the first encryption algorithm to obtain first encrypted energy storage data; and send the first encrypted energy storage data to the second terminal.
[0120] In a sixth aspect, an embodiment of the present application provides an electronic device, which integrates any first terminal and / or second terminal provided in an embodiment of the present application. Figure 5 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0121] The electronic device may include components such as a processor 501 with one or more processing cores, a storage unit 502 with one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will appreciate that Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0122] The processor 501 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the storage unit 502 and calling data stored in the storage unit 502, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.
[0123] The storage unit 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the storage unit 502. The storage unit 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the storage unit 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the storage unit 502 may also include a memory controller to provide the processor 501 with access to the storage unit 502.
[0124] The electronic device also includes a power supply 503 for supplying power to each component. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 503 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
[0125] The electronic device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0126] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically, in the embodiment of the present application, the processor 501 in the electronic device will load the executable file corresponding to the process of one or more application programs into the storage unit 502 according to the following instructions, and the processor 501 will run the application program stored in the storage unit 502, thereby realizing various functions, such as:
[0127] Obtain target energy storage data to be sent; obtain current time information; determine a first encryption algorithm corresponding to the current time information among multiple preset encryption algorithms; perform encryption processing based on the target energy storage data using the current time information and the first encryption algorithm to obtain first encrypted energy storage data; and send the first encrypted energy storage data to the second terminal.
[0128] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. The computer-readable storage medium stores a computer program, and the computer program is configured to be executed by a processor to implement the energy storage data transmission method as described in any one of the above items, for example:
[0129] Obtain target energy storage data to be sent; obtain current time information; determine a first encryption algorithm corresponding to the current time information among multiple preset encryption algorithms; perform encryption processing based on the target energy storage data using the current time information and the first encryption algorithm to obtain first encrypted energy storage data; and send the first encrypted energy storage data to the second terminal.
[0130] In an eighth aspect, an embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes to implement the energy storage data transmission method as described in any one of the above items, for example:
[0131] Obtain target energy storage data to be sent; obtain current time information; determine a first encryption algorithm corresponding to the current time information among multiple preset encryption algorithms; perform encryption processing based on the target energy storage data using the current time information and the first encryption algorithm to obtain first encrypted energy storage data; and send the first encrypted energy storage data to the second terminal.
[0132] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for transmitting energy storage data, characterized in that: The energy storage data transmission method is applied to a first terminal, comprising: Obtain target energy storage data to be sent; Get current time information; Determine a first encryption algorithm corresponding to the current time information among multiple preset encryption algorithms; Based on the target energy storage data, encrypting the target energy storage data using the current time information and the first encryption algorithm to obtain first encrypted energy storage data; The first encrypted energy storage data is sent to the second terminal.
2. The method for transmitting energy storage data according to claim 1, characterized in that: The step of determining a first encryption algorithm corresponding to the current time information among a plurality of preset encryption algorithms comprises: In the current time information, obtain a time numerical string representing the current time point; In the time value string, determining a time value at a preset position; Among the multiple preset encryption algorithms, a first encryption algorithm corresponding to the time value is determined.
3. The method for transmitting energy storage data according to claim 2, characterized in that: Determining a first encryption algorithm corresponding to the time value from among the plurality of preset encryption algorithms includes: Obtaining a preset value type associated with each of the preset encryption algorithms; Among the multiple preset encryption algorithms, a preset encryption algorithm associated with a preset value type matching the time value is determined and used as the first encryption algorithm.
4. The method for transmitting energy storage data according to claim 1, characterized in that: The step of performing encryption processing based on the target energy storage data using the current time information and the first encryption algorithm to obtain first encrypted energy storage data includes: Generate a first initialization vector required to be used by the first encryption algorithm according to the current time information; Based on the target energy storage data, encryption processing is performed using the first initialization vector and the first encryption algorithm to obtain the first encrypted energy storage data.
5. The method for transmitting energy storage data according to claim 4, characterized in that: The step of performing encryption processing based on the target energy storage data using the first initialization vector and the first encryption algorithm to obtain the first encrypted energy storage data includes: Determine a second encryption algorithm among the plurality of preset encryption algorithms, and generate a second initialization vector required to be used by the second encryption algorithm; Using the second initialization vector and the second encryption algorithm, encrypting the target energy storage data to obtain second encrypted energy storage data; The second energy storage data is encrypted using the first initialization vector and the first encryption algorithm to obtain the first encrypted energy storage data.
6. The method for transmitting energy storage data according to claim 5, characterized in that: The generating a second initialization vector required to be used by the second encryption algorithm includes: Acquire an encryption key agreed upon by the first terminal and the second terminal; A second initialization vector required to be adopted by the second encryption algorithm is generated according to the encryption key.
7. The method for transmitting energy storage data according to any one of claims 1 to 6, characterized in that: The sending the first encrypted energy storage data to the second terminal includes: Obtaining manufacturer information of the energy storage device where the first terminal is located; The first encrypted energy storage data and the manufacturer information are sent to the second terminal as associated information, so that the second terminal can decrypt the first encrypted energy storage data after verifying the manufacturer information.
8. A method for transmitting energy storage data, characterized in that: The energy storage data transmission method is applied to a second terminal, comprising: Obtaining first encrypted energy storage data sent by the first terminal; Get current time information; Determine a first encryption algorithm corresponding to the current time information among multiple preset encryption algorithms; Based on the first encrypted energy storage data, decryption processing is performed using the current time information and the first encryption algorithm to obtain target energy storage data.
9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein a computer program is stored in the memory, and the computer program is configured to be executed by the processor to implement the energy storage data transmission method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is configured to be executed by a processor to implement the energy storage data transmission method according to any one of claims 1 to 8.
Citation Information
Cited By
Transparent encryption method and system based on proxy mode
CN121637541A
A Transparent Encryption Method and System Based on Proxy Pattern
CN121637541B