Electric power data network parameter rapid configuration system based on deep learning

Through a power data network parameter rapid configuration system based on deep learning, the problems of differences between devices, rigid configuration processes and insufficient security in traditional configuration methods are solved, and efficient, accurate and secure configuration management and issuance are achieved.

CN119520277APending Publication Date: 2025-02-25STATE GRID JIANGXI ELECTRIC POWER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411646308.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The traditional power data network equipment configuration methods have problems such as differences among equipment, rigid configuration process, frequent human errors, large time and manpower consumption, and insufficient security of configuration file transmission.

Method used

A power data network parameter rapid configuration system based on deep learning is adopted, and unified configuration management of equipment of different manufacturers is achieved through configuration collection and processing modules, configuration analysis modules, configuration file generation modules and rapid configuration modules. The system uses the YANG model and the Tree-LSTM model to convert and parse configuration files, generates configuration files that meet the expected network behavior, and achieves secure issuance through quantum AES encryption and OF-CONFIG protocols.

Benefits of technology

It improves the accuracy and reliability of configuration management, simplifies the parsing and generation of configuration files, reduces human errors, improves the automation level and efficiency of network operation and maintenance, and ensures the secure transmission of configuration files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520277A_ABST
    Figure CN119520277A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power network systems, and provides a power data network parameter rapid configuration system based on deep learning, a configuration collection and processing module collects existing switch configuration files and converts the files into a YANG model, a configuration analysis module converts the YANG model into a configuration tree, and the configuration tree is used for analyzing the configuration tree. A Tree-LSTM model is utilized to accurately extract configuration parameter key values in a configuration file, and a configuration file generation module ensures that a newly generated configuration file can accord with expected network behaviors to the greatest extent through optimal matching of configuration tree nodes in a configuration analysis module. The rapid configuration module combines quantum AES encryption and a configuration file issuing method of an OF-CONFIG protocol, and realizes automatic and safe issuing of the configuration file of the network access equipment to complete rapid configuration by performing dynamic encryption and safe transmission of a secret key on the configuration file; according to the invention, the flexibility and expansibility of the network are improved through standardization and centralized management, and the confidentiality and reliability of network configuration are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power network systems, and in particular to a deep learning-based rapid configuration system for power data network parameters. Background Art

[0002] Power data network equipment is an important component to ensure the normal operation of the power grid. As network equipment increases, configuration files need to be added. However, faced with multiple devices from different manufacturers and their huge configuration files, and the strong dependence on professional operators, it is easy to cause configuration errors when relying on non-templated tools. At the same time, it is also necessary to ensure the security and integrity of the transmission when reading existing device configuration files. In the distribution network access equipment, the goal of sending mainstream device configuration parameters is to reduce the workload of operation and maintenance, and realize automatic identification and rapid configuration of equipment from different manufacturers without the need to deeply understand the specific configuration principles of each device.

[0003] However, the traditional method of delivering network configuration parameters faces challenges such as differences between devices from different manufacturers, which makes it difficult to unify the configuration; the configuration process is rigid and difficult to adapt to the rapidly changing network environment; human errors during the manual configuration process; manual delivery consumes a lot of time and human resources; and there are risks of unauthorized access and tampering that may be encountered during the transmission of configuration files.

[0004] The prior art still has the following deficiencies:

[0005] 1. Parameter parsing of configuration files usually relies on external libraries and tools, which increases the complexity of dependency management and installation steps. Configuration files of different formats require different parsing methods. If the file format changes, the code needs to be adjusted accordingly. This is complicated and difficult to use for beginners or users who are not familiar with related tools.

[0006] 2. When converting configuration parameters into command lines for network devices, traditional methods often rely on manually written scripts to achieve command line conversion. Although this method has certain flexibility, it requires a lot of manual maintenance and is only suitable for simple configuration tasks. Using a template engine, configuration parameters can be filled into predefined command line templates, but as the configuration complexity increases, the template becomes difficult to maintain.

[0007] 3. Traditional methods lack effective privacy protection during the configuration file distribution process, and configuration commands are not fully encrypted. Although quantum AES encryption technology can encrypt transmission data, key management and secure transmission become a major challenge because quantum AES requires the use of a longer key. Quantum AES is a symmetric encryption algorithm, which means that the same key is used for encryption and decryption, so how to securely transmit the key is a major problem. If the key is intercepted during transmission, the attacker can decrypt the transmission data, causing sensitive information to be leaked. Summary of the invention

[0008] In order to solve the above technical problems, the present invention provides a deep learning-based rapid configuration system for power data network parameters. By utilizing different external dependencies and libraries to extract various configuration parameters in configuration files of different formats and categories, for network devices that need to be configured with parameters, different types of configuration parameters required are selected, scripts are written or configuration files are generated using a template engine, and an API interface is called to implement parameter configuration, so as to solve the problems in the prior art.

[0009] A deep learning-based power data network parameter rapid configuration system, comprising:

[0010] A configuration collection and processing module, wherein the configuration collection and processing module includes a collection unit and a conversion unit;

[0011] The collection unit is used to collect existing switch configuration files and convert these files into YANG models for unified management and adaptation of configuration information of devices from different manufacturers;

[0012] The conversion unit converts the configuration files based on the YANG model, and uniformly represents the configuration information from different sources by converting the configuration files of various devices into structured data defined by the YANG model. The YANG model can also support data validation and constraint definition to ensure that the converted configuration files meet the predetermined standards and specifications.

[0013] The configuration parsing module is connected to the configuration collection and processing module. Based on the Tree-LSTM method for parsing network device configuration parameters, the YANG model is converted into a configuration tree according to the syntax differences of device configuration files from different manufacturers. The Tree-LSTM model is used to accurately extract the configuration parameter key values ​​in the configuration file to achieve efficient configuration file parsing.

[0014] A configuration file generation module, which is data-connected with the configuration parsing module, ensures that the newly generated configuration file can meet the expected network behavior to the greatest extent by optimally matching the configuration tree nodes in the configuration parsing module based on the existing network device configuration;

[0015] The quick configuration module is connected to the configuration file generation module, combines quantum AES encryption and OF-CONFIG protocol configuration file distribution method, and realizes automatic and secure distribution of network device configuration files through dynamic encryption of configuration files and secure transmission of keys based on centralized management of SDN architecture to complete quick configuration.

[0016] Preferably, the specific collection process of the collection unit is as follows:

[0017] The collection unit first remotely logs in to the network switch devices of Huawei, H3C and ZTE through the SSH security protocol. After successful login, enter the save command in the command line interface of the device to save the current device configuration information. Then, set up a TFTP server, which is used to receive the configuration file transmitted from the switch. After configuring the TFTP server, return to the command line interface of the switch and execute the tftp server-ip put filename command. Here, server-ip refers to the IP address of the TFTP server, and filename is the name of the configuration file you want to save on the TFTP server. After executing the command, the switch transfers the configuration file to the specified TFTP server. After the transfer is complete, verify whether the configuration file is transferred to the server completely and correctly to ensure that the backup operation is successful.

[0018] Preferably, the configuration parsing module includes a conversion unit, a processing unit and a configuration file extraction unit;

[0019] The conversion unit converts the configuration file information into AST for expression based on the YANG model;

[0020] First, parse each YANG module in the YANG model separately to identify the basic elements such as definition declarations and type definitions. During this process, a module will reference the data type or structure defined in another module. Therefore, ensure that all related module contents can be correctly loaded and parsed to ensure the consistency and integrity of the entire model. This involves recursively loading and parsing the referenced modules until all necessary module contents are integrated together.

[0021] Then the originally complex and deep tree structure is flattened by traversing the tree structure and reorganizing the parent-child relationship between nodes, thereby simplifying the multi-layer nested structure into one or several layers of simpler structures, so that each node is directly subordinate to its nearest non-leaf node, thereby reducing the depth of the tree while retaining enough information to express the original hierarchical relationship;

[0022] Then, key attribute information is extracted from each node, including but not limited to the node name, data type, and default value. Based on the extracted information, an abstract syntax tree is constructed. The tree not only reflects the original structure of the YANG model, but also clearly displays the key attributes of each node.

[0023] The processing unit processes the configuration file based on the key attribute information and AST model extracted from each node by the conversion unit, and converts the configuration file using the AST model to eliminate differences in command syntax and reduce parsing difficulty. In the AST model, each node represents a specific grammatical structure, including an expression, a statement, or a function;

[0024] The specific operations of converting the configuration information statement into an AST model are as follows:

[0025] Lexical analysis: read the decrypted configuration parameter statement, scan it character by character, and decompose it into lexical units, including but not limited to keywords, identifiers, and control methods;

[0026] Syntax analysis: design grammar rules and organize lexical units into a tree structure according to the grammar rules;

[0027] Construct AST model: Construct AST model according to the tree structure of syntax analysis. Each node represents a syntax structure with corresponding types and attributes.

