A method, system and storage medium for processing power communication data
By using the key table of the first terminal to perform encryption processing and random number verification in the power communication data processing, the public and private key sharing security and update problems are solved, and the security and verification efficiency of power communication data are improved.
Patent Information
- Application Number
- CN202311578174.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2043-11-24
AI Technical Summary
In the existing power communication data encryption methods, the sharing process of public and private keys is easily intercepted and updated is difficult, which reduces the security of data encryption.
The first terminal is used to set up the first key table, including multiple digital strings and fingerprint strings, and generate random numbers for encryption processing at every preset time, fuse them into encrypted data transmission, and ensure data security through random number verification to avoid direct Share keys on the network.
It realizes that while not sharing the key directly on the network, it facilitates updating the encryption key, improving the security and verification efficiency of power communication data.
Smart Images

Figure CN117560144B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data transmission, and in particular relates to a method, system and storage medium for processing power communication data. Background Art
[0002] The security of power communication data is of great significance to the power industry. First of all, power data includes marketing, power grid, materials, finance and other data. These data are not only huge in quantity, but also involve multiple users and collection points. The power industry is related to the national economy, people's livelihood and national security, so its stability and security are crucial. Secondly, as the key infrastructure of the power system, the power communication network ensures the safe and stable operation of the power system and is the basis for the automation of power grid dispatching, marketization of network operation and modernization of management. Therefore, ensuring the security of these data can effectively prevent external threats and internal risks.
[0003] The following technical solutions are proposed in the prior art to protect power communication data. For example, the Chinese patent document "CN115883203A" discloses a compression encryption transmission method, device and server for power data. The method obtains power data outside a set threshold range after receiving a data acquisition request from a client of an analysis system, generates a first key through a symmetric encryption algorithm, encrypts the power data outside the threshold range through the first key, encrypts the first key through a private key, and transmits the encrypted power data outside the threshold range and the encrypted first key to the client, so that the client executes the steps of: decrypting the encrypted first key through a public key to obtain the first key, and decrypting the encrypted power data through the first key. power data; for example, the Chinese patent document "CN109104279B" discloses an encryption method, system and terminal device for power data, the method includes receiving a data transmission request sent by a first terminal, obtaining the power data to be transmitted according to the data transmission request, dividing the power data to be transmitted into ordinary power data and important power data, obtaining a symmetric key, and using the symmetric key to encrypt the ordinary power data and the important power data respectively to obtain first encrypted data and second encrypted data, obtaining a public key of the target terminal, and using the public key to encrypt the second encrypted data to obtain third encrypted data, sending the first encrypted data and the third encrypted data to the target terminal, thereby realizing automatic and secure transmission of power data.
[0004] However, the above encryption method still uses traditional public key and private key encryption, and the public key and private key need to be shared before use. If they are intercepted during the sharing process, the security of data encryption will be reduced. If the method that exists in the device in advance is used, it will make the update of the public key and private key more difficult because the two cannot be shared on the network. Summary of the invention
[0005] To solve the above problems, the present invention provides a method, system and storage medium for processing power communication data, so as to provide a technical solution that does not require direct sharing of keys on the network but can more conveniently update public keys.
[0006] In order to achieve the above-mentioned object of the invention, the present invention proposes a method for processing power communication data, comprising:
[0007] Step S1: The first terminal is provided with a first key table, wherein the first key table includes a plurality of first digital strings and corresponding first fingerprint strings;
[0008] Step S2: the first terminal generates a first random number at a preset time interval, extracts the first digital string and the first fingerprint string from the first key table, uses the first digital string to encrypt the first fingerprint string to obtain first encrypted data, and uses the first fingerprint string to encrypt the first random number to obtain second encrypted data;
[0009] Step S3: the first terminal merges the first encrypted data and the second encrypted data into third encrypted data based on a preset first conversion rule, and sends the third encrypted data to the second terminal;
[0010] Step S4: the first terminal receives instruction information from the second terminal, the instruction information is generated by the second terminal through a predetermined process for decrypting the three encrypted data, and the instruction information includes a second random number;
[0011] Step S5: If the first terminal successfully decrypts the instruction information, continue to execute step S5, otherwise terminate the transmission of power communication data;
[0012] Step S6: The first terminal generates an encryption key based on the first random number and the second random number, uses the encryption key to encrypt the power communication data into a ciphertext, and sends the ciphertext to the second terminal.
[0013] Further, in step S3, the first terminal sending the third encrypted data to the second terminal includes the following steps:
[0014] The first terminal generates a first public key and a second public key, uses the first public key and the second public key to encrypt the third encrypted data to obtain first data, and the first terminal sends the first data to the first transfer node;
[0015] The first transfer node uses a pre-stored first private key to decrypt the first data, and then uses a third public key to encrypt the first data to obtain second data, the first terminal generates a plurality of false data based on the second data, and the first transfer node distributes the second data and the false data to different second transfer nodes;
[0016] The second terminal determines the second transfer node holding the second data, and obtains the second data from the second transfer node. The second terminal decrypts the second data using the second private key and the third private key held by itself to obtain the third encrypted data.
[0017] Further, the second terminal determines the second transfer node holding all the second data including the following steps:
[0018] The first transit node generates a first authentication key and a plurality of second authentication keys, the first authentication key is sent along with the second data, and the second authentication key is sent along with the false data;
[0019] Each of the second transfer nodes generates a first value and a second value, wherein the first value and the second value Satisfies the first formula, which is: , where k is the first authentication key or the second authentication key;
[0020] The second transfer node then generates a third value based on the second formula, the third formula and the fourth formula respectively. , the fourth value and the fifth value , the second formula is: , the third formula is: , the fourth formula is: Wherein m is the third random number generated by the second transfer node, is a preset calculation function, and each of the second transfer nodes sends the first value to the fifth value generated to the second terminal;
[0021] The second terminal generates the same first authentication key as the first transit node, calculates the second value based on the first formula, obtains the fourth value based on the third formula, and then calculates the sixth value and the seventh value based on the fifth formula and the sixth formula respectively, where the fifth formula is: , the sixth formula is: ,in, and The fourth value and the second value are calculated for the second terminal, and the second terminal obtains the second transfer node that makes the sixth value the same as the seventh value, and determines that the second transfer node holds the second data.
[0022] Furthermore, the second terminal generating the instruction information includes the following steps:
[0023] The second terminal is provided with a second conversion rule and a second key table, wherein the second conversion rule is the inverse rule of the first conversion rule, and the second key table includes a second digital string. After receiving the third encrypted data, the second terminal uses the second conversion rule to convert the third encrypted data to obtain the first encrypted data, and uses the second digital string to decrypt the first encrypted data to obtain the first fingerprint string. After generating the second random number, the second terminal generates the instruction information based on the first fingerprint string and the second random number.
[0024] Further, the first digital string and the second digital string are generated based on the following steps:
[0025] The first terminal and the second terminal are respectively provided with conversion functions, the conversion functions generate a first key and a second key based on the IP addresses of the first terminal and the second terminal respectively, the first terminal and the second terminal generate a first flag bit and a second flag bit respectively through the first key and the second key, and generate a communication token based on the first flag bit and the second flag bit;
[0026] The first terminal and the second terminal obtain the current time simultaneously and multiple times, input the current time into the conversion function in sequence, and obtain multiple basic keys. The first terminal and the second terminal combine the communication token with different basic keys to generate multiple first digital strings and second digital strings.
[0027] The present invention also provides a system for processing power communication data, which is used to implement the above-mentioned method for processing power communication data, and the system includes:
[0028] A first terminal is provided with a first key table, wherein the first key table includes a plurality of first digital strings and corresponding first fingerprint strings, the first terminal generates a first random number at a preset time interval, extracts the first digital string and the first fingerprint string from the first key table, uses the first digital string to encrypt the first fingerprint string to obtain first encrypted data, and uses the first fingerprint string to encrypt the first random number to obtain second encrypted data, the first terminal merges the first encrypted data and the second encrypted data into third encrypted data based on a preset first conversion rule, and sends the third encrypted data to the second terminal, the first terminal receives instruction information from the second terminal, the instruction information is generated by a predetermined process for the second terminal to decrypt the third encrypted data, the instruction information includes a second random number, if the first terminal successfully decrypts the instruction information, an encryption key is generated based on the first random number and the second random number, the encryption key is used to encrypt the power communication data into ciphertext and send it to the second terminal, otherwise the transmission of the power communication data is terminated;
[0029] a second terminal, configured to receive the third encrypted data and generate the instruction information based on the third encrypted data;
[0030] A generation terminal is arranged in the first terminal, and the generation terminal is used to generate the first key table.
[0031] The present invention also provides a computer storage medium, wherein the computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above-mentioned method for processing power communication data.
[0032] Compared with the prior art, the beneficial effects of the present invention are at least as follows:
[0033] The first terminal in the present invention holds a first key table, which includes multiple first digital strings and a first fingerprint string. The first random number is then encrypted using the first key table held by itself to obtain first encrypted data, and the first fingerprint string is encrypted using the first digital string to obtain second encrypted data. The first encrypted data and the second encrypted data are merged and sent to the second terminal. The merging of the two encrypted data before sending ensures the security of the data. If the second terminal is a correct terminal, the second terminal can successfully decrypt the third encrypted data, generate instruction information and return it to the first terminal. Finally, the first terminal determines the correctness of the second terminal by judging whether the instruction information can be decrypted, thereby realizing verification of the second terminal.
[0034] In the present invention, a first random number is generated by a first terminal, and a second random number is generated by a second terminal, and the two also realize the exchange of random numbers during the verification process. The first random number and the second random number are the key to generating an encryption key, and the first random number and the second random number are regenerated at intervals. Therefore, through the present invention, the device can be verified at intervals, and the encryption key can also be updated during the verification process, which greatly improves the security of power communication data. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A flowchart of a method for processing power communication data according to the present invention;
[0036] Figure 2 A schematic diagram showing the principle of the first terminal sending the third encrypted data according to the present invention;
[0037] Figure 3 This is a system structure diagram of a power communication data processing system of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0039] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0040] like Figure 1 As shown, a method for processing power communication data includes:
[0041] Step S1: The first terminal is provided with a first key table, which includes a plurality of first digital strings and corresponding first fingerprint strings.
[0042] Specifically, the first terminal is a device set up in the power dispatching center, and the power communication data sent is control data for the power equipment; the first key table in the first terminal includes multiple first digital strings, each of which is composed of bits (0 and 1) of the same length. The first terminal is also provided with a hash function, and the corresponding first fingerprint string is obtained by inputting the first digital string into the hash function. Preferably, the first digital string and the first fingerprint string have the same length, and each first digital string corresponds to a unique first fingerprint string, which is determined by the properties of the hash function. The first digital string can be manually compiled and pre-stored in the first terminal, or it can be automatically generated. In this embodiment, the first digital string is automatically generated, and the specific generation method will be introduced later.
[0043] Step S2: The first terminal generates a first random number at a preset time interval, extracts a first digital string and a first fingerprint string from a first key table, uses the first digital string to encrypt the first fingerprint string to obtain first encrypted data, and uses the first fingerprint string to encrypt the first random number to obtain second encrypted data.
[0044] The purpose of this step is to verify the second terminal receiving the data at regular intervals during the process of sending power communication data to ensure that the data recipient has not been tampered with; therefore, the first terminal generates a first random number at regular intervals, and the first random number is also composed of bits, and the length is the same as the length of the first digital string and the first fingerprint string; then the first digital string and the first fingerprint string are extracted from the first key table, and the extraction method can be random extraction, or can be extracted in sequence according to the order in the key table; after the extraction, the first digital string and the extracted first fingerprint string are XORed to obtain the first encrypted data, and the first fingerprint string and the first random number are XORed to obtain the second encrypted data.
[0045] Step S3: The first terminal merges the first encrypted data and the second encrypted data into third encrypted data based on a preset first conversion rule, and sends the third encrypted data to the second terminal.
[0046] Specifically, the first conversion rule is an alternating cascade principle. For example, the first encrypted data is 0000 and the second encrypted data is 1111. After using the first conversion rule, the two are merged into the third encrypted data 01010101.
[0047] Step S4: the first terminal receives instruction information from the second terminal, the instruction information is for the second terminal to decrypt the three encrypted data and is generated through a predetermined process, and the instruction information includes a second random number.
[0048] Step S5: If the first terminal successfully decrypts the instruction information, continue to execute step S5, otherwise terminate the transmission of the power communication data.
[0049] The detailed process of the second terminal generating instruction information is introduced later. After receiving the instruction information, the first terminal attempts to decrypt the instruction information using the first key table. Specifically, the first terminal uses the first digital string in the first key table to decrypt the instruction information in sequence. If the decryption is successful, it indicates that the second terminal has also successfully decrypted the third encrypted data, which means that the second terminal is the receiving end that correctly receives the data. At this time, the authentication of the second terminal by the first terminal is completed.
[0050] Step S6: The first terminal generates an encryption key based on the first random number and the second random number, uses the encryption key to encrypt the power communication data into a ciphertext, and sends it to the second terminal.
[0051] The first terminal performs an XOR operation on the first random number and the second random number to obtain an encryption key, uses the encryption key to encrypt the power communication data, and then sends it to the second terminal. Since the second terminal also holds the first random number and the second random number, it can also use the first random number and the second random number to generate an encryption key, and then decrypt the ciphertext through a reverse operation to decrypt the power communication data.
[0052] The first terminal in the present invention holds a first key table, which includes multiple first digital strings and a first fingerprint string. The first random number is then encrypted using the first key table held by itself to obtain first encrypted data, and the first fingerprint string is encrypted using the first digital string to obtain second encrypted data. The first encrypted data and the second encrypted data are merged and sent to the second terminal. The merging of the two encrypted data before sending ensures the security of the data. If the second terminal is a correct terminal, the second terminal can successfully decrypt the third encrypted data, generate instruction information and return it to the first terminal. Finally, the first terminal determines the correctness of the second terminal by judging whether the instruction information can be decrypted, thereby realizing verification of the second terminal.
[0053] In the present invention, a first random number is generated by a first terminal, and a second random number is generated by a second terminal, and the two also realize the exchange of random numbers during the verification process. The first random number and the second random number are the key to generating an encryption key, and the first random number and the second random number are regenerated at intervals. Therefore, through the present invention, the device can be verified at intervals, and the encryption key can also be updated during the verification process, which greatly improves the security of power communication data.
[0054] It is particularly noteworthy that, through the present invention, it is not necessary to directly share the key on the network, and the key used for encryption can be updated more conveniently during subsequent use.
[0055] In step S3 of this embodiment, the first terminal sending the third encrypted data to the second terminal includes the following steps:
[0056] The first terminal generates a first public key and a second public key, uses the first public key and the second public key to encrypt the third encrypted data to obtain the first data, and the first terminal sends the first data to the first transfer node.
[0057] Reference Figure 2 If the first terminal A wants to send a ciphertext, it will directly send the ciphertext to the second terminal B; if it is not a ciphertext, such as the third encrypted data D, the first terminal A generates a first public key and the second public key , using the first public key and the second public key Encrypt the third encrypted data in sequence to obtain the first data , then the first data Send to the first transit node Z1.
[0058] The first transfer node uses the pre-stored first private key to decrypt the first data, and then uses the third public key to encrypt the first data to obtain the second data. The first terminal generates a plurality of false data based on the second data, and the first transfer node distributes the second data and the false data to different second transfer nodes.
[0059] The first transit node Z1 pre-stores a first public key for decrypting The first private key , so when receiving the first data Then, use the first private key Decrypting the first data , get the data , and then use the third public key stored Encrypting Data Get the second data ; The first transfer node according to the second data Generate multiple false data, send the second data to the second transfer node Z2.3, send the false data to Z2.1 and Z2.2, and send the second data to the second terminal to generate notification information.
[0060] The second terminal determines a second transit node holding the second data, and obtains the second data from the second transit node. The second terminal decrypts the second data using the second private key and the third private key held by itself to obtain the third encrypted data.
[0061] After receiving the notification information, the second terminal sends a request to the second transfer node to determine which second transfer node holds the second data. After the determination is completed, the second data is obtained from the second transfer node, and the second private key held by the second terminal is used to obtain the second data. and the third private key Decrypt the second data , thereby obtaining the third encrypted data. Through this step, only the second terminal knows which second transfer node the second data is stored in, so it can directly obtain the data from the corresponding node; and for the data hijacker, since he does not know which second transfer node stores the real data, he needs to spend a lot of energy to verify, which increases his workload.
[0062] The advantage of the above scheme is that the ciphertext is directly transmitted between the first terminal and the second terminal, thereby speeding up the data communication efficiency and enabling the power communication data to be sent to the second terminal more quickly; and for the transmission of other data, since there is no timeliness requirement, the data is encrypted twice when it is transmitted, and a transit transmission method is adopted, which makes the data transmitted between the first terminal and the second terminal more secure. In addition, the data is decrypted and then encrypted in the first transit node, so that the data transmitted by the first terminal and the first transit node and the data received by the second terminal are not encrypted by different keys, and the data is not completely decrypted in the first transit node. All of the above measures have greatly improved the security of the data.
[0063] In this embodiment, the second terminal determines the second transit node holding all the second data including the following steps:
[0064] The first transit node generates a first authentication key and multiple second authentication keys, the first authentication key is sent along with the second data, and the second authentication key is sent along with the false data.
[0065] Specifically, both the first authentication key and the second authentication key are hexadecimal numbers. The first authentication key is generated based on a predetermined method, for example, it is generated as 500 for the first time. If it needs to be generated again, the generated value is 501; the second authentication key is randomly generated.
[0066] Each second transfer node generates a first value and a second value, the first value and the second value Satisfies the first formula, the first formula is: , where k is the first authentication key or the second authentication key.
[0067] The second transfer node then generates a third value based on the second formula, the third formula and the fourth formula respectively. , the fourth value and the fifth value , the second formula is: , the third formula is: , the fourth formula is: , where m is the third random number generated by the second transfer node, It is a preset calculation function, and each second transfer node sends the generated first value to the fifth value to the second terminal.
[0068] The second terminal generates the same first authentication key as the first transit node, calculates the second value based on the first formula, obtains the fourth value based on the third formula, and then calculates the sixth value and the seventh value based on the fifth formula and the sixth formula respectively. The fifth formula is: , the sixth formula is: ,in, and The fourth value and the second value are calculated for the second terminal, and the second terminal obtains a second transit node that makes the sixth value and the seventh value the same, and determines that the second transit node holds the second data.
[0069] The above process is deduced below. Here, the second transit node holding the second data is used as an example for explanation. The second transit node first generates a first value and a second value that satisfy the first formula. The second terminal holds the same first authentication key as the second transit node. After receiving multiple values from the second transit node, the second terminal first calculates the sixth value according to the fifth formula. In the fifth formula, ,and ,therefore, , in the sixth formula, ,and therefore , and according to the relation , so the sixth formula can be rewritten as Therefore, if the second terminal calculates the same sixth value and seventh value, it indicates that the second transit node and the second terminal both hold the first authentication key, so the node holding the first authentication key can be verified; in addition, the values sent by the second transit node to the second terminal are all processed values, so if the first authentication key is unknown, even if it is intercepted, the interceptor cannot use the intercepted value for verification.
[0070] In this embodiment, the second terminal generates instruction information including the following steps:
[0071] The second terminal is provided with a second conversion rule and a second key table, wherein the second conversion rule is the inverse rule of the first conversion rule, and the second key table includes a second digital string. After the second terminal receives the third encrypted data, it uses the second conversion rule to convert the third encrypted data to obtain the first encrypted data, and uses the second digital string to decrypt the first encrypted data to obtain the first fingerprint string. After the second terminal generates the second random number, it generates instruction information based on the first fingerprint string and the second random number.
[0072] After receiving the third encrypted data, the second terminal uses the second conversion rule to extract the first encrypted data and the second encrypted data from the third encrypted data, and then uses the second key table stored in itself to try to decrypt the first encrypted data. If the decryption is successful, the first digital string and the first fingerprint string are obtained, and then the first fingerprint string is used to decrypt the second encrypted data to obtain the first random number, which is convenient for the subsequent decryption of the received ciphertext; finally, the second terminal generates a second random number, uses the extracted first fingerprint string and the second random number to perform an XOR operation, generates instruction information, and returns the instruction information to the first terminal.
[0073] In this embodiment, the first digital string and the second digital string are generated based on the following steps:
[0074] The first terminal and the second terminal are respectively provided with conversion functions, which generate the first key and the second key based on the IP addresses of the first terminal and the second terminal respectively. The first terminal and the second terminal generate the first flag bit and the second flag bit respectively through the first key and the second key, and generate a communication token based on the first flag bit and the second flag bit.
[0075] The conversion function here is also a hash function. After the first terminal and the second terminal input their own IP addresses into the hash function, the hash function generates a first key and a second key composed of multiple bits respectively, and then obtains the last digit of the first key and the second key as the first flag bit and the second flag bit respectively. For example, if the first key and the second key are 0001 and 1000 respectively, then the first flag bit is 1 and the second flag bit is 0.
[0076] The first terminal and the second terminal store the same communication token generation method. For example, if the combination of the two flag bits is 00, communication token 1 is generated; if it is 01, communication token 2 is generated; if it is 10, communication token 3 is generated; and if it is 11, communication token 4 is generated.
[0077] The first terminal and the second terminal obtain the current time simultaneously and multiple times, input the current time into the conversion function in sequence, obtain multiple basic keys, and the first terminal and the second terminal combine the communication token with different basic keys to generate multiple first digital strings and second digital strings.
[0078] The first terminal and the second terminal obtain the current time simultaneously and multiple times, so the first terminal and the second terminal will obtain multiple identical times, for example, the first terminal stores the time 13:00 and 14:00, and the second terminal also stores the time 13:00 and 14:00; then the time is input into the hash function to obtain multiple basic keys, so that the first terminal and the second terminal have the same basic key, and finally, the first terminal and the second terminal use the communication token to perform XOR calculations with different basic keys respectively to obtain the same first and second digital strings, which enables the second terminal to decrypt the first encrypted data after receiving the first encrypted data, because the second digital string held by the second terminal is the same as the first digital string in the first terminal.
[0079] like Figure 3 As shown, the present invention also provides a system for processing power communication data, the system is used to implement the above-mentioned method for processing power communication data, and the system includes:
[0080] The first terminal is provided with a first key table, the first key table includes a plurality of first digital strings and corresponding first fingerprint strings, the first terminal generates a first random number at a preset time interval, extracts the first digital string and the first fingerprint string from the first key table, uses the first digital string to encrypt the first fingerprint string to obtain first encrypted data, uses the first fingerprint string to encrypt the first random number to obtain second encrypted data, the first terminal merges the first encrypted data and the second encrypted data into third encrypted data based on a preset first conversion rule, and sends the third encrypted data to the second terminal, the first terminal receives instruction information from the second terminal, the instruction information is generated by a predetermined process for the second terminal to decrypt the third encrypted data, the instruction information includes the second random number, if the first terminal successfully decrypts the instruction information, an encryption key is generated based on the first random number and the second random number, the power communication data is encrypted into ciphertext using the encryption key and sent to the second terminal, otherwise the transmission of the power communication data is terminated;
[0081] The second terminal is used to receive the third encrypted data and generate instruction information based on the third encrypted data;
[0082] The generating terminal is arranged in the first terminal, and is used to generate the first key table.
[0083] The present invention also provides a computer storage medium, which stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above-mentioned method for processing power communication data.
[0084] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0085] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0086] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned 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 specification.
[0087] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0088] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for processing power communication data, characterized in that: include: Step S1: The first terminal is provided with a first key table, wherein the first key table includes a plurality of first digital strings and corresponding first fingerprint strings; Step S2: the first terminal generates a first random number at a preset time interval, extracts the first digital string and the first fingerprint string from the first key table, uses the first digital string to encrypt the first fingerprint string to obtain first encrypted data, and uses the first fingerprint string to encrypt the first random number to obtain second encrypted data; Step S3: the first terminal merges the first encrypted data and the second encrypted data into third encrypted data based on a preset first conversion rule, and sends the third encrypted data to the second terminal; Step S4: the first terminal receives instruction information from the second terminal, the instruction information is generated by the second terminal through a predetermined process for decrypting the three encrypted data, and the instruction information includes a second random number; Step S5: If the first terminal successfully decrypts the instruction information, continue to execute step S5, otherwise terminate the transmission of power communication data; Step S6: the first terminal generates an encryption key based on the first random number and the second random number, uses the encryption key to encrypt the power communication data into a ciphertext, and sends the ciphertext to the second terminal; In step S3, the first terminal sending the third encrypted data to the second terminal includes the following steps: The first terminal generates a first public key and a second public key, uses the first public key and the second public key to encrypt the third encrypted data to obtain first data, and the first terminal sends the first data to the first transfer node; The first transfer node uses a pre-stored first private key to decrypt the first data, and then uses a third public key to encrypt the first data to obtain second data, the first terminal generates a plurality of false data based on the second data, and the first transfer node distributes the second data and the false data to different second transfer nodes; The second terminal determines, by the second transfer node, the second data, and obtains the second data from the second transfer node; the second terminal decrypts the second data using the second private key and the third private key held by the second terminal to obtain the third encrypted data; The second terminal determines the second transfer node holding all the second data including the following steps: The first transit node generates a first authentication key and a plurality of second authentication keys, the first authentication key is sent along with the second data, and the second authentication key is sent along with the false data; Each of the second transfer nodes generates a first value and the second value , the first value and the second value Satisfies the first formula, which is: , where k is the first authentication key or the second authentication key; The second transfer node then generates a third value based on the second formula, the third formula and the fourth formula respectively. , the fourth value and the fifth value , the second formula is: , the third formula is: , the fourth formula is: , where m is the third random number generated by the second transfer node, is a preset calculation function, and each of the second transfer nodes sends the first value to the fifth value generated to the second terminal; The second terminal generates the same first authentication key as the first transit node, calculates the second value based on the first formula, obtains the fourth value based on the third formula, and then calculates the sixth value and the seventh value based on the fifth formula and the sixth formula respectively, where the fifth formula is: , the sixth formula is: ,in, and The fourth value and the second value are calculated for the second terminal, and the second terminal obtains the second transfer node that makes the sixth value the same as the seventh value, and determines that the second transfer node holds the second data.
2. A method for processing power communication data according to claim 1, characterized in that: The second terminal generates the instruction information including the following steps: The second terminal is provided with a second conversion rule and a second key table, wherein the second conversion rule is the inverse rule of the first conversion rule, and the second key table includes a second digital string. After receiving the third encrypted data, the second terminal uses the second conversion rule to convert the third encrypted data to obtain the first encrypted data, and uses the second digital string to decrypt the first encrypted data to obtain the first fingerprint string. After generating the second random number, the second terminal generates the instruction information based on the first fingerprint string and the second random number.
3. A method for processing power communication data according to claim 2, characterized in that: The first digital string and the second digital string are generated based on the following steps: The first terminal and the second terminal are respectively provided with conversion functions, the conversion functions generate a first key and a second key based on the IP addresses of the first terminal and the second terminal respectively, the first terminal and the second terminal generate a first flag bit and a second flag bit respectively through the first key and the second key, and generate a communication token based on the first flag bit and the second flag bit; The first terminal and the second terminal obtain the current time simultaneously and multiple times, input the current time into the conversion function in sequence, and obtain multiple basic keys. The first terminal and the second terminal combine the communication token with different basic keys to generate multiple first digital strings and second digital strings.
4. A power communication data processing system, used to implement a power communication data processing method according to any one of claims 1 to 3, characterized in that: include: A first terminal is provided with a first key table, wherein the first key table includes a plurality of first digital strings and corresponding first fingerprint strings, wherein the first terminal generates a first random number at a preset time interval, extracts the first digital string and the first fingerprint string from the first key table, uses the first digital string to encrypt the first fingerprint string to obtain first encrypted data, uses the first fingerprint string to encrypt the first random number to obtain second encrypted data, and the first terminal merges the first encrypted data and the second encrypted data into third encrypted data based on a preset first conversion rule, and sends the third encrypted data to the second terminal, wherein the first terminal generates a first public key and a second public key, and uses the first public key and the second public key to encrypt the third encrypted data to obtain the first digital string. According to the present invention, the first terminal sends the first data to the first transfer node, the first transfer node uses the pre-stored first private key to decrypt the first data, and then uses the third public key to encrypt to obtain the second data, the first terminal generates multiple false data based on the second data, the first transfer node distributes the second data and the false data to different second transfer nodes, the second terminal determines the second transfer node holding the second data, and obtains the second data from the second transfer node, wherein the first transfer node generates a first authentication key and multiple second authentication keys, the first authentication key is sent with the second data, the second authentication key is sent with the false data, and each of the second transfer nodes generates a first value and the second value , the first value and the second value Satisfies the first formula, which is: , where k is the first authentication key or the second authentication key, and the second transit node generates a third value based on the second formula, the third formula and the fourth formula respectively. , the fourth value and the fifth value , the second formula is: , the third formula is: , the fourth formula is: , where m is the third random number generated by the second transfer node, is a preset calculation function, each of the second transfer nodes sends the generated first value to the fifth value to the second terminal, the second terminal generates the same first authentication key as the first transfer node, and calculates the second value based on the first formula, obtains the fourth value based on the third formula, and then calculates the sixth value and the seventh value based on the fifth formula and the sixth formula respectively, the fifth formula is: , the sixth formula is: ,in, and The fourth value and the second value calculated for the second terminal, the second terminal obtains the second transfer node that makes the sixth value the same as the seventh value, determines that the second transfer node holds the second data, the second terminal uses the second private key and the third private key held by itself to decrypt the second data to obtain the third encrypted data, the first terminal receives instruction information from the second terminal, the instruction information is generated by a predetermined process for the second terminal to decrypt the third encrypted data, the instruction information includes a second random number, if the first terminal successfully decrypts the instruction information, an encryption key is generated based on the first random number and the second random number, the encryption key is used to encrypt the power communication data into ciphertext and send it to the second terminal, otherwise the transmission of the power communication data is terminated; a second terminal, configured to receive the third encrypted data and generate the instruction information based on the third encrypted data; A generation terminal is arranged in the first terminal, and the generation terminal is used to generate the first key table.
5. A computer storage medium, characterized in that: The computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the method for processing power communication data according to any one of claims 1 to 3.
Citation Information
Patent Citations
A method, system and terminal device for encrypting power data
CN109104279B
Compression, encryption and transmission method and device for power data and server
CN115883203A
Link encryption processing method and device, link decryption processing method and device and computer equipment
CN113536348A
Method and apparatus for generating digital signature and server
WO2022116175A1