Power grid data encryption method and system generated by quantum random number
By combining a quantum random number generator with an offline database and maze diagram technology, the problems of high computational cost and limited encryption effectiveness in power grid data transmission are solved, achieving highly secure and efficient power grid data transmission.
Patent Information
- Application Number
- CN202511104277.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-11-07
AI Technical Summary
Existing technologies are computationally expensive and inefficient in power grid data transmission, and existing quantum random number generator encryption methods have limitations in encryption effectiveness.
A quantum random number generator is used in conjunction with an offline database to process power grid data. Through data cleaning, recombination and re-editing, a random number sequence is generated for encryption. Maze diagrams and AI-masked circuit diagrams are used for data packet transmission. Combined with network security detection and offline decryption, data transmission security is ensured.
It significantly improves the concealment and encryption strength of power grid data, reduces the risk of single-packet leakage, and achieves high-security encrypted transmission throughout the entire process, effectively resisting malicious cracking and data theft.
Smart Images

Figure CN120915532A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of encrypted communication, and particularly relates to a power grid data encryption method and system using quantum random number generation. BACKGROUND
[0002] Power grid data is core information of power system operation, covers power generation, power transmission, power distribution, power consumption, and includes real-time parameters such as voltage, current and power, and device state and energy consumption data. It supports power grid dispatching, fault diagnosis and energy efficiency optimization, and is the basis for efficient operation of smart grids.
[0003] An application patent application with the application number 202311581303.2 discloses a smart grid data encryption transmission method based on homomorphic signing, which comprises: a power operation center generates a public parameter and sends it to a user; the user generates a private key based on the public parameter, signs and encrypts power data to be transmitted in the user based on the public parameter and the private key, generates a user report and sends it to a gateway; the gateway aggregates the user report based on the homomorphic property of signing and encryption to obtain an aggregated report, and sends the aggregated report to the power operation center; the power operation center decrypts the aggregated report to obtain power data, and completes the smart grid data encryption transmission. The application aims to solve the problem that the prior art generally uses the method of encryption and then signing to meet the confidentiality and authentication in the data transmission process, which consumes high calculation cost and has low efficiency.
[0004] For the power grid data transmission scenario, a random number sequence is generated by a quantum random number generator for power grid data encryption, which can achieve good encryption protection effect, but the encryption effect itself is also constrained by the quantum random number generator. Therefore, a power grid data encryption method and system using quantum random number generation are provided. SUMMARY
[0005] In view of the above-mentioned defects of the prior art, the application provides a power grid data encryption method and system using quantum random number generation, which can effectively solve the problems of the prior art.
[0006] To achieve the above purpose, the application is implemented by the following technical solutions. The application discloses a power grid data encryption system using quantum random number generation, which comprises: The offline database is used for receiving power grid data to be transmitted, preprocessing the power grid data, and temporarily storing the power grid data; the random number generation module is used for picking up the power grid data in the offline database, and adapting the picked up power grid data to generate a random number sequence; the encryption module is used for receiving the power grid data stored in the offline database and the corresponding random number sequence generated in the random number generation module, and encrypting the power grid data based on the random number sequence; the transmission module is used for transmitting the encrypted power grid data to a preset receiving end; and the decryption module is used for decrypting the power grid data ciphertext received by the receiving end.
[0007] Further, the offline database is deployed on a computer device preset by a system end user, in an offline database running stage, the computer device is disconnected from a network, and the power grid data to be transmitted is transmitted to the offline database through a wired transmission, and the offline database synchronously preprocesses the power grid data, and the preprocessing includes data cleaning, data reorganization, and reediting; The data cleaning preprocessing of the power grid data is used for removing duplicate power grid data in the offline database, and all preprocessing operations of the offline database on the power grid data are in the offline database running stage. In the preprocessing of the data reorganization, the power grid data is subjected to:
[0008] Further, in the preprocessing of the data reorganization, the power grid data is subjected to: Logic1: traversing to pick up text information in each power grid data, identifying the intersection of the text information between the power grid data, counting the text contained in the intersection of the text information between the power grid data and removing the duplicates, obtaining a text set, and taking twice the number of texts in the text set to retrieve no less than the number of power grid data in the offline database, and the number of retrieved power grid data is even, and the power grid data not retrieved is processed again together with updated power grid data in the next system running; Logic2: selecting a text in the text set, identifying the power grid data pointed by the text, and selecting the text position in the two groups of power grid data newly identified as a truncation position, so that the two groups of power grid data are divided into four groups of sub-power grid data; Logic3: reorganizing the four groups of sub-power grid data, without changing the positions of the sub-power grid data, to obtain two groups of new power grid data, and the sub-power grid data corresponding to each of the two groups of new power grid data is from different original power grid data; Based on the logics of Logic2 to Logic3, the power grid data is reorganized; The intersection of the text information between the identified power grid data is derived from the middle section data content of each power grid data when performing the preprocessing operation of data reorganization, that is, the power grid data is equally divided into four parts, and the data content of the middle two parts is the middle section data content. There is a duplicate word error in each group of new power grid data, that is, there are two consecutive determined truncation positions for the text due to the reorganization operation.
[0009] Further, the power grid data is subjected to re-editing preprocessing, and is subjected to: The computer device where the offline database is installed has a maze generation software, obtains all new power grid data after data reorganization, and performs re-editing on the new power grid data one by one. Obtain a group of new power grid data, control the maze generation software to generate a maze map with an entrance and exit on the left and right sides and only one passable channel between the entrance and exit; Adjust the size of the text and characters in the new power grid data to adapt to the width of the passable channel in the maze map, and then fill the text and characters in the new power grid data from the entrance of the maze map along the passable channel to the exit, so that all the text and characters in the new power grid data are arranged equidistantly and uniformly in the passable channel of the maze map; In the passable channel of the maze map filled with all the text and character information in the new power grid data, obtain the text and characters in the order from top to bottom and from left to right, arrange the text and characters in the order of obtaining the text and characters, and obtain the new power grid data after re-editing; The maze generation software is any one of iLabyrinth, AIMazeGenerator, and CSMazes, and each group of new power grid data after re-editing and its corresponding maze map form a data package.
[0010] Further, the random number generation module is integrated with a quantum random number generator, the number of power grid data picked up by the random number generation module each time is not less than two groups, and the power grid data picked up in the offline database is a data package composed of new power grid data after re-editing and its corresponding maze map. The maze map in the data package is disguised as a circuit diagram based on AI, the AI generated part in the circuit diagram is represented in a color different from the maze map, and in the process of disguising the maze map as a circuit diagram based on AI, the circuit diagram retains all the structure of the maze map.
[0011] Further, the random number generation module adapts the number of bits of the generated random number sequence when generating a random number sequence corresponding to the power grid data. ; In the formula: The bit number of the random number sequence generated by the random number generation module for the power grid data; The byte length of the power grid data to be encrypted; Generate a millisecond timestamp for the data Process as an integer in the range of [0, 999999]; The first 8 bits of the SHA-256 hash value of the data block; The 16-bit seed value of the quantum random number generator; The 16-bit seed value of the quantum random number generator; Wherein, .
[0012] Further, the encryption module runs in the stage, the data packet composed of the power grid data received in the offline database, i.e. the newly edited new power grid data and its corresponding maze map, and the encryption module encrypts the data packet according to the preset encryption algorithm and the random number sequence; The transmission module runs in the stage, first determines the receiving end of the encrypted power grid data, synchronously detects the data transmission network security based on any existing network security detection algorithm, and when the data transmission network security is detected, executes the transmission of the encrypted power grid data. Wherein, the system runs every time, after all the encrypted power grid data are transmitted to the receiving end, the decryption module is triggered to run.
[0013] Further, the decryption module runs in the stage, traverses all the received encrypted power grid data, obtains the random number sequence corresponding to each encrypted power grid data, decrypts the encrypted power grid data based on the random number sequence, obtains a group of newly edited new power grid data and an AI camouflaged circuit diagram, removes the AI generated part in the circuit diagram to obtain the maze map body, further identifies the entrance and the only passable passage in the maze map, fills the newly edited new power grid data into the passable passage from the entrance of the passable passage, so that the newly edited new power grid data is evenly distributed in the passable passage between the entrances and exits of the maze map, and finally rearranges the newly edited new power grid data according to the entrance of the maze map along the passable passage to the direction of the exit of the maze map, to obtain the original power grid data; The decryption module is deployed in the computer equipment used in the receiving end, and after the computer equipment receives all the encrypted power grid data and the random number sequence corresponding to each encrypted power grid data through the decryption module, the network connection is disconnected for offline decryption operation; Wherein, the random number sequence corresponding to each encrypted power grid data is shared to the receiving end through a temporary secure channel or an offline pre-shared manner.
[0014] Further, the computer device where the offline database is located is connected with the random number generation module through a wireless network, the random number generation module is electrically connected with an encryption module through a medium, the encryption module is connected with a transmission module through a wireless network, and the transmission module is connected with the computer device where the decryption module is located through a wireless network.
[0015] In another aspect, a power grid data encryption method using quantum random number generation includes the following steps: Receiving power grid data to be transmitted, performing data cleaning, data reorganization and re-editing processing on the power grid data, and temporarily storing the power grid data; Applying a quantum random number generator combined with a preset logic to generate a random number sequence adapted to the temporarily stored power grid data; Encrypting the corresponding power grid data according to a preset encryption algorithm combined with the random number sequence; Setting a receiving end, detecting the security of the data transmission network used by the encrypted power grid data, and transmitting the encrypted power grid data to the receiving end when the detection result is safe; After all the encrypted power grid data is received at the receiving end, the encrypted power grid data is decrypted to restore each encrypted power grid data to the original power grid data.
[0016] Compared with the known prior art, the technical scheme provided by the present application has the following beneficial effects: The present application provides a power grid data encryption method and system using quantum random number generation. In the running process, the method and system process the power grid data to be transmitted offline, cut off the network connection and receive the data in a wired manner, combine data cleaning and deduplication, unique logic data reorganization and maze map driven re-editing, greatly improve the concealment of the original form of data, the data reorganization is based on the intersection recognition of words and the cross-reorganization of sub-data, accompanied by characteristic double word marks, increases the difficulty of unauthorized analysis, the re-editing embeds the data into a single-channel maze and reconstructs it in a specific order, combines AI camouflage maze with circuit diagram, further confuses the data structure, and relies on quantum random number generation to generate a random number sequence adapted to the characteristics of the data, the bit number of which is associated with the length of the data, the timestamp and other multi-dimensional parameters, ensuring that the randomness is more unpredictable, strengthening the encryption strength, finally detecting the network security before transmission, and performing offline operation in the decryption stage, synchronously ensuring the transmission and decryption safety, and each transmission is not less than two data packets, reducing the risk of single packet leakage, realizing the high security encryption transmission of the whole process of the power grid data, effectively resisting malicious cracking and data theft. BRIEF DESCRIPTION OF DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0018] Figure 1 A structure diagram of a power grid data encryption system using quantum random number generation; Figure 2 A flowchart of a power grid data encryption method using quantum random number generation. DETAILED DESCRIPTION
[0019] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0020] The present application will be further described below with reference to the embodiments. Embodiment 1
[0021] A power grid data encryption system using quantum random number generation of the present embodiment, as shown in Figure 1 , includes: An offline database for receiving power grid data to be transmitted, pre-processing the power grid data and temporarily storing the power grid data; The offline database is deployed on a computer device preset by a system end user. In the offline database running stage, the computer device is disconnected from the network, and the power grid data to be transmitted is transmitted to the offline database through a wired transmission. The offline database synchronously pre-processes the power grid data, and the pre-processing includes data cleaning, data reorganization and re-editing; The data cleaning pre-processing of the power grid data is used to remove duplicate power grid data in the offline database. All pre-processing operations of the offline database on the power grid data are in the offline database running stage; Among them, after the offline database completes the pre-processing of the power grid data, each power grid data is temporarily stored in the offline database in the form of a data packet. When the power grid data is encrypted and transmitted, the number of data packets transmitted synchronously at a time is not less than two; When the power grid data is pre-processed by data reorganization, it is subject to: Logic1: Traverse each power grid data to pick up the text information, identify the intersection of text information between each power grid data, count the text contained in the intersection of text information between each power grid data and remove duplicates, obtain a text set, and take no less than twice the number of texts in the text set from the offline database, and the number of power grid data taken is even, and the power grid data not taken is processed again together with the updated power grid data in the next system operation; Logic2: Select a text in the text set, identify the power grid data pointed by the text, and select the text position in the two groups of power grid data identified as the truncation position, so that the two groups of power grid data are divided into four groups of sub-power grid data; Logic3: Recombination of the four groups of sub-power grid data, the position of the sub-power grid data is not changed during recombination, and two groups of new power grid data are obtained, and the sub-power grid data corresponding to each of the two groups of new power grid data obtained by recombination are all from different original power grid data; Based on the logic of Logic2~Logic3, recombine each power grid data; It should be noted that the position of the sub-power grid data is not changed in Logic3, and here "position" refers to the relative order of the characters in the sub-power grid data remaining unchanged, and "recombination" refers to the cross combination of sub-data segments from different original power grid data. Specifically, after processing by Logic2, four groups of sub-power grid data are obtained (assuming A1, A2 from power grid data A, B1, B2 from power grid data B), and the recombination operation of Logic3 is to combine A1 with B2 and B1 with A2 to form two groups of new power grid data. In this process, the order of characters in A1, A2, B1, and B2 remains unchanged, and only the combination relationship between different sub-data segments is changed, ensuring that the two groups of new power grid data obtained by recombination each correspond to sub-power grid data from different original power grid data.
[0022] Among them, when the power grid data performs the preprocessing operation of data recombination, the identified intersection of text information between each power grid data is derived from the middle segment data content of each power grid data, i.e. the power grid data is equally divided into four parts, and the data content of the middle two parts is the middle segment data content; There is a place of overlapping character error in each group of new power grid data, i.e. two consecutive determined truncation positions due to recombination operation; The power grid data is subjected to: The computer device where the offline database is installed has a maze generation software, which obtains all the new power grid data after data recombination, and performs re-editing on the new power grid data one by one; A new power grid data is obtained, and the maze generation software is controlled to generate a maze map with the entrance and exit on the left and right sides and only one passable channel between the entrance and exit; The characters in the new power grid data are adapted to the width of the passable channel in the maze map by size adjustment, and then the characters in the new power grid data are continuously filled from the entrance of the maze map along the passable channel to the exit, so that all the characters in the new power grid data are arranged equidistantly and uniformly in the passable channel in the maze map; In the order from top to bottom and from left to right, the characters and characters in the passable channel of the maze map filled with all the character and character information in the new power grid data are obtained, and the characters and characters are arranged in the order of obtaining the characters and characters, to obtain the reedited new power grid data; Wherein, the maze generation software is any one of iLabyrinth, AIMazeGenerator and CSMazes, and each group of reedited new power grid data and its corresponding maze map form a data package; The random number generation module is used for picking up power grid data in the offline database, and generating a random number sequence by adapting the picked up power grid data; The random number generation module is integrated by quantum random number generator, and the number of picked up power grid data by the random number generation module is not less than two groups each time, and the power grid data picked up in the offline database by the random number generation module is: the data package composed of the reedited new power grid data and its corresponding maze map; Wherein, the maze map in the data package is disguised as a circuit diagram based on AI, and the AI generated part in the circuit diagram is represented in a color different from the maze map, and in the process of disguising the maze map as a circuit diagram based on AI, the circuit diagram retains all the structure of the maze map; The following illustrates the key part of the AI code for disguising the maze map as a circuit diagram: import numpy as np import cv2 from PIL import Image, ImageDraw, ImageFont import random import os class MazeToCircuit: def __init__(self, maze_path, output_path=None): self.maze_path = maze_path self.output_path = output_path or "circuit_maze.png" self.maze_img = None self.circuit_img = None self.width, self.height = 0, 0 self.maze_structure = None # Color definitions (for differentiating circuit and maze colors) self.maze_wall = (0,0,0); self.maze_path = (255,255,255) self.base = (200,100,100); self.traces = [(50,150,250),(250,50,50),(50,250,50),(250,250,50),(150,50,250)] self.components = [(200,200,200),(250,180,50),(100,100,100),(200,150,100)] self.solder = (250,220,100) def load_maze(self): if not os.path.exists(self.maze_path): raise FileNotFoundError(f"File does not exist: {self.maze_path}") self.maze_img = Image.open(self.maze_path).convert("RGB") self.width, self.height = self.maze_img.size self.maze_structure = np.array(self.maze_img) is_wall = np.all(self.maze_structure == self.maze_wall, axis=2) is_path = np.all(self.maze_structure == self.maze_path, axis=2) if not (np.any(is_wall) and np.any(is_path)): raise ValueError("迷宫需黑色墙壁和白色路径") return self def generate_circuit(self): if self.maze_structure is None: self.load_maze() self.circuit_img = Image.new("RGB", (self.width, self.height),self.base) draw = ImageDraw.Draw(self.circuit_img) path_pixels = np.transpose(np.nonzero(np.all(self.maze_structure ==self.maze_path, axis=2))) self._generate_tracks(draw, path_pixels) self._add_components(draw, path_pixels) self._add_solder(draw, path_pixels) self._add_labels(draw) return self def _generate_tracks(self, draw, path_pixels): segments = self._find_segments(path_pixels) for seg in segments: color = random.choice(self.traces) width = random.randint(1,3) points = [(p[1], p[0]) for p in seg] jittered = [(x+random.randint(-1,1), y+random.randint(-1,1)) for x,y in points] for i in range(len(jittered)-1): draw.line([jittered[i], jittered[i+1]], fill=color, width=width) def _find_segments(self, path_pixels): path_pixels = sorted(path_pixels, key=lambda p: (p[0], p[1])) segments, current = [], [] for p in path_pixels: if not current: current.append(p); continue last = current[-1] if (abs(p[0]-last[0])<=1 and p[1]==last[1]) or (abs(p[1]-last[1])<=1and p[0]==last[0]): current.append(p) else: if len(current)>5: segments.append(current) current = [p] if len(current)>5: segments.append(current) return segments def _add_components(self, draw, path_pixels): comp_points = random.sample(path_pixels.tolist(), min(50, len(path_pixels) / / 100)) for p in comp_points: y, x = p; color = random.choice(self.components) t = random.randint(0, 3) if t == 0: # Resistor draw.rectangle([(x - 3, y - 1), (x + 3, y + 1)], fill = color) draw.line([(x - 3, y), (x - 6, y)], fill = color) draw.line([(x + 3, y), (x + 6, y)], fill = color) elif t == 1: # Capacitor draw.line([(x - 4, y), (x - 2, y)], fill = color) draw.line([(x - 2, y - 2), (x - 2, y + 2)], fill = color) draw.line([(x + 2, y - 2), (x + 2, y + 2)], fill = color) draw.line([(x + 2, y), (x + 4, y)], fill = color) elif t == 2: # Diode draw.polygon([(x - 3, y), (x, y - 3), (x + 3, y), (x, y + 3)], fill = color) draw.line([(x - 5, y), (x - 3, y)], fill = color) draw.line([(x + 3, y), (x + 5, y)], fill = color) elif t == 3: # IC w, h = random.randint(6, 10), random.randint(4, 6) draw.rectangle([(x - w / / 2, y - h / / 2), (x + w / / 2, y + h / / 2)], fill = color) for i in range(w / / 2): px = x - w / / 2 + i * 2 draw.line([(px,y-h / / 2),(px,y-h / / 2-2)], fill=color) draw.line([(px,y+h / / 2),(px,y+h / / 2+2)], fill=color) def _add_solder(self, draw, path_pixels): joints = random.sample(path_pixels.tolist(), min(100, len(path_pixels) / / 50)) for p in joints: y, x = p; r = random.randint(1,2) draw.ellipse([(x-r,y-r),(x+r,y+r)], fill=self.solder) def _add_labels(self, draw): try: try: font = ImageFont.truetype("arial.ttf",10) except: font = ImageFont.load_default() labels = ["VCC","GND","OUT","IN","CLK","DATA","RST","EN"] for _ in range(10): lbl = random.choice(labels) x,y = random.randint(10,self.width-20), random.randint(10,self.height-10) draw.text((x,y), lbl, font=font, fill=(0,0,0)) except: pass def save(self): if self.circuit_img is None: self.generate_circuit() self.circuit_img.save(self.output_path) return self.output_path if __name__ == "__main__": MazeToCircuit("maze.png", "circuit_maze.png").generate_circuit().save(); It should be noted that the original structure of the maze map keeps the black wall (0, 0, 0) and the white path (255, 255, 255) unchanged, and the AI-generated circuit element part adopts the differentiated color defined in the code, including the circuit substrate color (200, 100, 100), the circuit trace color group such as (50, 150, 250), (250, 50, 50), etc., the electronic component color group such as (200, 200, 200), (250, 180, 50), etc., and the solder joint color (250, 220, 100), etc. Through this color differentiation processing, the AI-generated part in the circuit diagram can be clearly distinguished from the black and white two colors of the maze map, which facilitates the identification and separation of the image content of the two different sources in the subsequent processing.
[0023] When the random number generation module generates a random number sequence corresponding to the power grid data, the adaptation operation is to control the number of bits of the generated random number sequence: ; In the formula: is the number of bits of the random number sequence generated by the random number generation module corresponding to the power grid data; is the byte length of the power grid data to be encrypted; is the millisecond timestamp of data generation, which is processed to be an integer in the range of [0, 999999] through ; is the first 8 bits of the SHA-256 hash value of the data block; is the 16-bit seed value of the quantum random number generator; is the 16-bit seed value of the quantum random number generator; Among them, ; The above formula dynamically determines the number of bits of the random number sequence through the linkage of the byte length of the power grid data to be encrypted, the millisecond timestamp, the first 8 bits of the SHA-256 hash value of the data block, and the 16-bit seed value of the quantum random number generator, realizing the adaptation of the random number sequence to the power grid data; In summary, this technical solution breaks through the traditional model of fixed number of bits or single parameter determination of random numbers. It introduces timestamps to ensure real-time dynamic randomness, hash values to associate data characteristics, and quantum seed values to provide true randomness, making the generated random number sequence more difficult to predict. It adapts to the encryption module's encryption requirements for power grid data, enhances encryption security, and its formula operation parameters have matching dimensions and clear functions, jointly supporting the accurate adaptation of random number sequences and power grid data. The encryption module is used to receive power grid data stored in the offline database and the corresponding random number sequence generated in the random number generation module, and encrypt the power grid data based on the random number sequence; During the operation of the encryption module, the data packet consisting of the power grid data received from the offline database (i.e., the re-edited new power grid data) and its corresponding maze diagram is then encrypted by the encryption module using a random number sequence according to a preset encryption algorithm. Pre-defined encryption algorithms, such as stream cipher algorithms based on quantum random numbers; During the operation of the transmission module, the receiving end of the encrypted power grid data is first determined, and the network security of the data transmission is simultaneously detected based on any existing network security detection algorithm. When the network security of the data transmission is detected, the transmission of the encrypted power grid data is executed. Each time the system runs, the decryption module is triggered after all encrypted power grid data has been transmitted to the receiving end. The transmission module is used to transmit encrypted power grid data to a preset receiving end; The decryption module is used to decrypt the ciphertext of the power grid data received by the receiving end. During the decryption module's operation phase, it iterates through all received encrypted power grid data, obtains the corresponding random number sequence for each encrypted power grid data, and decrypts the encrypted power grid data based on the random number sequence to obtain a set of re-edited new power grid data and a circuit diagram disguised by AI. Then, it removes the AI-generated part from the circuit diagram to obtain the maze diagram itself. It further identifies the entrances and exits and the only passable passage in the maze diagram. Starting from the entrance of the passable passage, it fills the passable passage with the re-edited new power grid data along the passable passage, so that the re-edited new power grid data is evenly distributed at equal intervals in the passable passages between the entrances and exits of the maze diagram. Finally, it rearranges the re-edited new power grid data from the maze diagram entrance along the passable passage towards the maze diagram exit to obtain the original power grid data. The decryption module is deployed in the computer equipment used at the receiving end. After the computer equipment receives all the encrypted power grid data and the corresponding random number sequence of each encrypted power grid data through the decryption module, it disconnects the network connection to perform offline decryption operation. Among them, the random number sequence corresponding to each encrypted power grid data is shared to the receiving end through a temporary secure channel or offline pre-sharing method; The temporary secure channel is a pre-used or set secure data communication channel; The computer device where the offline database is located is connected to the random number generation module through a wireless network, the random number generation module is electrically connected to the encryption module through a medium, the encryption module is connected to the transmission module through a wireless network, and the transmission module is connected to the computer device where the decryption module is located through a wireless network.
[0024] In this embodiment, the offline database receives power grid data that needs to be transmitted, pre-processes and temporarily stores the power grid data, the random number generation module is run after the offline database to pick up the power grid data, adapt the picked power grid data to generate a random number sequence, and then the encryption module receives the power grid data stored in the offline database and the corresponding random number sequence generated by the random number generation module, encrypts the power grid data based on the random number sequence, and transmits the encrypted power grid data to the preset receiving end through the transmission module. Finally, the received power grid data ciphertext is decrypted by the decryption module.
[0025] Through the system in the above embodiment, the security risks caused by network connection are reduced by offline processing of power grid data, the accuracy is improved by data cleaning and deduplication, and the data complexity is increased by reorganization and reediting. Combined with quantum random number encryption, the encryption strength is high and difficult to crack, the network security is detected before transmission, the receiving end is decrypted offline, which can effectively protect the security of power grid data transmission, reduce the risk of leakage, and at the same time, the efficiency and reliability are improved by synchronous transmission of multiple data packets; In addition, in the power grid data decryption stage, all power grid data need to be obtained for unified decryption, which more effectively protects the security of data encryption transmission, so that even if the power grid data is partially stolen, the stealing end cannot restore the original and complete power grid data. Embodiment 2
[0026] In the specific implementation layer, on the basis of embodiment 1, this embodiment refers to Figure 2 Further specific description is made to the power grid data encryption system using quantum random number generation in embodiment 1: A power grid data encryption method using quantum random number generation, comprising the following steps: Receiving power grid data that needs to be transmitted, and temporarily storing the power grid data after data cleaning, data reorganization and reediting processing; Applying a quantum random number generator combined with a preset logic to generate a random number sequence adapted to the temporarily stored power grid data; Encrypting the corresponding power grid data according to a preset encryption algorithm combined with the random number sequence; Setting a receiving end, detecting the security of the data transmission network used by the encrypted power grid data, and transmitting the encrypted power grid data to the receiving end when the detection result is safe; After all the encrypted power grid data is received at the receiving end, the encrypted power grid data is decrypted to restore each encrypted power grid data to the original power grid data.
[0027] In summary, the method and system in the above embodiments greatly improve the concealment of the original form of data by offline processing of the to-be-transmitted power grid data, cutting off the network connection and receiving the data in a wired manner, combining data cleaning and deduplication, unique logical data restructuring, and labyrinth map-driven reediting. The data restructuring is based on the intersection recognition of words and cross-restructuring of sub-data, accompanied by characteristic repeated word markers to increase the difficulty of unauthorized analysis. The reediting embeds the data in a single-channel labyrinth and reconstructs it in a specific order, combines AI camouflage labyrinth with circuit diagram to further confuse the data structure, and relies on quantum random number to generate a random number sequence that adapts to the characteristics of the data. The number of bits is related to the length of the data, the timestamp, and other multi-dimensional parameters to ensure that the randomness is more unpredictable, strengthening the encryption strength. Finally, through the detection of network security before transmission, the decryption stage is operated offline, synchronously ensuring the safety of transmission and decryption. Each transmission is not less than two data packets, reducing the risk of single packet leakage, and realizing the high-security encryption transmission of power grid data throughout the whole process, effectively resisting malicious cracking and data theft.
[0028] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit it; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements will not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A power grid data encryption system utilizing quantum random number generation, characterized by, The application relates to a power grid data transmission system, which comprises the following parts: an offline database for receiving power grid data to be transmitted, preprocessing the power grid data and temporarily storing the power grid data; a random number generation module for picking up the power grid data in the offline database, adapting the picked-up power grid data to generate a random number sequence; an encryption module for receiving the power grid data stored in the offline database and the corresponding random number sequence generated in the random number generation module, encrypting the power grid data based on the random number sequence; a transmission module for transmitting the encrypted power grid data to a preset receiving end; and a decryption module for decrypting the power grid data ciphertext received by the receiving end.
2. A power grid data encryption system utilizing quantum random number generation according to claim 1, characterized in that, The offline database is arranged on a computer device preset by a system end user, and during the offline database operation stage, the computer device is disconnected from the network, the power grid data to be transmitted is transmitted to the offline database through a wire, and the offline database synchronously preprocesses the power grid data, wherein the preprocessing comprises data cleaning, data reorganization and reediting. The data cleaning preprocessing of the power grid data is used for removing the repeated power grid data in the offline database, and all preprocessing operations of the offline database on the power grid data are performed during the offline database operation stage. After the preprocessing of the power grid data by the offline database is completed, each power grid data is temporarily stored in the offline database in the form of a data packet, and when the power grid data is encrypted and transmitted, the number of synchronously transmitted data packets is not less than two each time.
3. A power grid data encryption system utilizing quantum random number generation according to claim 2, characterized in that, When the power grid data is subjected to the preprocessing of data reorganization, the following logics are obeyed: Logic 1: traversing the text information in each power grid data, identifying the text information intersection among the power grid data, counting the contained text in the text information intersection among the power grid data and removing the repeated text, obtaining a text set, taking twice the number of texts in the text set as a lower limit, calling not less than the number of power grid data in the offline database, and the number of called power grid data is even, and the power grid data not called is processed again together with the updated power grid data in the next system operation; Logic 2: selecting a text in the text set, identifying the power grid data pointed by the text, and selecting the text position in the two groups of newly identified power grid data as a truncation position, so that the two groups of power grid data are divided into four groups of sub power grid data; Logic 3: reorganizing the four groups of sub power grid data, and not changing the positions of the sub power grid data during reorganization, so as to obtain two groups of new power grid data, and the sub power grid data corresponding to each of the two groups of new power grid data is obtained from different original power grid data; The power grid data is reorganized based on the logics from Logic 2 to Logic 3; During the preprocessing operation of data reorganization of the power grid data, the text information intersection among the power grid data is obtained from the middle data content of each power grid data, that is, the power grid data is equally divided into four parts, and the data content of the middle two parts is the middle data content; In each group of new power grid data, there is a place of overlapping word error, that is, there are two continuous determined truncation positions of texts due to the reorganization operation.
4. The power grid data encryption system utilizing quantum random number generation of claim 2, wherein, During the preprocessing of reediting of the power grid data, the following logics are obeyed: The computer device where the offline database is located is installed with a maze generation software, obtains all new power grid data after data reorganization, and performs re-editing on the new power grid data one by one; A set of new power grid data is obtained, and the maze generation software is controlled to generate a maze map with an entrance and exit on the left and right sides and only one passable channel between the entrance and exit; The characters and words in the new power grid data are adjusted in size to adapt to the width of the passable channel in the maze map, and then the characters and words in the new power grid data are continuously filled from the entrance to the exit along the passable channel, so that all the characters and words in the new power grid data are arranged equidistantly and uniformly in the passable channel in the maze map; In the order from top to bottom and from left to right, the characters and words are obtained in the passable channel of the maze map filled with all the character and word information in the new power grid data, and the characters and words are arranged in the order of obtaining, to obtain the re-edited new power grid data; The maze generation software is any one of iLabyrinth, AIMazeGenerator, and CSMazes, and each set of re-edited new power grid data and its corresponding maze map form a data package.
5. The power grid data encryption system utilizing quantum random number generation of claim 1, wherein, The random number generation module is integrated with a quantum random number generator, the number of power grid data picked up by the random number generation module each time is not less than two groups, and the power grid data picked up by the random number generation module in the offline database is a data package composed of re-edited new power grid data and its corresponding maze map; In the data package, the maze map is disguised as a circuit diagram based on AI, the AI generated part in the circuit diagram is represented in a color different from the maze map, and in the process of disguising the maze map as a circuit diagram based on AI, the circuit diagram retains all the structure of the maze map.
6. The power grid data encryption system utilizing quantum random number generation of claim 1, wherein, When the random number generation module generates a random number sequence corresponding to the power grid data, the adaptation operation controls the number of bits of the generated random number sequence: ; In the formula: is the number of bits of the random number sequence generated by the random number generation module for the power grid data; is the byte length of the power grid data to be encrypted; is the millisecond-level timestamp generated for the data, which is obtained by processing is an integer in the range of [0, 999999]; is the first 8 bits of the SHA-256 hash value of the data block; is the 16-bit seed value of the quantum random number generator; is the 16-bit seed value of the quantum random number generator; wherein .
7. The power grid data encryption system utilizing quantum random number generation of claim 1, wherein, In the encryption module running stage, the data package composed of the re-edited new power grid data and its corresponding maze map received in the offline database, and the encryption module applies the random number sequence to the data package according to the preset encryption algorithm for encryption; In the transmission module running stage, first, the receiving end of the encrypted power grid data is determined, the security of the data transmission network is detected based on any existing network security detection algorithm, and when the security of the data transmission network is detected, the transmission of the encrypted power grid data is performed; Wherein, the system triggers the decryption module to run after all the encrypted power grid data are transmitted to the receiving end each time.
8. The power grid data encryption system utilizing quantum random number generation of claim 1, wherein, The decryption module runs in a stage, traverses all received completed encrypted power grid data, obtains a random number sequence corresponding to each completed encrypted power grid data, decrypts the completed encrypted power grid data based on the random number sequence, obtains a set of newly edited new power grid data and an AI camouflaged circuit diagram, removes the AI generated part in the circuit diagram to obtain the maze diagram body, further identifies the entrance and the only passable channel in the maze diagram, fills the newly edited new power grid data into the passable channel from the entrance of the passable channel, makes the newly edited new power grid data equidistantly and uniformly distributed in the passable channel between the entrances and exits of the maze diagram, and finally rearranges the newly edited new power grid data in the direction from the entrance to the exit of the maze diagram along the passable channel to obtain the original power grid data. The decryption module is deployed in a computer device used in the receiving end, and after the computer device receives all the completed encrypted power grid data and the random number sequence corresponding to each completed encrypted power grid data through the decryption module, the network connection is disconnected for offline decryption operation. The random number sequence corresponding to each completed encrypted power grid data is shared to the receiving end through a temporary secure channel or an offline pre-shared manner.
9. The power grid data encryption system utilizing quantum random number generation of claim 1, wherein, The computer device where the offline database is located is interactively connected with the random number generation module through a wireless network, the random number generation module is electrically connected with the encryption module through a medium, the encryption module is interactively connected with the transmission module through a wireless network, and the transmission module is interactively connected with the computer device where the decryption module is located through a wireless network.
10. A method for power grid data encryption using quantum random number generation, the method being a method for implementing the power grid data encryption system using quantum random number generation according to any one of claims 1 to 9, characterized in that, The method comprises the following steps: Receiving power grid data to be transmitted, temporarily storing the power grid data after data cleaning, data reorganization and re-editing processing; Applying a quantum random number generator combined with a preset logic to generate a random number sequence adapted to the temporarily stored power grid data; Encrypting the corresponding power grid data according to a preset encryption algorithm combined with the random number sequence; Setting a receiving end, detecting the security of the data transmission network used for the encrypted power grid data, and when the detection result is safe, transmitting the encrypted power grid data to the receiving end; After all the encrypted power grid data are received in the receiving end, decrypting the encrypted power grid data to restore each encrypted power grid data to the original power grid data.
Citation Information
Patent Citations
Smart power grid data encryption transmission method and system based on homomorphic signcryption
CN117459211A