[0028] The configuration file extraction unit extracts the configuration file and uses a tree-shaped long short-term memory network Tree-LSTM to process the tree data structure AST. Tree-LSTM can recursively process information along the branches of the tree, so as to capture the dependencies and context information between configuration instructions, and realize accurate semantic parsing of the configuration file content. Moreover, by recursively processing the information of each node, Tree-LSTM can understand the logical structure of the configuration file and identify key parameters and configuration items.

[0029] Preferably, the calculation process of the tree-shaped long short-term memory network Tree-LSTM in the configuration file extraction unit is as follows:

[0030] In Tree-LSTM, cell state, hidden state and gate state are three key components; cell state stores long-term information, hidden state transmits the output information of the current node, and gate state includes input gate, forget gate and output gate to control the flow of information, which together help the model effectively understand and process tree structure data;

[0031] The input gate determines how much information from the current time step is written into the cell state:

[0032]

[0033] The output gate controls how much information is output to the hidden state:

[0034]

[0035] The function of the forget gate is to control how much of the cell state information at the previous moment is retained; for the left child node and the right child node, respectively:

[0036]

[0037]

[0038] Among them, e is the node embedding, σ is the sigmoid activation function, W,U are weight matrices, b is the bias term, and h kl and h kr are the hidden states of the left and right child nodes respectively;

[0039] Cache Status μ k Combined with the node embedding information k By integrating these two parts of data, the characteristics and contextual relationships of the nodes can be reflected, and the representation ability of the model can be enhanced. The formula is as follows:

[0040]

[0041] Cell state c k Combining the cell state at the previous moment and the current input information, the cell state is updated and long-term information is stored through the regulation of the forget gate and the input gate; the formula is as follows:

[0042] c k =c k ⊙μ k +(c kl ⊙f kl +c kr ⊙f kr )

[0043] Among them: ⊙ represents the Hadamard product, that is, the product of elements by elements;

[0044] The hidden state is based on the activation of the output gate and the cell state. The output gate controls which part of the cell state information is output to form the hidden state of the current node. The formula is as follows:

[0045] h k =o k ⊙tanh(c k )

[0046] Among them: h is the hidden state;

[0047] The final output is the hidden state h of the root node k , which contains the semantic information of the entire tree; the hidden state of the root node is expressed as:

[0048] h root =o root⊙tanh(c root )

[0049] Among them, the output h root It can be used for further configuration parameter extraction, semantic parsing, error detection and other tasks; through this vector, the key information and context dependencies in the configuration file can be captured; and in the configuration parameter extraction task of this patent, the overall semantic representation of the configuration file can be obtained through the hidden state of the root node.

[0050] Preferably, the configuration file generation module performs node similarity calculation, mapping rule generation and mutually exclusive word list optimization based on AST configuration tree node similarity calculation;

[0051] The configuration tree node similarity calculation performs Transformer encoding on the configuration tree node and its subtrees and dynamically calculates the node similarity based on the multi-head self-attention mechanism to select the most similar candidate node;

[0052] The mapping rule generation integrates the global and local optimal node matching algorithms, generates a candidate node set based on the configuration tree node similarity calculation, ensures model consistency through backtracking, generates mapping rules, and automatically generates configuration files;

[0053] The mutually exclusive word list optimization utilizes path information to extract keyword mutually exclusive semantics, and further screens candidate nodes to accurately generate a target configuration file.

[0054] Preferably, the specific process of the configuration file generation module to generate the overall configuration file is as follows:

[0055] Configuration tree node similarity calculation based on Transformer;

[0056] Preprocess the nodes in the configuration tree and extract the features of each node and its subtree. Use the Transformer model to encode each node and its subtree to generate high-dimensional feature vectors. These feature vectors not only contain the basic information of the node, but also capture the dependencies and contextual information between nodes. Through the Transformer's multi-head attention mechanism, the model can better understand the relationship between nodes and provide richer information for subsequent similarity calculations. The encoding process of the Transformer model is expressed as:

[0057] Y = Transformer(X)

[0058] Among them, X is the feature matrix of the input node and its subtree, Y is the generated high-dimensional feature vector matrix; the feature vector d of each node i Calculated by the following formula:

[0059] di = Transformer(X i )

[0060] Among them, X i is the input feature vector of node i, d i is the high-dimensional feature vector of node i;

[0061] Generate a similarity table based on the results, and calculate the similarity between each node and its subtree in the configuration tree to be matched and the local configuration tree; at this time, use the high-dimensional feature vector generated by the Transformer model to calculate the similarity between each node and its subtree; calculate the similarity between two nodes v by the cosine similarity formula i and v j The similarity is as follows:

[0062]

[0063] Among them, v i and v j Represent the feature vectors of node i and node j respectively;

[0064] The Transformer model's multi-head attention mechanism dynamically adjusts the importance of different node features to generate more accurate similarity values. When determining candidate nodes, the node that is most similar to the node to be matched is selected from the local configuration tree. The formula is as follows:

[0065] Z multi =Concat(Z1,Z2,...,Z d ) o

[0066] The multi-head attention mechanism processes multiple attention heads in parallel, and the weight matrix of each head is different. Let the number of heads be g, then the output of each head is concatenated to form the final multi-head attention output Z multi ; Then, the Transformer model is used to compare the feature vectors of each node and its subtree, and the node with the highest similarity is selected as the candidate node;

[0067] Mapping rule generation based on configuration tree similarity;

[0068] Based on the Transformer configuration tree node similarity calculation results, a similarity table is generated, which contains the similarity values ​​between each node and the subtree with the node as the root. The mapping rule generation algorithm generates the mapping rules of the configuration file based on this similarity table. When the configuration tree to be matched establishes a mapping rule with the local configuration tree, the following operations are performed:

[0069] First, traverse all nodes of the configuration tree to be matched from top to bottom. Each node has a subtree with the node as the root. Then, search the similarity table for a subtree in the local model with the highest similarity value to the subtree to determine the matching relationship of the nodes in the configuration file.

[0070] Then, traverse the subtree of the configuration tree to be matched, find the node with the highest subtree similarity in the local configuration tree subtree, and record the node with the highest subtree matching similarity in all local configuration trees. Add the root node of this node as a candidate node to the candidate set to generate the mapping rule of the configuration file; each time you go down a layer, the size of the candidate node set increases by one unit;

[0071] Finally, traverse to the leaf node to be matched, generate a subtree for each candidate node of its parent node, and find the leaf with the highest similarity to the leaf node to be matched; after determining the leaf node with the highest similarity, trace back its parent node path to the root, record the one with the highest path similarity, use it as the matching node, form the mapping rule of the configuration file and output it;

[0072] Mutually exclusive word list optimization;

[0073] By establishing a mutually exclusive word list, it is clearly identified which configuration items cannot exist in the valid configuration set at the same time, so as to avoid associating mutually exclusive configuration items together when generating mapping rules. The specific process is as follows:

[0074] First, traverse the configuration tree, extract the name attribute of each node, and extract its keywords according to TF-IDF. Any path can correspond to a keyword set. The words in the set are not mutually exclusive and are included in the non-mutually exclusive word set. Then generate a two-dimensional table T, with rows and columns representing all keyword sets respectively. According to the content of the non-mutually exclusive word set, assign 1 to the corresponding position in the two-dimensional table.

[0075] After obtaining the mutually exclusive vocabulary, the mapping rule generation algorithm is further optimized based on the mutually exclusive vocabulary. When selecting the global optimum or the local optimum, if there are two keywords in the names between the nodes that have appeared in the mutually exclusive vocabulary and there is a mutually exclusive relationship, it is considered that the concepts described by the two nodes are not the same and are not included in the set of candidate nodes.

[0076] Preferably, the fast configuration module includes a quantum key distribution unit, a configuration file encryption unit and a configuration file sending unit;

[0077] The quantum key distribution unit uses the principles of quantum mechanics to solve the key security exchange of the quantum AES symmetric encryption algorithm. The sender modulates the single photon signal with a random orthogonal polarization basis and transmits it to the receiver through the quantum channel. The receiver measures the quantum state and exchanges part of the information with the sender to complete key negotiation, error correction and confidentiality enhancement, ensuring that both parties have an absolutely secure and consistent key, providing security for data encryption.

[0078] The configuration file encryption unit adopts quantum AES dynamic encryption technology based on quantum computing optimization; by using quantum computing to achieve a secure key generation and exchange process, it provides stronger protection for the configuration file to prevent it from being intercepted or tampered during transmission;

[0079] The configuration file sending unit adopts a configuration file sending method based on OF-CONFIG. In the SDN architecture, the SDN controller manages the configuration and status information of the OpenFlow switch through the southbound interface protocol, including OF-CONFIG; the OF-CONFIG protocol supports the controller to send configuration files through the edit-config command. At the same time, OF-CONFIG supports encrypted transmission and performs transmission security based on the TLS / SSL protocol and the configuration file encryption unit.

[0080] Preferably, the specific process of the quantum key distribution unit is as follows:

[0081] Key single-photon signal transmission: Based on the quantum no-cloning theorem and the quantum uncertainty principle; when the sender, including the controller, generates the key, it will randomly select two sets of orthogonal polarization bases to modulate the key single-photon signal.

[0082] The modulated key single photon signal is sent to the network access device, and the sender modulates the quantum state |X A +iP A >, where X A and P A represents a Gaussian variable random sequence with a mean of 0, corresponding to the canonical position and canonical momentum. The sender transmits the quantum state |X A +iP A >Sent to the network access device, using the transmittance T tr and excess noise ε en To describe the channel environment of the quantum channel, the channel noise It is expressed as:

[0083]

[0084] Key single-photon signal processing: After receiving the quantum state, the network access device measures it through heterodyne detection. The total amount of noise introduced by the quantum state during the transmission and detection process can be expressed as:

[0085]

[0086] The receiver publishes the basis choice when measuring, and the sender only keeps all the data, which is called the original rough key. Where N s is the total number of signals, among which m are randomly sampled rk A rough key pair is used to estimate the transmittance T tr and excess noise ε en ;

[0087] According to the maximum likelihood estimation, the following parameters are estimated, namely:

[0088]

[0089]

[0090] Among them, v is is obtained by measuring the vacuum state, are regression coefficients; using the estimated results of these parameters, the transmittance T tr and excess noise ε en The estimation of can calculate the transmission characteristics of the quantum channel;

[0091] Negotiation error correction includes negotiation and error correction. Negotiation is responsible for converting decimal key data into binary key data. Error correction uses high-performance error correction codes to correct the binary keys in the hands of both parties in communication, so that both parties can obtain completely consistent keys.

[0092] After completing parameter estimation and negotiation error correction, the information eavesdropped by the eavesdropper during the communication process is eliminated. This is achieved through confidentiality enhancement. The implementation method is to let the communicating parties calculate s′=h(s) based on an arbitrarily selected hash function h on an authenticated public channel, where s is the result after negotiation error correction. The ultimate goal is to make the eavesdropper completely unaware of the content of s′; thus obtaining the final key rate of the system, the formula is as follows:

[0093]

[0094] Among them, f is the repetition frequency, Nm is the number of signals for extracting the key, β(A:B) is the mutual information between the two communicating parties, χ(B:E) is the maximum amount of information eavesdropped by the eavesdropper, and Δ[Nm] is a parameter related to confidentiality enhancement. When K finite When > 0, the generated key can be used, and combined with the one-time pad encryption mode, secure communication can be completed.

[0095] Preferably, the encryption process of the configuration file encryption unit is as follows:

[0096] Quantum AES key generation: A random binary string with high entropy value is used as the original key. To enhance the randomness and security of the key, the transmission time point and configuration parameter characteristics are integrated into the key generation process, which not only increases the complexity and uniqueness of the key, but also makes the key dynamic and time-effective, ensuring that it is different in each encryption process, thereby improving the security of encryption.

[0097] Quantum AES dynamic encryption: To further improve the security of configuration file encryption, the present invention introduces an autoencoder as an auxiliary tool; before quantum AES encryption, the autoencoder is used to pre-process the configuration file to extract the deep features of the data and reduce the dimension; by encoding the configuration file through the autoencoder, redundant data can be reduced and the concealment of the data can be increased before encryption;

[0098] During the encryption process, the configuration file is divided into binary strings of the same length as the original key and dynamically encrypted by quantum AES through XOR operation; quantum AES uses a multi-round permutation-permutation network (SPN) structure for encryption;

[0099] Quantum AES dynamic encryption includes the following four steps: key expansion, initial round transformation, multiple rounds of transformation including byte substitution, row shift and column confusion, and final round transformation;

[0100] Byte replacement: Use S-box to replace bytes. This is the core nonlinear operation in quantum AES. It can effectively confuse input data. S-box can be regarded as a comparison table. Row shift: that is, each row of the matrix obtained by byte replacement is shifted to the left. The first row remains unchanged, the second row is shifted by 1 bit, the third row is shifted by 2 bits, and the fourth row is shifted by 3 bits.

[0101] Column confusion: After the row shift, the resulting matrix will be multiplied by a fixed matrix on the left to perform a column confusion operation to generate a new matrix, thereby enhancing the randomness of the encrypted data and improving the security of the encryption algorithm; the matrix is ​​as follows:

[0102]

[0103] Round key addition: In each round of encryption operation, a round key is generated and XORed with the current data matrix. In this way, the key information is effectively integrated into the data to ensure data security and encryption strength.

[0104] Preferably, the configuration file issuing unit is divided into a user layer, an intermediate layer and a device layer:

[0105] The user layer is mainly responsible for issuing configuration information and visualizing configuration templates. Users input configuration data through a visual interface and call the RESTful interface to send the configuration information to the middle layer in the RESTCONF format. At the same time, users can also collect device configuration information through this interface.

[0106] The middle layer consists of the SDN controller and its functional modules, which are responsible for information conversion and centralized management. It receives the RESTCONF format configuration sent by the user layer and converts it into OF-CONFIG protocol messages so that it can be sent to network devices. At the same time, it receives the OF-CONFIG configuration information of the device layer and converts it into RESTCONF format to feed back to the user layer. In addition, the middle layer maintains a continuous connection with the device through the OF-CONFIG protocol, so users do not need to establish a connection with each device separately, which reduces the management burden of users.

[0107] The device layer is the plane where network devices are located. The devices support OF-CONFIG server and can receive, process and send configuration information through OF-CONFIG protocol. The devices will store their own configuration information in a specific storage. The user layer can query or modify the device configuration through the middle layer to achieve centralized management. The specific implementation is as follows:

[0108] Establish a connection between the controller and the switch: The controller establishes a secure connection with the OpenFlow switch through the OF-CONFIG protocol; encrypted communication is usually achieved through TLS / SSL to ensure that data will not be intercepted or tampered with during transmission;

[0109] Sending encrypted configuration files: After the communication channel is established, the controller sends the encrypted configuration files to the OpenFlow switch through the edit-config command of OF-CONFIG;

[0110] Application configuration: After the switch receives the encrypted configuration file, it will use the key transmitted in advance through quantum key distribution technology to decrypt it to obtain the original configuration file. The configuration file content is applied by the switch to the corresponding port, queue and OpenFlow instance configuration to complete the device configuration update;

[0111] Determine the configuration status: After the configuration is issued, the controller can send the get-config query command through the OF-CONFIG protocol to obtain the configuration status of the switch and compare the actual configuration status with the configuration file to ensure that the two are consistent; if the configuration is not applied correctly, the controller can automatically roll back the configuration or re-issue the configuration command;

[0112] Rollback configuration: To prevent errors or unexpected configuration, the OF-CONFIG protocol supports a configuration rollback mechanism. When the controller detects a configuration error through status query, it sends a rollback command to request the device to restore to the previous normal configuration. After the rollback, the controller confirms again whether the restored status is correct.

[0113] Compared with the prior art, the present invention has the following beneficial effects:

[0114] 1. The present invention supports data validation and constraint definition through the YANG model, ensuring that the converted configuration files meet the predetermined standards and specifications, and further improving the accuracy and reliability of configuration management. This method not only simplifies the parsing process of the configuration files, but also lays a solid foundation for the subsequent generation and distribution of configuration files, realizes the effective conversion and management of configuration files, and greatly improves the automation level and efficiency of network operation and maintenance.

[0115] 2. The present invention can not only accurately parse the actual meaning of configuration parameters through the Tree-LSTM model architecture, but also identify potential configuration errors or unreasonable settings. The application of this method enables network administrators to manage and optimize network configuration more efficiently and accurately in a complex environment with multiple vendors and multiple versions, greatly improving the automation level and security of network operation and maintenance.

[0116] 3. Through the SDN architecture and OF-CONFIG protocol, the controller of the present invention can centrally manage the configuration of multiple switches and devices, greatly improving the configuration efficiency. At the same time, multiple security measures such as quantum AES encryption, quantum key distribution, and TLS communication ensure the transmission security of configuration data and keys, and prevent the leakage of sensitive information. Moreover, the OF-CONFIG protocol can flexibly expand configuration options, support the configuration and distribution of multiple devices and functions, adapt to the needs of different network environments, and finally realize the one-click distribution function of configuration files. BRIEF DESCRIPTION OF THE DRAWINGS

[0117] Figure 1 It is a schematic diagram of the module function flow of the present invention;

[0118] Figure 2 is a flow chart of the collection unit of the present invention collecting switch configuration files;

[0119] Figure 3 The configuration parsing module conversion unit of the present invention converts the configuration file information into an AST flow chart based on the YANG model;

[0120] Figure 4 is a configuration file generation flow chart of the configuration file generation module of the present invention;

[0121] Figure 5The configuration file generation module of the present invention generates a flow chart based on the mapping rule of the configuration tree similarity;

[0122] Figure 6 It is a flow chart of a method for synchronously sending configuration commands by combining quantum AES encryption and OF-CONFIG protocol of the fast configuration module of the present invention;

[0123] Figure 7 It is a quantum AES dynamic encryption flow chart in the configuration file encryption unit of the present invention;

[0124] Figure 8 This is a schematic diagram of the displacement in quantum AES dynamic encryption of the present invention;

[0125] Fig. 9 It is a configuration file issuing architecture diagram of the configuration file issuing unit of the present invention based on OF-CONFIG; DETAILED DESCRIPTION

[0126] The following embodiments of the present invention are described in further detail in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0127] The present invention provides a deep learning-based power data network parameter rapid configuration system, comprising:

[0128] A configuration collection and processing module, wherein the configuration collection and processing module includes a collection unit and a conversion unit;

[0129] The collection unit is used to collect existing switch configuration files and convert these files into YANG models for unified management and adaptation of configuration information of devices from different manufacturers;

[0130] The conversion unit converts the configuration files based on the YANG model, and uniformly represents the configuration information from different sources by converting the configuration files of various devices into structured data defined by the YANG model. The YANG model can also support data validation and constraint definition to ensure that the converted configuration files meet the predetermined standards and specifications.

[0131] The configuration parsing module is connected to the configuration collection and processing module. Based on the Tree-LSTM method for parsing network device configuration parameters, the YANG model is converted into a configuration tree according to the syntax differences of device configuration files from different manufacturers. The Tree-LSTM model is used to accurately extract the configuration parameter key values ​​in the configuration file to achieve efficient configuration file parsing.

[0132] A configuration file generation module, which is data-connected with the configuration parsing module, ensures that the newly generated configuration file can meet the expected network behavior to the greatest extent by optimally matching the configuration tree nodes in the configuration parsing module based on the existing network device configuration;

[0133] The quick configuration module is connected to the configuration file generation module, combines quantum AES encryption and OF-CONFIG protocol configuration file distribution method, and realizes automatic and secure distribution of network device configuration files through dynamic encryption of configuration files and secure transmission of keys based on centralized management of SDN architecture to complete quick configuration.

[0134] Example:

[0135] like Figure 1-9 As shown, in this embodiment, a large network company is upgrading and optimizing its data network. The data network covers cloud servers and network connection devices in multiple regions, and the network uses switch devices produced by different manufacturers such as Huawei, H3C, and ZTE. These devices need to be uniformly configured and adjusted in parameters to meet new data transmission and monitoring requirements.

[0136] Since the switch configuration files of Huawei, H3C and ZTE are complex and difficult to understand, and there are significant differences in command syntax and configuration methods, it is necessary to collect and organize the existing switch configuration files, and then convert the configuration files into AST to unify the expression form, and use natural language processing to complete parameter parsing. The original configuration information is mapped to the containers, leaves and other defined declarations in the YANG model to ensure that the converted model can accurately express the content of the original configuration file and conform to the YANG syntax specification, thereby facilitating subsequent configuration management and automated processing.

[0137] The collection unit collects existing configuration files. In order to uniformly manage and adapt the configuration information of devices from different manufacturers, these files are converted into YANG models to achieve configuration standardization and automatic processing, thereby simplifying the configuration process and reducing errors caused by manual configuration.

[0138] The configuration file collection process is as follows Figure 2As shown in the figure, first use the SSH security protocol to remotely log in to the network switch devices of Huawei, H3C and ZTE. After successfully logging in, enter the save command in the command line interface of the device to save the current device configuration information. Next, set up a TFTP server, which is used to receive the configuration file transferred from the switch. After configuring the TFTP server, return to the command line interface of the switch and execute the tftp server-ip putfilename command. Here, server-ip refers to the IP address of the TFTP server, and filename is the name of the configuration file you want to save on the TFTP server. After executing the command, the switch transfers the configuration file to the specified TFTP server. After the transfer is complete, verify whether the configuration file is transferred to the server completely and correctly to ensure that the backup operation is successful.

[0139] Configuration file conversion. Since there are large differences in the collected and organized configuration parameters, direct parsing will encounter many difficulties. The conversion unit converts the configuration file by introducing a method based on the YANG model. The YANG model is a language used for modeling network configuration data. It provides a standardized definition method and can uniformly represent configuration information from different sources. By converting the configuration files of various devices into structured data defined by the YANG model, the compatibility issues between devices of different manufacturers and models, as well as the difficulty of parsing configuration information, can be effectively resolved.

[0140] In addition, the YANG model also supports data validation and constraint definition to ensure that the converted configuration files meet the predetermined standards and specifications, further improving the accuracy and reliability of configuration management. This method not only simplifies the parsing process of the configuration files, but also lays a solid foundation for the subsequent generation and distribution of configuration files, realizes the effective conversion and management of configuration files, and greatly improves the automation level and efficiency of network operation and maintenance.

[0141] The configuration parsing module includes a conversion unit, a processing unit and a configuration file extraction unit;

[0142] The conversion unit converts the configuration file information into AST based on the YANG model;

[0143] First, parse each YANG module in the YANG model separately to identify the basic elements such as definition declarations and type definitions. During this process, a module will reference the data type or structure defined in another module. Therefore, ensure that all related module contents can be correctly loaded and parsed to ensure the consistency and integrity of the entire model. This involves recursively loading and parsing the referenced modules until all necessary module contents are integrated together.

[0144] Then the originally complex and deep tree structure is flattened by traversing the tree structure and reorganizing the parent-child relationship between nodes, thereby simplifying the multi-layer nested structure into one or several layers of simpler structures, so that each node is directly subordinate to its nearest non-leaf node, thereby reducing the depth of the tree while retaining enough information to express the original hierarchical relationship;

[0145] Then, key attribute information is extracted from each node, including but not limited to the node name, data type, and default value. Based on the extracted information, an abstract syntax tree is constructed. The tree not only reflects the original structure of the YANG model, but also clearly displays the key attributes of each node.

[0146] The processing unit processes the configuration file based on the key attribute information and AST model extracted from each node by the conversion unit, and converts the configuration file using the AST model to eliminate differences in command syntax and reduce parsing difficulty. In the AST model, each node represents a specific grammatical structure, including an expression, a statement, or a function;

[0147] The specific operations of converting the configuration information statement into an AST model are as follows:

[0148] Lexical analysis: read the decrypted configuration parameter statement, scan it character by character, and decompose it into lexical units, including but not limited to keywords, identifiers, and control methods;

[0149] Syntax analysis: design grammar rules and organize lexical units into a tree structure according to the grammar rules;

[0150] Construct AST model: Construct AST model according to the tree structure of syntax analysis. Each node represents a syntax structure with corresponding types and attributes.

[0151] The configuration file extraction unit extracts the configuration file and uses a tree-shaped long short-term memory network Tree-LSTM to process the tree data structure AST. Tree-LSTM can recursively process information along the branches of the tree, so as to capture the dependencies and context information between configuration instructions, and realize accurate semantic parsing of the configuration file content. Moreover, by recursively processing the information of each node, Tree-LSTM can understand the logical structure of the configuration file and identify key parameters and configuration items.

[0152] The calculation process of the tree-shaped long short-term memory network Tree-LSTM in the configuration file extraction unit is as follows:

[0153] In Tree-LSTM, cell state, hidden state and gate state are three key components; cell state stores long-term information, hidden state transmits the output information of the current node, and gate state includes input gate, forget gate and output gate to control the flow of information, which together help the model effectively understand and process tree structure data;

[0154] The input gate determines how much information from the current time step is written into the cell state:

[0155]

[0156] The output gate controls how much information is output to the hidden state:

[0157]

[0158] The function of the forget gate is to control how much of the cell state information at the previous moment is retained; for the left child node and the right child node, respectively:

[0159]

[0160]

[0161] Among them, e is the node embedding, σ is the sigmoid activation function, W, U are weight matrices, b is the bias term, and h kl and h kr are the hidden states of the left and right child nodes respectively;

[0162] Cache Status μ k Combined with the node embedding information k By integrating these two parts of data, the characteristics and contextual relationships of the nodes can be reflected, and the representation ability of the model can be enhanced. The formula is as follows:

[0163]

[0164] Cell state c k Combining the cell state at the previous moment and the current input information, the cell state is updated and long-term information is stored through the regulation of the forget gate and the input gate; the formula is as follows:

[0165] c k =c k ⊙μ k +(c kl ⊙f kl +c kr ⊙f kr )

[0166] Among them: ⊙ represents the Hadamard product, that is, the product of elements by elements;

[0167] The hidden state is based on the activation of the output gate and the cell state. The output gate controls which part of the cell state information is output to form the hidden state of the current node. The formula is as follows:

[0168] h k =o k ⊙tanh(c k )

[0169] Among them: h is the hidden state;

[0170] The final output is the hidden state h of the root node k , which contains the semantic information of the entire tree; the hidden state of the root node is expressed as:

[0171] h root =o root ⊙tanh(c root )

[0172] Among them, the output h root It can be used for further configuration parameter extraction, semantic parsing, error detection and other tasks; through this vector, the key information and context dependencies in the configuration file can be captured; and in the configuration parameter extraction task of this patent, the overall semantic representation of the configuration file can be obtained through the hidden state of the root node.

[0173] In summary, Tree-LSTM can not only accurately parse the actual meaning of configuration parameters, but also identify potential configuration errors or unreasonable settings. The application of this method enables network administrators to manage and optimize network configuration more efficiently and accurately in a complex environment with multiple vendors and multiple versions, greatly improving the automation level and security of network operation and maintenance.

[0174] The configuration file generation module performs node similarity calculation, mapping rule generation and mutually exclusive word list optimization based on AST configuration tree node similarity calculation;

[0175] Configuration tree node similarity calculation Transformer encodes the configuration tree node and its subtrees and dynamically calculates the node similarity based on the multi-head self-attention mechanism to select the most similar candidate node;

[0176] The mapping rule generation integrates the global and local optimal node matching algorithms, generates candidate node sets based on the configuration tree node similarity calculation, ensures model consistency through backtracking, generates mapping rules, and automatically generates configuration files;

[0177] Mutually exclusive word list optimization uses path information to extract keyword mutually exclusive semantics and further screens candidate nodes to accurately generate the target configuration file.

[0178] The specific process of generating the overall configuration file of the configuration file generation module is as follows:

[0179] Configuration tree node similarity calculation based on Transformer;

[0180] Preprocess the nodes in the configuration tree and extract the features of each node and its subtree. Use the Transformer model to encode each node and its subtree to generate high-dimensional feature vectors. These feature vectors not only contain the basic information of the node, but also capture the dependencies and contextual information between nodes. Through the Transformer's multi-head attention mechanism, the model can better understand the relationship between nodes and provide richer information for subsequent similarity calculations. The encoding process of the Transformer model is expressed as:

[0181] Y=Trαnsformer(X)

[0182] Among them, X is the feature matrix of the input node and its subtree, Y is the generated high-dimensional feature vector matrix; the feature vector d of each node i Calculated by the following formula:

[0183] d i = Transformer(X i )

[0184] Among them, X i is the input feature vector of node i, d i is the high-dimensional feature vector of node i;

[0185] Generate a similarity table based on the results, and calculate the similarity between each node and its subtree in the configuration tree to be matched and the local configuration tree; at this time, use the high-dimensional feature vector generated by the Transformer model to calculate the similarity between each node and its subtree; calculate the similarity between two nodes v by the cosine similarity formula i and v j The similarity is as follows:

[0186]

[0187] Among them, v i and v j Represent the feature vectors of node i and node j respectively;

[0188] The Transformer model's multi-head attention mechanism dynamically adjusts the importance of different node features to generate more accurate similarity values. When determining candidate nodes, the node that is most similar to the node to be matched is selected from the local configuration tree. The formula is as follows:

[0189] Zmulti =Concat(Z1,Z2,...,Z d ) o

[0190] The multi-head attention mechanism processes multiple attention heads in parallel, and the weight matrix of each head is different. Let the number of heads be g, then the output of each head is concatenated to form the final multi-head attention output Z multi ; Then, the Transformer model is used to compare the feature vectors of each node and its subtree, and the node with the highest similarity is selected as the candidate node;

[0191] Mapping rule generation based on configuration tree similarity;

[0192] Based on the Transformer configuration tree node similarity calculation results, a similarity table is generated, which contains the similarity values ​​between each node and the subtree with the node as the root. The mapping rule generation algorithm generates the mapping rules of the configuration file based on this similarity table. When the configuration tree to be matched establishes a mapping rule with the local configuration tree, the following operations are performed:

[0193] First, traverse all nodes of the configuration tree to be matched from top to bottom. Each node has a subtree with the node as the root. Then, search the similarity table for a subtree in the local model with the highest similarity value to the subtree to determine the matching relationship of the nodes in the configuration file.

[0194] Then, traverse the subtree of the configuration tree to be matched, find the node with the highest subtree similarity in the local configuration tree subtree, and record the node with the highest subtree matching similarity in all local configuration trees. Add the root node of this node as a candidate node to the candidate set to generate the mapping rule of the configuration file; each time you go down a layer, the size of the candidate node set increases by one unit;

[0195] Finally, traverse to the leaf node to be matched, generate a subtree for each candidate node of its parent node, and find the leaf with the highest similarity to the leaf node to be matched; after determining the leaf node with the highest similarity, trace back its parent node path to the root, record the one with the highest path similarity, use it as the matching node, form the mapping rule of the configuration file and output it;

[0196] Mutually exclusive word list optimization;

[0197] By establishing a mutually exclusive word list, it is clearly identified which configuration items cannot exist in the valid configuration set at the same time, so as to avoid associating mutually exclusive configuration items together when generating mapping rules. The specific process is as follows:

[0198] First, traverse the configuration tree, extract the name attribute of each node, and extract its keywords according to TF-IDF. Any path can correspond to a keyword set. The words in the set are not mutually exclusive and are included in the non-mutually exclusive word set. Then generate a two-dimensional table T, with rows and columns representing all keyword sets respectively. According to the content of the non-mutually exclusive word set, assign 1 to the corresponding position in the two-dimensional table.

[0199] After obtaining the mutually exclusive vocabulary, the mapping rule generation algorithm is further optimized based on the mutually exclusive vocabulary. When selecting the global optimum or the local optimum, if there are two keywords in the names between the nodes that have appeared in the mutually exclusive vocabulary and there is a mutually exclusive relationship, it is considered that the concepts described by the two nodes are not the same and are not included in the set of candidate nodes.

[0200] The configuration file generation module generates device configuration files based on Transformer mapping rules. Through the three steps of configuration tree node similarity calculation, mapping rule generation and mutually exclusive word list optimization, accurate and efficient automated configuration is achieved. The Transformer model is used to calculate node similarity to ensure the accuracy of node matching; the mapping rule generation algorithm is used to automatically create configuration files; finally, the mutually exclusive word list is used to avoid configuration conflicts and improve the reliability and consistency of the generated configuration files.

[0201] When processing a large number of devices, such as generating configurations for new access switches, it can quickly find matching nodes from existing templates, speed up the generation process, and save manpower and time costs. When the network needs to be updated or expanded, such as adding distributed energy access points, it can quickly generate appropriate configuration files by updating the configuration tree and adjusting parameters to ensure network operation and expansion.

[0202] The fast configuration module includes a quantum key distribution unit, a configuration file encryption unit, and a configuration file sending unit;

[0203] The quantum key distribution unit uses the principles of quantum mechanics to solve the key security exchange of the quantum AES symmetric encryption algorithm. The sender modulates the single photon signal with a random orthogonal polarization basis and transmits it to the receiver through the quantum channel. The receiver measures the quantum state and exchanges some information with the sender to complete key negotiation, error correction and confidentiality enhancement, ensuring that both parties have an absolutely secure and consistent key, providing security for data encryption.

[0204] The configuration file encryption unit uses quantum AES dynamic encryption technology optimized based on quantum computing. By using quantum computing to achieve secure key generation and exchange processes, it provides stronger protection for configuration files to prevent them from being intercepted or tampered with during transmission.

[0205] The configuration file sending unit adopts a configuration file sending method based on OF-CONFIG. In the SDN architecture, the SDN controller manages the configuration and status information of the OpenFlow switch through the southbound interface protocol, including OF-CONFIG; the OF-CONFIG protocol supports the controller to send configuration files through the edit-config command. At the same time, OF-CONFIG supports encrypted transmission and performs transmission security based on the TLS / SSL protocol and the configuration file encryption unit.

[0206] The specific process of the quantum key distribution unit is as follows:

[0207] Key single-photon signal transmission: Based on the quantum no-cloning theorem and the quantum uncertainty principle; when the sender, including the controller, generates the key, it will randomly select two sets of orthogonal polarization bases to modulate the key single-photon signal.

[0208] The modulated key single photon signal is sent to the network access device, and the sender modulates the quantum state |X A +iP A >, where X A and P A represents a Gaussian variable random sequence with a mean of 0, corresponding to the canonical position and canonical momentum. The sender transmits the quantum state |X A +iP A >Sent to the network access device, using the transmittance T tr and excess noise ε en To describe the channel environment of the quantum channel, the channel noise It is expressed as:

[0209]

[0210] Key single-photon signal processing: After receiving the quantum state, the network access device measures it through heterodyne detection. The total amount of noise introduced by the quantum state during the transmission and detection process can be expressed as:

[0211]

[0212] The receiver publishes the basis choice when measuring, and the sender only keeps all the data. These relevant data are called the original rough key. Where N s is the total number of signals, among which m are randomly sampled rk A rough key pair is used to estimate the transmittance T tr and excess noise ε en ;

[0213] According to the maximum likelihood estimation, the following parameters are estimated, namely:

[0214]

[0215] Among them, v is is obtained by measuring the vacuum state, are regression coefficients; using the estimated results of these parameters, the transmittance T tr and excess noise ε en The estimation of can calculate the transmission characteristics of the quantum channel;

[0216] Negotiation error correction includes negotiation and error correction. Negotiation is responsible for converting decimal key data into binary key data. Error correction uses high-performance error correction codes to correct the binary keys in the hands of both parties in communication, so that both parties can obtain completely consistent keys.

[0217] After completing parameter estimation and negotiation error correction, the information eavesdropped by the eavesdropper during the communication process is eliminated. This is achieved through confidentiality enhancement. The implementation method is to let the communicating parties calculate s′=h(s) based on an arbitrarily selected hash function h on an authenticated public channel, where s is the result after negotiation error correction. The ultimate goal is to make the eavesdropper completely unaware of the content of s′; thus obtaining the final key rate of the system, the formula is as follows:

[0218]

[0219] Among them, f is the repetition frequency, Nm is the number of signals for extracting the key, β(A:B) is the mutual information between the two communicating parties, χ(B:E) is the maximum amount of information eavesdropped by the eavesdropper, and Δ[Nm] is a parameter related to confidentiality enhancement. When K finite When > 0, the generated key can be used, and combined with the one-time pad encryption mode, secure communication can be completed.

[0220] The encryption process of the configuration file encryption unit is as follows;

[0221] Quantum AES key generation: A random binary string with high entropy value is used as the original key. To enhance the randomness and security of the key, the transmission time point and configuration parameter characteristics are integrated into the key generation process, which not only increases the complexity and uniqueness of the key, but also makes the key dynamic and time-effective, ensuring that it is different in each encryption process, thereby improving the security of encryption.

[0222] Quantum AES dynamic encryption: To further improve the security of configuration file encryption, the present invention introduces an autoencoder as an auxiliary tool; before quantum AES encryption, the autoencoder is used to pre-process the configuration file to extract the deep features of the data and reduce the dimension; by encoding the configuration file through the autoencoder, redundant data can be reduced and the concealment of the data can be increased before encryption;

[0223] During the encryption process, the configuration file is divided into binary strings of the same length as the original key, and quantum AES dynamic encryption is performed through XOR operation; quantum AES uses a multi-round permutation-permutation network (SPN) structure for encryption. The quantum AES dynamic encryption process is as follows: Fig. 9 As shown;

[0224] Quantum AES dynamic encryption includes the following four steps: key expansion, initial round transformation, multiple rounds of transformation including byte substitution, row shift and column confusion, and final round transformation;

[0225] Byte replacement: Use S-box to replace bytes. This is the core nonlinear operation in quantum AES. It can effectively confuse input data. S-box can be regarded as a comparison table. Row shift: that is, each row of the matrix obtained by byte replacement is shifted to the left. The first row remains unchanged, the second row is shifted by 1 bit, the third row is shifted by 2 bits, and the fourth row is shifted by 3 bits.

[0226] Column confusion: After the row shift, the resulting matrix will be multiplied by a fixed matrix on the left to perform a column confusion operation to generate a new matrix, thereby enhancing the randomness of the encrypted data and improving the security of the encryption algorithm; the matrix is ​​as follows:

[0227]

[0228] Round key addition: In each round of encryption operation, a round key is generated and XORed with the current data matrix. In this way, the key information is effectively integrated into the data to ensure data security and encryption strength.

[0229] Preferably, the configuration file issuing unit is divided into a user layer, an intermediate layer and a device layer:

[0230] The user layer is mainly responsible for issuing configuration information and visualizing configuration templates. Users input configuration data through a visual interface and call the RESTful interface to send the configuration information to the middle layer in the RESTCONF format. At the same time, users can also collect device configuration information through this interface.

[0231] The middle layer consists of the SDN controller and its functional modules, which are responsible for information conversion and centralized management. It receives the RESTCONF format configuration sent by the user layer and converts it into OF-CONFIG protocol messages so that it can be sent to network devices. At the same time, it receives the OF-CONFIG configuration information of the device layer and converts it into RESTCONF format to feed back to the user layer. In addition, the middle layer maintains a continuous connection with the device through the OF-CONFIG protocol, so users do not need to establish a connection with each device separately, which reduces the management burden of users.

[0232] The device layer is the plane where network devices are located. The devices support OF-CONFIG server and can receive, process and send configuration information through OF-CONFIG protocol. The devices will store their own configuration information in a specific storage. The user layer can query or modify the device configuration through the middle layer to achieve centralized management. The specific implementation is as follows:

[0233] Establish a connection between the controller and the switch: The controller establishes a secure connection with the OpenFlow switch through the OF-CONFIG protocol; encrypted communication is usually achieved through TLS / SSL to ensure that data will not be intercepted or tampered with during transmission;

[0234] Sending encrypted configuration files: After the communication channel is established, the controller sends the encrypted configuration files to the OpenFlow switch through the edit-config command of OF-CONFIG;

[0235] Application configuration: After the switch receives the encrypted configuration file, it will use the key transmitted in advance through quantum key distribution technology to decrypt it to obtain the original configuration file. The configuration file content is applied by the switch to the corresponding port, queue and OpenFlow instance configuration to complete the device configuration update;

[0236] Determine the configuration status: After the configuration is issued, the controller can send the get-config query command through the OF-CONFIG protocol to obtain the configuration status of the switch and compare the actual configuration status with the configuration file to ensure that the two are consistent; if the configuration is not applied correctly, the controller can automatically roll back the configuration or re-issue the configuration command;

[0237] Rollback configuration: To prevent errors or unexpected configuration, the OF-CONFIG protocol supports a configuration rollback mechanism. When the controller detects a configuration error through status query, it sends a rollback command to request the device to restore to the previous normal configuration. After the rollback, the controller confirms again whether the restored status is correct.

[0238] By combining dynamic quantum AES encryption with quantum key distribution, the key generation and key transmission processes are optimized. The encryption level is improved by incorporating the transmission time point and configuration parameter characteristics into the key generation process. At the same time, quantum key distribution is used to ensure the security of key transmission. The configuration file is sent down through the southbound interface of the SDN architecture through the OF-CONFIG protocol, and the configuration status is detected to ensure the actual deployment of the configuration parameters.

[0239] The controller centrally manages the configuration of multiple switches and devices, greatly improving configuration efficiency. At the same time, multiple security measures such as quantum AES encryption, quantum key distribution, and TLS communication ensure the transmission security of configuration data and keys to prevent the leakage of sensitive information. The OF-CONFIG protocol can flexibly expand configuration options, support the configuration of multiple devices and functions, adapt to the needs of different network environments, and ultimately realize the one-click distribution function of configuration files.

[0240] The embodiments of the present invention are provided for the purpose of illustration and description. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present invention. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A deep learning-based power data network parameter rapid configuration system, characterized in that: include: A configuration collection and processing module, wherein the configuration collection and processing module includes a collection unit and a conversion unit; The collection unit is used to collect existing switch configuration files and convert these files into YANG models for unified management and adaptation of configuration information of devices from different manufacturers; The conversion unit converts the configuration files based on the YANG model, and uniformly represents the configuration information from different sources by converting the configuration files of various devices into structured data defined by the YANG model. The YANG model can also support data validation and constraint definition to ensure that the converted configuration files meet the predetermined standards and specifications. The configuration parsing module is connected to the configuration collection and processing module. Based on the Tree-LSTM method for parsing network device configuration parameters, the YANG model is converted into a configuration tree according to the syntax differences of device configuration files from different manufacturers. The Tree-LSTM model is used to accurately extract the configuration parameter key values ​​in the configuration file to achieve efficient configuration file parsing. A configuration file generation module, which is data-connected with the configuration parsing module, ensures that the newly generated configuration file can meet the expected network behavior to the greatest extent by optimally matching the configuration tree nodes in the configuration parsing module based on the existing network device configuration; The quick configuration module is connected to the configuration file generation module, combines quantum AES encryption and OF-CONFIG protocol configuration file distribution method, and dynamically encrypts the configuration file and securely transmits the key based on the centralized management of the SDN architecture, so as to realize automatic and secure distribution of the configuration file of the networked device to complete the quick configuration.

2. A deep learning-based power data network parameter rapid configuration system as claimed in claim 1, characterized in that: The specific collection process of the collection unit is as follows: The collection unit first remotely logs in to the network switch devices of Huawei, H3C and ZTE through the SSH security protocol. After successful login, enter the save command in the command line interface of the device to save the current device configuration information. Then, set up a TFTP server, which is used to receive the configuration file transmitted from the switch. After configuring the TFTP server, return to the command line interface of the switch and execute the tftp server-ip put filename command. Here, server-ip refers to the IP address of the TFTP server, and filename is the name of the configuration file you want to save on the TFTP server. After executing the command, the switch transfers the configuration file to the specified TFTP server. After the transfer is complete, verify whether the configuration file is transferred to the server completely and correctly to ensure that the backup operation is successful.

3. A deep learning-based power data network parameter rapid configuration system as claimed in claim 1, characterized in that: The configuration parsing module includes a conversion unit, a processing unit and a configuration file extraction unit; The conversion unit converts the configuration file information into AST for expression based on the YANG model; First, parse each YANG module in the YANG model separately to identify the basic elements including definition declarations and type definitions. During this process, a module will reference the data type or structure defined in another module. Therefore, ensure that all related module contents can be correctly loaded and parsed to ensure the consistency and integrity of the entire model. This involves recursively loading and parsing the referenced modules until all necessary module contents are integrated together. Then the originally complex and deep tree structure is flattened by traversing the tree structure and reorganizing the parent-child relationship between nodes, thereby simplifying the multi-layer nested structure into one or several layers of simpler structures, so that each node is directly subordinate to its nearest non-leaf node, thereby reducing the depth of the tree while retaining enough information to express the original hierarchical relationship; Then, key attribute information is extracted from each node, including but not limited to the node name, data type, and default value. Based on the extracted information, an abstract syntax tree is constructed. The tree not only reflects the original structure of the YANG model, but also clearly displays the key attributes of each node. The processing unit processes the configuration file based on the key attribute information and AST model extracted from each node by the conversion unit, and converts the configuration file using the AST model to eliminate differences in command syntax and reduce parsing difficulty. In the AST model, each node represents a specific grammatical structure, including an expression, a statement, or a function; The specific operations of converting the configuration information statement into an AST model are as follows: Lexical analysis: read the decrypted configuration parameter statement, scan it character by character, and decompose it into lexical units, including but not limited to keywords, identifiers, and control methods; Syntax analysis: design grammar rules and organize lexical units into a tree structure according to the grammar rules; Construct AST model: Construct AST model according to the tree structure of syntax analysis. Each node represents a syntax structure with corresponding types and attributes. The configuration file extraction unit extracts the configuration file and uses a tree-shaped long short-term memory network Tree-LSTM to process the tree data structure AST. Tree-LSTM can recursively process information along the branches of the tree, so as to capture the dependencies and context information between configuration instructions, and realize accurate semantic parsing of the configuration file content. Moreover, by recursively processing the information of each node, Tree-LSTM can understand the logical structure of the configuration file and identify key parameters and configuration items.

4. A deep learning-based power data network parameter rapid configuration system as claimed in claim 3, characterized in that: The calculation process of the tree-shaped long short-term memory network Tree-LSTM in the configuration file extraction unit is as follows: In Tree-LSTM, cell state, hidden state and gate state are three key components; cell state stores long-term information, hidden state transmits the output information of the current node, and gate state includes input gate, forget gate and output gate to control the flow of information, which together help the model effectively understand and process tree structure data; The input gate determines how much information from the current time step is written into the cell state: The output gate controls how much information is output to the hidden state: The function of the forget gate is to control how much of the cell state information at the previous moment is retained; kl and f kr Represent the states of the forget gates of the left and right child nodes respectively: Among them, e is the node embedding, σ is the sigmoid activation function, W,U are weight matrices, b is the bias term, and h kl and h kr are the hidden states of the left and right child nodes respectively; Cache Status μ k Combined with the node embedding information k By integrating these two parts of data, the characteristics and contextual relationships of the nodes can be reflected, and the representation ability of the model can be enhanced. The formula is as follows: Cell state c k Combining the cell state at the previous moment and the current input information, the cell state is updated and long-term information is stored through the regulation of the forget gate and the input gate; the formula is as follows: c k =c k ⊙μ k +(c kl ⊙f kl +c kr ⊙f kr ) Among them: ⊙ represents the Hadamard product, that is, the product of elements by elements; The hidden state is based on the activation of the output gate and the cell state. The output gate controls which part of the cell state information is output to form the hidden state of the current node. The formula is as follows: h k =o k ⊙tanh(c k ) Among them: h is the hidden state; The final output is the hidden state h of the root node k , which contains the semantic information of the entire tree; the hidden state of the root node is expressed as: h root =o root ⊙tanh(c root ) Among them, the output h root It can be used for further tasks, including but not limited to configuration parameter extraction, semantic parsing, and error detection. Through this vector, key information and context dependencies in the configuration file can be captured. In the configuration parameter extraction task of this patent, the overall semantic representation of the configuration file can be obtained through the hidden state of the root node.

5. A deep learning-based power data network parameter rapid configuration system as claimed in claim 1, characterized in that: The configuration file generation module performs configuration tree node similarity calculation, mapping rule generation and mutually exclusive word list optimization based on AST; The configuration tree node similarity calculation performs Transformer encoding on the configuration tree node and its subtrees and dynamically calculates the node similarity based on the multi-head self-attention mechanism to select the most similar candidate node; The mapping rule generation integrates the global and local optimal node matching algorithms, generates a candidate node set based on the configuration tree node similarity calculation, ensures model consistency through backtracking, generates mapping rules, and automatically generates configuration files; The mutually exclusive word list optimization utilizes path information to extract keyword mutually exclusive semantics, and further screens candidate nodes to accurately generate a target configuration file.

6. A deep learning-based power data network parameter rapid configuration system as claimed in claim 5, characterized in that: The specific process of the overall configuration file generation module is as follows: Configuration tree node similarity calculation based on Transformer; Preprocess the nodes in the configuration tree to extract the features of each node and its subtree; use the Transformer model to encode each node and its subtree to generate a high-dimensional feature vector; These feature vectors not only contain the basic information of the nodes, but also capture the dependencies and contextual information between nodes. Through the Transformer's multi-head attention mechanism, the model can better understand the relationship between nodes and provide richer information for subsequent similarity calculations. The encoding process of the Transformer model is expressed as: Y = Transformer(X) Among them, X is the feature matrix of the input node and its subtree, Y is the generated high-dimensional feature vector matrix; the feature vector d of each node i Calculated by the following formula: d i =Transformer(X i ) Among them, X i is the input feature vector of node i, d i is the high-dimensional feature vector of node i; Generate a similarity table based on the results, and calculate the similarity between each node and its subtree in the configuration tree to be matched and the local configuration tree; at this time, use the high-dimensional feature vector generated by the Transformer model to calculate the similarity between each node and its subtree; calculate the similarity between two nodes v by the cosine similarity formula i and v j The similarity is as follows: Among them, v i and v j Represent the feature vectors of node i and node j respectively; The Transformer model's multi-head attention mechanism dynamically adjusts the importance of different node features to generate more accurate similarity values. When determining candidate nodes, the node that is most similar to the node to be matched is selected from the local configuration tree. The formula is as follows: WITH multiple =Concat(Z1,Z2,...,Z d )IN o The multi-head attention mechanism processes multiple attention heads in parallel, and the weight matrix of each head is different. Let the number of heads be g, then the output of each head is concatenated to form the final multi-head attention output Z multiple ; Then, the Transformer model is used to compare the feature vectors of each node and its subtree, and the node with the highest similarity is selected as the candidate node; Mapping rule generation based on configuration tree similarity; Based on the Transformer configuration tree node similarity calculation results, a similarity table is generated, which contains the similarity values ​​between each node and the subtree with the node as the root. The mapping rule generation algorithm generates the mapping rules of the configuration file based on this similarity table. When the configuration tree to be matched establishes a mapping rule with the local configuration tree, the following operations are performed: First, traverse all nodes of the configuration tree to be matched from top to bottom. Each node has a subtree with the node as the root. Then, search the similarity table for a subtree in the local model with the highest similarity value to the subtree to determine the matching relationship of the nodes in the configuration file. Then, traverse the subtree of the configuration tree to be matched, find the node with the highest subtree similarity in the local configuration tree subtree, and record the node with the highest subtree matching similarity in all local configuration trees. Add the root node of this node as a candidate node to the candidate set to generate the mapping rule of the configuration file; each time you go down a layer, the size of the candidate node set increases by one unit; Finally, traverse to the leaf node to be matched, generate a subtree for each candidate node of its parent node, and find the leaf with the highest similarity to the leaf node to be matched; after determining the leaf node with the highest similarity, trace back its parent node path to the root, record the one with the highest path similarity, use it as the matching node, form the mapping rule of the configuration file and output it; Mutually exclusive word list optimization; By establishing a mutually exclusive word list, it is clearly identified which configuration items cannot exist in the valid configuration set at the same time, so as to avoid associating mutually exclusive configuration items together when generating mapping rules. The specific process is as follows: First, traverse the configuration tree, extract the name attribute of each node, and extract its keywords according to TF-IDF. Any path can correspond to a keyword set. The words in the set are not mutually exclusive and are included in the non-mutually exclusive word set. Then generate a two-dimensional table T, with rows and columns representing all keyword sets respectively. According to the content of the non-mutually exclusive word set, assign 1 to the corresponding position in the two-dimensional table. After obtaining the mutually exclusive vocabulary, the mapping rule generation algorithm is further optimized based on the mutually exclusive vocabulary. When selecting the global optimum or the local optimum, if there are two keywords in the names between the nodes that have appeared in the mutually exclusive vocabulary and there is a mutually exclusive relationship, it is considered that the concepts described by the two nodes are not the same and are not included in the set of candidate nodes.

7. A deep learning-based power data network parameter rapid configuration system as claimed in claim 1, characterized in that: The fast configuration module includes a quantum key distribution unit, a configuration file encryption unit and a configuration file issuing unit; The quantum key distribution unit uses the principles of quantum mechanics to solve the key security exchange of the quantum AES symmetric encryption algorithm. The sender modulates the single photon signal with a random orthogonal polarization basis and transmits it to the receiver through the quantum channel. The receiver measures the quantum state and exchanges part of the information with the sender to complete key negotiation, error correction and confidentiality enhancement, ensuring that both parties have an absolutely secure and consistent key, providing security for data encryption. The configuration file encryption unit adopts quantum AES dynamic encryption technology based on quantum computing optimization; by using quantum computing to achieve a secure key generation and exchange process, it provides stronger protection for the configuration file to prevent it from being intercepted or tampered during transmission; The configuration file sending unit adopts a configuration file sending method based on OF-CONFIG. In the SDN architecture, the SDN controller manages the configuration and status information of the OpenFlow switch through the southbound interface protocol, including OF-CONFIG; the OF-CONFIG protocol supports the controller to send configuration files through the edit-config command. At the same time, OF-CONFIG supports encrypted transmission and performs transmission security based on the TLS / SSL protocol and the configuration file encryption unit.

8. A deep learning-based power data network parameter rapid configuration system as claimed in claim 7, characterized in that: The specific process of the quantum key distribution unit is as follows: Key single-photon signal transmission: Based on the quantum no-cloning theorem and the quantum uncertainty principle; when the sender, including the controller, generates the key, it will randomly select two sets of orthogonal polarization bases to modulate the key single-photon signal. The modulated key single photon signal is sent to the network access device, and the sender modulates the quantum state |X A +iP A >, where X A and P A represents a Gaussian variable random sequence with a mean of 0, corresponding to the canonical position and canonical momentum. The sender transmits the quantum state |X A +iP A >Sent to the network access device, using the transmittance T tr and excess noise ε en To describe the channel environment of the quantum channel, the channel noise It is expressed as: Key single-photon signal processing: After receiving the quantum state, the network access device measures it through heterodyne detection. The total amount of noise introduced by the quantum state during the transmission and detection process can be expressed as: The receiver publishes the basis choice when measuring, and the sender only keeps all the data. These relevant data are called the original rough key. Where N s is the total number of signals, among which m are randomly sampled rk A rough key pair is used to estimate the transmittance T tr and excess noise ε en ; According to the maximum likelihood estimation, the following parameters are estimated, namely: Among them, v is is obtained by measuring the vacuum state, are regression coefficients; using the estimated results of these parameters, the transmittance T tr and excess noise ε en The estimation of can calculate the transmission characteristics of the quantum channel; Negotiation error correction includes negotiation and error correction. Negotiation is responsible for converting decimal key data into binary key data. Error correction uses high-performance error correction codes to correct the binary keys in the hands of both parties in communication, so that both parties can obtain completely consistent keys. After completing parameter estimation and negotiation and error correction, the information eavesdropped by the eavesdropper during the communication process is eliminated. This is achieved through confidentiality enhancement. The implementation method is to let the communicating parties calculate s'=h(s) based on an arbitrarily selected hash function h on an authenticated public channel, where s is the result after negotiation and error correction. The ultimate goal is to make the eavesdropper completely unaware of the content of s'; thus obtaining the final key rate K of the system finite , the formula is as follows: Where f is the repetition frequency, Nm is the number of signals that can finally extract the key, β(a∶B) is the mutual information between the two communicating parties, χ(B∶E) is the maximum amount of information eavesdropped by the eavesdropper, and Δ[Nm] is a parameter related to confidentiality enhancement. When K finite When >0, the generated key is available and combined with the one-time pad encryption mode, secure communication can be achieved.

9. A deep learning-based power data network parameter rapid configuration system as claimed in claim 7, characterized in that: The encryption process of the configuration file encryption unit is as follows: Quantum AES key generation: A random binary string with high entropy value is used as the original key. To enhance the randomness and security of the key, the transmission time point and configuration parameter characteristics are integrated into the key generation process, which not only increases the complexity and uniqueness of the key, but also makes the key dynamic and time-effective, ensuring that it is different in each encryption process, thereby improving the security of encryption. Quantum AES dynamic encryption: To further improve the security of configuration file encryption, the present invention introduces an autoencoder as an auxiliary tool; before quantum AES encryption, the autoencoder is used to pre-process the configuration file to extract the deep features of the data and reduce the dimension; by encoding the configuration file through the autoencoder, redundant data can be reduced and the concealment of the data can be increased before encryption; During the encryption process, the configuration file is divided into binary strings of the same length as the original key and dynamically encrypted by quantum AES through XOR operation; quantum AES uses a multi-round permutation-permutation network (SPN) structure for encryption; Quantum AES dynamic encryption includes the following four steps: key expansion, initial round transformation, multiple rounds of transformation including byte substitution, row shift and column confusion, and final round transformation; Byte replacement: Use S-box to replace bytes. This is the core nonlinear operation in quantum AES. It can effectively confuse input data. S-box can be regarded as a comparison table. Row shift: that is, each row of the matrix obtained by byte replacement is shifted to the left. The first row remains unchanged, the second row is shifted by 1 bit, the third row is shifted by 2 bits, and the fourth row is shifted by 3 bits. Column confusion: After the row shift, the resulting matrix will be multiplied by a fixed matrix on the left to perform a column confusion operation to generate a new matrix, thereby enhancing the randomness of the encrypted data and improving the security of the encryption algorithm; the matrix is ​​as follows: Round key addition: In each round of encryption operation, a round key is generated and XORed with the current data matrix. In this way, the key information is effectively integrated into the data to ensure data security and encryption strength.

10. A deep learning-based power data network parameter rapid configuration system as claimed in claim 7, characterized in that: The configuration file distribution unit is divided into user layer, middle layer and device layer: The user layer is mainly responsible for issuing configuration information and visualizing configuration templates. Users input configuration data through a visual interface and call the RESTful interface to send the configuration information to the middle layer in the RESTCONF format. At the same time, users can also collect device configuration information through this interface. The middle layer consists of the SDN controller and its functional modules, which are responsible for information conversion and centralized management. It receives the RESTCONF format configuration sent by the user layer and converts it into OF-CONFIG protocol messages so that it can be sent to network devices. At the same time, it receives the OF-CONFIG configuration information of the device layer and converts it into RESTCONF format to feed back to the user layer. In addition, the middle layer maintains a continuous connection with the device through the OF-CONFIG protocol, so users do not need to establish a connection with each device separately, which reduces the management burden of users. The device layer is the plane where network devices are located. The devices support OF-CONFIG server and can receive, process and send configuration information through OF-CONFIG protocol. The devices will store their own configuration information in a specific storage. The user layer can query or modify the device configuration through the middle layer to achieve centralized management. The specific implementation is as follows: Establish a connection between the controller and the switch: The controller establishes a secure connection with the OpenFlow switch through the OF-CONFIG protocol; encrypted communication is usually achieved through TLS / SSL to ensure that data will not be intercepted or tampered with during transmission; Sending encrypted configuration files: After the communication channel is established, the controller sends the encrypted configuration files to the OpenFlow switch through the edit-config command of OF-CONFIG; Application configuration: After the switch receives the encrypted configuration file, it will use the key transmitted in advance through quantum key distribution technology to decrypt it to obtain the original configuration file. The configuration file content is applied by the switch to the corresponding port, queue and OpenFlow instance configuration to complete the device configuration update; Determine the configuration status: After the configuration is issued, the controller can send the get-config query command through the OF-CONFIG protocol to obtain the configuration status of the switch and compare the actual configuration status with the configuration file to ensure that the two are consistent; if the configuration is not applied correctly, the controller can automatically roll back the configuration or re-issue the configuration command; Rollback configuration: To prevent errors or unexpected configuration, the OF-CONFIG protocol supports a configuration rollback mechanism. When the controller detects a configuration error through status query, it sends a rollback command to request the device to restore to the previous normal configuration. After the rollback, the controller confirms again whether the restored status is correct.