Method for accessing power equipment in power Internet of Things, equipment and medium

By identifying and converting the communication protocols of power equipment, the complexity of equipment access and data analysis in the power Internet of Things is solved, the access efficiency and stability are improved, and the compatibility and security of the system are enhanced.

CN118803087APending Publication Date: 2024-10-18GUANGZHOU KETENG INFORMATION TECH
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202411127544.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

There are large differences in device protocol versions in the power Internet of Things, which makes device access difficult and data analysis complex, affecting system compatibility and scalability.

Method used

By obtaining the original communication data of power equipment when it is waiting for access, classifying and identifying the protocol version, if the parsing fails, it is converted into data with a unified format, encapsulated into a virtual representation, and converted into a secure communication protocol under the security dimension to realize equipment connection. enter.

Benefits of technology

It improves the efficiency and stability of equipment access, enhances the compatibility and security of the system, and ensures the reliable operation of the power Internet of Things.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118803087A_ABST
    Figure CN118803087A_ABST
Patent Text Reader

Abstract

The invention discloses a method for accessing power equipment in a power internet of things, equipment and a medium, and the method comprises the steps: classifying the power equipment according to original communication data transmitted by the power equipment when the power equipment waits for accessing the power internet of things, obtaining the original version information of a communication protocol, if the analysis of the original communication data according to the original version information fails, converting the original communication data into target original communication data with a uniform format, packaging the target original communication data into a virtual representation of the original version information, converting a target communication protocol into a secure communication protocol under a secure dimension according to the virtual representation, and sending the secure communication protocol to the server; and accessing the power equipment to the power internet of things according to the secure communication protocol. According to the embodiment of the invention, the original communication data of the newly accessed power equipment is collected and analyzed, the analysis result is packaged into the virtual representation, the secure communication protocol is formulated, and the power equipment is accessed to the Internet of Things, so that the compatibility and the stability of the equipment access process are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the technical field of power grid equipment, and in particular to a method, equipment and medium for accessing power equipment in a power Internet of Things. Background Art

[0002] There are problems in the power Internet of Things, such as large differences in device protocol versions and difficulty in accessing unknown protocol devices. These problems have a certain impact on the compatibility and scalability of the power Internet of Things system.

[0003] Different types of power equipment produced by different manufacturers often use different communication protocols and data formats. Even different models or versions of equipment from the same manufacturer may have protocol differences. The diversity and complexity of this protocol has a certain impact on device access and data parsing. The system needs to write a dedicated parsing module for each protocol, which is a large workload and has a small coverage range. At the same time, with the continuous emergence of new equipment, there are often situations where devices with unknown protocols need to be connected. Due to the lack of corresponding protocol specifications and parsing modules, it is difficult for these devices to access the system and realize data interaction. Summary of the invention

[0004] The present invention provides a method, a device and a medium for accessing electric power equipment in an electric power Internet of Things, so as to improve the efficiency and stability of the equipment accessing the electric power Internet of Things.

[0005] In a first aspect, an embodiment of the present invention provides a method for accessing power equipment in a power Internet of Things, comprising:

[0006] When the power equipment is waiting to be connected to the power Internet of Things, the power equipment is classified according to the original communication data transmitted by the power equipment to obtain the original version information of the communication protocol;

[0007] If parsing the original communication data according to the original version information fails, converting the original communication data into target original communication data with a unified format;

[0008] Encapsulating the target original communication data into a virtual representation of the original version information;

[0009] Converting the target communication protocol into a secure communication protocol in a secure dimension according to the virtual representation;

[0010] The power equipment is connected to the power Internet of Things according to the secure communication protocol.

[0011] In a second aspect, an embodiment of the present invention further provides a device for accessing power equipment in a power Internet of Things, including:

[0012] The original version information acquisition module is used to classify the power equipment according to the original communication data transmitted by the power equipment when the power equipment is waiting to be connected to the power Internet of Things, and obtain the original version information of the communication protocol;

[0013] a target original communication data acquisition module, configured to convert the original communication data into target original communication data of a unified format if parsing the original communication data according to the original version information fails;

[0014] a target original communication data encapsulation module, used for encapsulating the target original communication data into a virtual representation of the original version information;

[0015] A secure communication protocol conversion module, configured to convert the target communication protocol into a secure communication protocol in a secure dimension according to the virtual representation;

[0016] An electric power equipment access module is used to connect the electric power equipment to the electric power Internet of Things according to the secure communication protocol.

[0017] In a third aspect, an embodiment of the present invention further provides a computer device, including:

[0018] one or more processors;

[0019] A storage device for storing one or more programs;

[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for accessing power equipment in the power Internet of Things as provided in the first aspect of the present invention.

[0021] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for accessing power equipment in the power Internet of Things as provided in the first aspect of the present invention.

[0022] In a fifth aspect, an embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method for accessing power equipment in the power Internet of Things as provided in the first aspect of the present invention.

[0023] In an embodiment of the present invention, when the power equipment is waiting to be connected to the power Internet of Things, the power equipment is classified according to the original communication data transmitted by the power equipment to obtain the original version information of the communication protocol. If the original communication data cannot be parsed according to the original version information, the original communication data is converted into target original communication data with a unified format, and the target original communication data is encapsulated as a virtual representation of the original version information. According to the virtual representation, the target communication protocol is converted into a secure communication protocol under the dimension of security, and the power equipment is connected to the power Internet of Things according to the secure communication protocol. This embodiment collects the original communication data of the newly connected power equipment and parses the data, and encapsulates the results of the analysis into a virtual representation, so as to improve the efficiency and convenience of data exchange and reading, formulate a secure communication protocol to cope with the security mechanism of different access device protocols, connect the power equipment to the Internet of Things, improve the compatibility and stability of the device access process, and enhance the security of the system to ensure the reliable operation of the power Internet of Things. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A flowchart of a method for accessing power equipment in a power Internet of Things provided in Embodiment 1 of the present invention;

[0025] Figure 2 A structural block diagram of a device for accessing power equipment in the power Internet of Things provided in Embodiment 2 of the present invention;

[0026] Figure 3 A schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can cover sequential implementations other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] Embodiment 1

[0030] See also Figure 1 , shows a flow chart of a method for accessing electric power equipment in the electric power Internet of Things provided by the first embodiment of the present invention. The method can be executed by a device for accessing electric power equipment in the electric power Internet of Things. The device for accessing electric power equipment in the electric power Internet of Things can be implemented in the form of hardware and / or software. The device for accessing electric power equipment in the electric power Internet of Things can be configured in a computer device. Figure 1 As shown, the method includes:

[0031] Step 101: When the power equipment is waiting to be connected to the power Internet of Things, the power equipment is classified according to the original communication data transmitted by the power equipment to obtain the original version information of the communication protocol.

[0032] In this embodiment, when the power equipment is waiting to access the power Internet of Things, the power Internet of Things collects the original communication data transmitted by the power equipment waiting to access, the power Internet of Things classifies the power equipment waiting to access according to the collected original communication data, and the power Internet of Things identifies and obtains the original version information of the communication protocol used by the power equipment waiting to access.

[0033] In this embodiment, a protocol recognition model of the decision tree type is loaded in the electric power Internet of Things, and the protocol recognition model of the decision tree is trained.

[0034] Specifically, for various types of power equipment from different manufacturers of the power Internet of Things, protocol documents of various versions of common power protocols such as Modbus, Distributed Network Protocol Version 3 (DNP3), and International Electrotechnical Commission Standard 61850 (IEC61850) are collected, and protocol elements such as keywords, message formats, and command codes are extracted from these documents to construct feature vectors of protocol versions. The feature vectors are normalized to generate a standardized protocol feature data set. Based on the generated standardized protocol feature data set, the classification and regression tree algorithm version 4.5 (C4.5 decision tree algorithm) is used to construct a protocol recognition model, and the Gini coefficient is set as the node splitting standard, and the minimum number of samples and the maximum depth of the tree are set as the stopping conditions. The cross-validation method is used for model training and parameter tuning to obtain a protocol recognition model of a trained decision tree.

[0035] The original communication data transmitted by the power equipment is received from the communication interface of the power Internet of Things, and the original communication data is denoised and formatted. The protocol elements such as keywords, message formats and command codes in the original communication data are extracted and constructed as feature vectors. The feature vectors are input into the trained protocol recognition model to identify the original version information of the communication protocol.

[0036] For example, for various types of power equipment in the power Internet of Things, documents of various versions of common power protocols such as Modbus, DNP3, and IEC61850 are collected. Features are extracted from these documents, such as the function code 01 of the Modbus protocol, which indicates reading the coil status, and the function code 03 indicates reading the holding register, etc.; the application layer function code 01 of the DNP3 protocol, which indicates reading, and the function code 02 indicates writing, etc.; and the message types of the IEC61850 protocol such as Generic Object Oriented Substation Event (GOOSE), Manufacturing Message Specification (MMS), etc. These features are converted into numerical vectors, for example, function code 01 is represented as [1, 0, 0], and function code 03 is represented as [0, 1, 0]. The feature vectors are normalized so that all feature values ​​are scaled to between 0 and 1. The C4.5 decision tree algorithm is used to build a protocol recognition model. The Gini coefficient threshold is set to 0.1 as the node splitting standard, the minimum number of samples is 5, and the maximum depth of the tree is 10. The 10-fold cross-validation method is used for model training and parameter tuning to obtain the decision rule with the highest recognition accuracy. The original communication data of the connected power equipment is collected through the RS485 serial port or Ethernet interface, and the sampling rate is set to 115200bps. The collected data is subjected to 50Hz power frequency interference denoising and American Standard Code for Information Interchange (ASCII) formatting. The protocol elements such as keywords such as "GOOSE", message formats such as "fixed length + variable length", and command codes such as "0x01" in the communication data are extracted to construct the feature vector of the power equipment to be identified. The feature vector is input into the trained decision tree model and matched according to the decision rule. If the leaf node marked as "ModbusRTUv1.1b" is matched, it is judged that the power equipment uses the Modbus Remote Terminal Unit (ModbusRTU) protocol version 1.1b.

[0037] The C4.5 decision tree algorithm is used to train the protocol recognition model because it can efficiently process mixed data (including continuous and discrete values), automatically select the most effective features for classification, and reduce overfitting through pruning technology to improve the generalization ability of the model. In addition, the generated decision tree is intuitive and easy to understand, and is easy to explain and apply.

[0038] Step 102: If parsing the original communication data according to the original version information fails, the original communication data is converted into target original communication data with a unified format.

[0039] In this embodiment, the electric power Internet of Things parses the original communication data according to the original version information obtained by identification. If the parsing fails, the original communication data is converted into target original communication data with a unified format.

[0040] In one embodiment of the present invention, step 102 includes the following steps:

[0041] Step 1021: Call a parser that matches the original version information to parse fields in the original communication data.

[0042] In this embodiment, the power Internet of Things calls a parser that matches the original version information based on the identified original version information, parses the key data fields in the original communication data, and obtains a preliminary parsing result. The parser includes a specific version of the data structure definition and parsing rules.

[0043] Step 1022: If the fields in the original communication data do not conform to the expected data format, the fields in the original communication data are compared with the standard data template corresponding to the original version information to obtain deviation data items.

[0044] In this embodiment, if the data format of the field in the parsed original communication data does not conform to the expected data format, the field in the original communication data is compared with the standard template corresponding to the original version information in the power Internet of Things to obtain a deviation data item.

[0045] For example, the identified ModbusRTUv1.1b protocol version information is used as an example. For example, the current data of ModbusRTUv1.1b contains the fields "func_code", "data_addr", and "data_value", while the standard template in the power Internet of Things contains "function_code", "address", and "value". By comparing the field names, the mismatched data items are identified and a deviation data item list ["func_code", "data_addr", and "data_value"] is generated.

[0046] Step 1023: Match the deviation data item with the item in the standard data template to adjust the deviation data item.

[0047] In this embodiment, the fields in the original communication data are compared with the standard template corresponding to the original version information in the power Internet of Things, and the deviation data items obtained are matched with the items in the standard data template in the power Internet of Things, and the deviation data items are adjusted according to the matching results.

[0048] In the specific implementation, a fuzzy matching algorithm based on edit distance is used to calculate the edit distance between the deviation data item and each item in the standard data template. If the calculated lowest edit distance is less than or equal to the preset first threshold, it is determined that the deviation data item and the item are successfully matched, and the value of the successfully matched item is assigned to the deviation data item. If the calculated lowest edit distance is greater than the preset first threshold, it is determined that the deviation data item and the item fail to match, and the deviation data item that fails to match is marked with an unmatched label to adjust the deviation data item.

[0049] Step 1024: Perform at least one of field renaming and data type conversion in the original communication data after adjusting the deviation data item to obtain candidate original communication data.

[0050] In this embodiment, a mapping relationship between the original communication data after the adjustment deviation data item and the standard template is obtained in the data heterogeneous conversion engine of the power Internet of Things. The mapping relationship includes a field renaming list, a data type conversion list, and a unit conversion list. The fields in the original communication data after the adjustment deviation data item are renamed according to the field renaming list, and the type conversion function in the data type conversion list is used to convert the data type of the fields in the original communication data after the renamed adjustment deviation data item to obtain candidate original communication data.

[0051] For example, in the data heterogeneous conversion engine in the power Internet of Things, the mapping relationship between the original communication data after adjusting the deviation data item and the standard template is obtained, such as mapping the field "temp_c" of the original communication data after adjusting the deviation data item to the field "temperature_fahrenheit" of the standard template. The field names are compared by the string similarity algorithm to generate a field renaming list {"temp_c":

[0052] "temperature_fahrenheit"}; analyze the data type, create a conversion list {"temp_c": "float_to_float"}, compare the units, and generate a conversion list {"temp_c": "c_to_f"}. Rename the "temp_c" field in the original communication data after adjusting the deviation data item to "temperature_fahrenheit"; use the float() function to convert the string "23.5" to the floating point number 23.5, so as to obtain the converted communication data, that is, the candidate original communication data.

[0053] Step 1025: Perform at least one of splitting, merging and converting operations on the fields in the candidate original communication data to obtain standardized original communication data with a unified format.

[0054] In this embodiment, a predefined mapping rule is obtained in a rule engine in the electric power Internet of Things. If the mapping rule is a one-to-many relationship, the candidate original communication data after the data type is converted is split; if the mapping rule is a many-to-one relationship, the candidate original communication data after the data type is converted is merged. The formula defined in the mapping rule is used and a secure calculation function is used to perform mathematical operations on the split or merged candidate original communication data to obtain standardized original communication data in a unified format.

[0055] Step 1026: If the value of the specified field in the standardized original communication data is within a preset valid range, the standardized original communication data is output as target original communication data.

[0056] In this embodiment, the data integrity and validity are verified for the standardized original communication data. If the value of the specified field in the standardized original communication data is within a preset valid range, the standardized original communication data is output as the target original communication data.

[0057] Step 103: Encapsulate the target original communication data into a virtual representation of the original version information.

[0058] In this embodiment, the acquired target original communication data is encapsulated, and the encapsulated target original communication data is mapped to form a virtual representation of the original version information.

[0059] In this embodiment, a predefined unified data version model structure is read from a configuration database, and the structure includes information such as field name, data type, length limit, etc. A dictionary object is created according to the unified data version model structure, and the fields in the dictionary object are initialized. String matching is used to calculate the similarity between the fields in the target original communication data and the fields in the unified data version model structure. If the similarity is greater than or equal to a preset second threshold, the fields in the target original communication data are filled into the fields in the dictionary object. For fields that cannot be matched, they are temporarily retained in special fields. The fields in the dictionary object are converted according to predefined field mapping rules, and the field mapping rules include source field name, target field name, data type conversion function, formatting function, etc. The converted fields in the dictionary object are encapsulated into a specified data exchange format to obtain a virtual representation of the original version information.

[0060] Exemplarily, the parsed device version data is obtained from the data parsing module, such as {"dev_temp": 25.5, "dev_hum": 60}, and the predefined unified data version model structure is read from the configuration database, including the fields {"temperature": {"type":"float","precision":2}, "humidity": {"type":"integer","min":0,"max":100}}, and a dictionary object is created to initialize the fields. The field similarity is calculated using the Levenshtein distance algorithm. The similarity between "dev_temp" and "temperature" is 0.82, which exceeds the preset threshold of 0.8, and 25.5 is filled into the "temperature" field. The similarity between "dev_hum" and "humidity" is 0.75, which is lower than the threshold and is temporarily stored in the special field "_unmatched". The data mapping engine is called to load the field mapping rule {"dev_hum": {"target":"humidity","type_convert":"int","format":"percentage"}}. Apply the rule to map "dev_hum" to "humidity", which is converted to an integer of 60. Check the required fields and find that they are all filled. Apply format normalization to keep two decimal places for "temperature" 25.50 and limit the range of "humidity" to 0-100. Finally, a virtual representation in the JavaScript Object Notation (JSON) format is generated: {"temperature": 25.50, "humidity": 60, "_unmatched"}.

[0061] Step 104: Convert the target communication protocol into a secure communication protocol in a secure dimension according to the virtual representation.

[0062] In this embodiment, based on the virtual representation of the original version information, the target communication protocol is converted into a secure communication protocol in a security dimension to cope with the differences in security mechanisms of different protocols of the access device.

[0063] In one embodiment of the present invention, step 104 includes the following steps:

[0064] Step 1041: extract data structure features, field type features, and value range features from the virtual representation to obtain a version feature set.

[0065] In this embodiment, data structure features, field type features, and value range features are extracted from the virtual representation of the original version information to obtain a version feature set for training a decision tree version recognition model.

[0066] Step 1042: Load a version identification model of decision tree type.

[0067] In this embodiment, the original communication data of the power equipment connected to the power Internet of Things is collected as sample data, the sample data is divided into data blocks according to a fixed length, the data blocks are converted into a fixed-size input matrix, and a convolutional neural network is trained as a feature model based on the input matrix. The original communication data transmitted by the unknown device is input into the feature model to extract feature vectors, where the unknown device is a power device with an unknown communication protocol. The feature vectors are used to cluster the unknown devices to obtain protocol groups, and the decision tree is trained as a version recognition model based on the data structure features, field type features, and value range features corresponding to the protocol groups.

[0068] Exemplarily, the original communication data of the power equipment connected to the power Internet of Things is collected as sample data, and the sample data is preprocessed, including data packet segmentation, byte order adjustment, and noise removal. The processed data is segmented into a fixed length of 1024 bytes, the insufficient part is filled with zeros, and converted into a fixed size input matrix of 32x32. According to the input matrix, a convolutional neural network structure containing 3 convolutional layers, 3 maximum pooling layers, and 2 fully connected layers is constructed. The convolutional layers use 32, 64, and 128 3x3 convolution kernels, respectively, the pooling layer is 2x2, and the fully connected layer contains 512 and 256 neurons. The stochastic gradient descent algorithm is used for back propagation training, and the learning rate is set to 0.001, the batch size is 64, the number of training rounds is 100, the cross entropy is used as the loss function, and the preset optimizer is used for parameter update. The original communication data of the unknown device is input into the trained feature model to extract the feature vector. The feature vector is clustered using a clustering algorithm. The initial number of cluster centers is set to 10, the maximum number of iterations is 100, and the convergence threshold is 0.001. The optimal number of clusters is evaluated by preset indicators to obtain the protocol family of the unknown device. The decision tree is trained as a version recognition model based on the data structure characteristics, field type characteristics, and numerical range characteristics corresponding to the protocol family.

[0069] Step 1043: input the version feature set into the version identification model for processing to determine the protocol family to which the power equipment belongs.

[0070] In this embodiment, the version feature set is input into a trained version recognition model for processing, and the trained version recognition model determines the protocol family to which the connected power equipment belongs based on the version feature set.

[0071] Step 1044: Obtain a protocol template that matches the protocol family.

[0072] In this embodiment, a protocol template that matches the protocol family is obtained from a protocol feature library in the electric power Internet of Things.

[0073] Step 1045: Determine the key fields in the original communication data according to the minimum edit distance between the fields of the original communication data and the fields of the protocol template.

[0074] In this embodiment, a dynamic programming algorithm is used to calculate the minimum edit distance between the fields of the original communication data of the new access device and the fields of the protocol template, and to determine the key fields in the original communication data of the new access device.

[0075] Step 1046: Establish a security protocol conversion matrix.

[0076] In this embodiment, a security protocol conversion matrix is ​​established, the rows of the security protocol conversion matrix represent source protocol security mechanisms, the columns represent target unified security policies, and the matrix elements include conversion functions.

[0077] Step 1047: Use the key fields in the original communication data to perform security policy mapping in the security protocol conversion matrix to obtain the security policy.

[0078] In this embodiment, for key fields in the original communication data of the newly connected device, security policy mapping is performed by searching the security protocol conversion matrix to obtain a unified security policy.

[0079] Step 1048: Convert the target communication protocol into a secure communication protocol according to the security policy.

[0080] In this embodiment, by acquiring key fields in the original communication data of the newly connected device, the corresponding security policy in the security protocol conversion matrix is ​​queried, and the target communication protocol is converted into a secure communication protocol according to the security policy.

[0081] Step 105: Connect the power equipment to the power Internet of Things according to the secure communication protocol.

[0082] In this embodiment, the secure communication protocol is used to cope with the differences in security mechanisms of different protocols of access devices. The power equipment can be connected to the power Internet of Things based on the secure communication protocol.

[0083] In this embodiment, the security communication protocol is optimized in the transmission dimension. If the optimization is completed, the security communication protocol is processed according to the device table and the protocol version table in the relational database to obtain the security version information, and a standardized interface is defined under the plug-in protocol adaptation framework. According to the standardized interface definition parameters, the interface specification of the plug-in protocol adaptation framework is obtained, and the protocol adaptation plug-in that matches the security version information is loaded. The protocol adaptation plug-in is called to perform at least one of parsing, converting and encrypting the original communication data of the power equipment to obtain the target communication data, and the target communication data is transmitted to the power Internet of Things according to the interface specification, so as to realize the access of the power equipment to the power Internet of Things.

[0084] Exemplarily, according to the transmission characteristics of the device protocol version, select the appropriate Lempel-Ziv 4 (LZ4) compression algorithm and Nagle algorithm from the protocol optimization engine, such as using a data compression algorithm in a low-bandwidth environment and a data packet merging algorithm in a high-latency environment, to optimize the version data transmission, including data compression, message merging, redundancy removal and other operations. A relational database is established through the protocol version management system, including a device table and a protocol version table, and the device ID, protocol type, version number, update time and other information are recorded through foreign key associations to uniformly manage the protocol version of the access device. A plug-in protocol adaptation framework is used to define standardized interfaces, including parsing interfaces, conversion interfaces, and encryption interfaces, formulate interface specifications and parameter definitions, input the original data stream into the parsing interface, and output the parsed structured data, input the source protocol data into the conversion interface, and output the target protocol data, and input the plaintext data and encryption parameters into the encryption interface, and output the ciphertext data. According to the device access request, the database is queried to obtain the protocol information, and the reflection mechanism is used to dynamically load the corresponding protocol adapter plug-in from the plug-in library. The parsing, conversion, and encryption methods of the plug-in are called to perform protocol parsing, conversion, encryption and other operations. The device data is converted into a standard format and sent to the power Internet of Things platform through a unified interface to enable power equipment to access the power Internet of Things.

[0085] In an embodiment of the present invention, when the power equipment is waiting to be connected to the power Internet of Things, the power equipment is classified according to the original communication data transmitted by the power equipment to obtain the original version information of the communication protocol. If the original communication data cannot be parsed according to the original version information, the original communication data is converted into target original communication data with a unified format, and the target original communication data is encapsulated as a virtual representation of the original version information. According to the virtual representation, the target communication protocol is converted into a secure communication protocol under the dimension of security, and the power equipment is connected to the power Internet of Things according to the secure communication protocol. This embodiment collects the original communication data of the newly connected power equipment and parses the data, and encapsulates the results of the analysis into a virtual representation, so as to improve the efficiency and convenience of data exchange and reading, formulate a secure communication protocol to cope with the security mechanism of different access device protocols, connect the power equipment to the Internet of Things, improve the compatibility and stability of the device access process, and enhance the security of the system to ensure the reliable operation of the power Internet of Things.

[0086] Embodiment 2

[0087] Figure 2 A schematic diagram of a structure of a device for accessing power equipment in a power Internet of Things provided in Embodiment 2 of the present invention is shown in FIG. Figure 2 As shown, the device comprises:

[0088] The original version information acquisition module 201 is used to classify the power equipment according to the original communication data transmitted by the power equipment when the power equipment is waiting to be connected to the power Internet of Things, and obtain the original version information of the communication protocol;

[0089] The target original communication data acquisition module 202 is used to convert the original communication data into target original communication data with a unified format if parsing the original communication data according to the original version information fails;

[0090] A target original communication data encapsulation module 203, configured to encapsulate the target original communication data into a virtual representation of the original version information;

[0091] A secure communication protocol conversion module 204, configured to convert the target communication protocol into a secure communication protocol in a secure dimension according to the virtual representation;

[0092] The power equipment access module 205 is used to connect the power equipment to the power Internet of Things according to the secure communication protocol.

[0093] In one embodiment of the present invention, the original version information acquisition module 201 includes:

[0094] A protocol identification model loading module is used to load a protocol identification model of a decision tree type;

[0095] An original communication data receiving module, used for receiving the original communication data transmitted by the electric power equipment from the communication interface of the electric power Internet of Things;

[0096] A feature vector construction module, used to construct a feature vector from keywords, message formats and command codes in the original communication data;

[0097] The original version information identification module is used to input the feature vector into the protocol identification model to identify the original version information of the communication protocol.

[0098] In one embodiment of the present invention, the target original communication data acquisition module 202 includes:

[0099] A field parsing module, used for calling a parser matching the original version information to parse the fields in the original communication data;

[0100] a deviation data item acquisition module, configured to compare the field in the original communication data with the standard data template corresponding to the original version information to obtain the deviation data item if the field in the original communication data does not conform to the expected data format;

[0101] a deviation data item adjustment module, used to match the deviation data item with an item in the standard data template to adjust the deviation data item;

[0102] a candidate original communication data acquisition module, configured to perform at least one of field renaming and data type conversion in the original communication data after adjusting the deviation data item, to obtain candidate original communication data;

[0103] A standardized original communication data acquisition module, used to perform at least one operation of splitting, merging and converting the fields in the candidate original communication data to obtain standardized original communication data with a unified format;

[0104] The target original communication data output module is used to output the standardized original communication data as the target original communication data if the value of the specified field in the standardized original communication data is within a preset valid range.

[0105] In one embodiment of the present invention, the deviation data item adjustment module includes:

[0106] An edit distance calculation module, used to calculate the edit distance between the deviation data item and each item in the standard data template;

[0107] A value assignment module, configured to determine that the deviation data item successfully matches the item if the edit distance with the lowest value is less than or equal to a preset first threshold, and assign the value of the successfully matched item to the deviation data item;

[0108] An unmatched label marking module, configured to determine that the deviation data item fails to match the item if the edit distance with the lowest value is greater than a preset first threshold, and mark the unmatched label on the deviation data item that fails to match;

[0109] In one embodiment of the present invention, the candidate original communication data acquisition module includes:

[0110] A mapping relationship acquisition module, used to acquire a mapping relationship, wherein the mapping relationship includes a field renaming list, a data type conversion list, and a unit conversion list;

[0111] A field renaming module, configured to rename the fields in the original communication data after adjusting the deviation data items according to the field renaming list;

[0112] A data type conversion module, configured to convert data types of fields in the renamed original communication data after adjusting the deviation data items, using a type conversion function in the data type conversion list;

[0113] In one embodiment of the present invention, the standardized original communication data acquisition module includes:

[0114] A mapping rule acquisition module, used to acquire predefined mapping rules;

[0115] A candidate original communication data splitting module, configured to split the candidate original communication data after the data type is converted if the mapping rule is a one-to-many relationship;

[0116] A candidate original communication data merging module, configured to merge the candidate original communication data after data type conversion if the mapping rule is a many-to-one relationship;

[0117] The candidate original communication data operation module is used to use the formula defined in the mapping rule and adopt a safe calculation function to perform mathematical operations on the candidate original communication data after splitting or merging to obtain standardized original communication data with a unified format.

[0118] In one embodiment of the present invention, the target original communication data encapsulation module 203 includes:

[0119] A unified data version model structure reading module is used to read a predefined unified data version model structure;

[0120] A dictionary object creation module, used to create a dictionary object according to the unified data version model structure, and initialize the fields in the dictionary object;

[0121] A similarity calculation module, used to calculate the similarity between the fields in the target original communication data and the fields in the unified data version model structure;

[0122] A field filling module, configured to fill the fields in the target original communication data into the fields in the dictionary object if the similarity is greater than or equal to a preset second threshold;

[0123] A field conversion module, used to convert the fields in the dictionary object according to predefined field mapping rules;

[0124] The field encapsulation module is used to encapsulate the converted fields in the dictionary object into a specified data exchange format to obtain a virtual representation of the original version information.

[0125] In one embodiment of the present invention, the secure communication protocol conversion module 204 includes:

[0126] A version feature set acquisition module, used to extract data structure features, field type features and value range features from the virtual representation to obtain a version feature set;

[0127] A version identification model loading module is used to load a version identification model of decision tree type;

[0128] A protocol family determination module, used for inputting the version feature set into the version identification model for processing and determining the protocol family to which the power equipment belongs;

[0129] A protocol template acquisition module, used to acquire a protocol template matching the protocol family;

[0130] A key field determination module, configured to determine a key field in the original communication data according to a minimum edit distance between a field of the original communication data and a field of the protocol template;

[0131] A security protocol conversion matrix establishment module is used to establish a security protocol conversion matrix;

[0132] A security policy acquisition module, used to use key fields in the original communication data to perform security policy mapping in the security protocol conversion matrix to obtain a security policy;

[0133] The target communication protocol conversion module is used to convert the target communication protocol into a secure communication protocol according to the security policy.

[0134] In one embodiment of the present invention, the secure communication protocol conversion module 204 further includes:

[0135] A sample data collection module, used to collect raw communication data transmitted in streaming form by power equipment connected to the power Internet of Things as sample data;

[0136] A data block segmentation module, used to segment the sample data into data blocks according to fixed lengths;

[0137] An input matrix conversion module, used for converting the data block into an input matrix of a fixed size;

[0138] A feature model training module, used for training a convolutional neural network into a feature model according to the input matrix;

[0139] A feature vector extraction module, used for inputting the original communication data transmitted by the unknown device into the feature model to extract the feature vector; the unknown device is an electric power device with an unknown communication protocol;

[0140] A protocol family acquisition module, used to cluster the unknown devices using the feature vector to obtain a protocol family;

[0141] The version identification model training module is used to train the decision tree into a version identification model according to the data structure characteristics, field type characteristics and numerical range characteristics corresponding to the protocol family group.

[0142] In one embodiment of the present invention, the power equipment access module 205 includes:

[0143] A secure communication protocol optimization module, used to optimize the secure communication protocol in the dimension of transmission;

[0144] A security version information acquisition module is used to process the security communication protocol according to the device table and the protocol version table in the relational database to obtain security version information if the optimization is completed;

[0145] The interface definition module is used to define standardized interfaces under the plug-in protocol adaptation framework;

[0146] An interface specification acquisition module, used to obtain the interface specification of the plug-in protocol adaptation framework according to the standardized interface definition parameters;

[0147] A protocol adapter plug-in loading module is used to load a protocol adapter plug-in that matches the security version information;

[0148] A target communication data acquisition module, used for calling the protocol adapter plug-in to perform at least one of parsing, converting and encrypting the original communication data of the power equipment to obtain target communication data;

[0149] The target communication data transmission module is used to transmit the target communication data to the electric power Internet of Things according to the interface specification.

[0150] The device for accessing electric power equipment in the electric power Internet of Things provided in an embodiment of the present invention can execute the method for accessing electric power equipment in the electric power Internet of Things provided in any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the method for accessing electric power equipment in the electric power Internet of Things.

[0151] Embodiment 3

[0152] See also Figure 3 , showing a schematic diagram of the structure of a computer device provided by an embodiment of the present invention. The computer device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, blade servers, mainframe computers, and other suitable computers. The computer device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0153] like Figure 3 As shown, the computer device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the computer device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0154] A number of components in the computer device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the computer device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0155] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for accessing power equipment in the power Internet of Things.

[0156] In some embodiments, the method for accessing an electric power device in the electric power Internet of Things may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the computer device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for accessing an electric power device in the electric power Internet of Things described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for accessing an electric power device in the electric power Internet of Things in any other appropriate manner (e.g., by means of firmware).

[0157] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0158] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0159] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0160] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0161] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0162] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0163] Embodiment 4

[0164] An embodiment of the present invention further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method for accessing power equipment in the power Internet of Things as provided in any embodiment of the present invention.

[0165] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0166] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0167] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for accessing power equipment in the power Internet of Things, It is characterized in that include: When the power equipment is waiting to be connected to the power Internet of Things, the power equipment is classified according to the original communication data transmitted by the power equipment to obtain the original version information of the communication protocol; If parsing the original communication data according to the original version information fails, converting the original communication data into target original communication data with a unified format; Encapsulating the target original communication data into a virtual representation of the original version information; Converting the target communication protocol into a secure communication protocol in a secure dimension according to the virtual representation; The power equipment is connected to the power Internet of Things according to the secure communication protocol.

2. The method according to claim 1, It is characterized in that The classifying the electric power equipment according to the original communication data transmitted by the electric power equipment to obtain the original version information of the communication protocol includes: Load the protocol recognition model of decision tree type; Receiving original communication data transmitted by the power equipment from the communication interface of the power Internet of Things; Constructing keywords, message formats and command codes in the original communication data into feature vectors; The feature vector is input into the protocol identification model to identify the original version information of the communication protocol.

3. The method according to claim 1, It is characterized in that If parsing the original communication data according to the original version information fails, converting the original communication data into target original communication data with a unified format includes: Invoking a parser that matches the original version information to parse fields in the original communication data; If the field in the original communication data does not conform to the expected data format, comparing the field in the original communication data with the standard data template corresponding to the original version information to obtain a deviation data item; matching the deviation data item with an item in the standard data template to adjust the deviation data item; In the original communication data after adjusting the deviation data item, performing at least one operation of renaming a field and converting a data type to obtain candidate original communication data; Performing at least one of splitting, merging and converting on the fields in the candidate original communication data to obtain standardized original communication data with a unified format; If the value of the designated field in the standardized original communication data is within a preset valid range, the standardized original communication data is output as target original communication data.

4. The method according to claim 3, It is characterized in that The step of matching the deviation data item with an item in the standard data template to adjust the deviation data item comprises: Calculating the edit distance between the deviation data item and each item in the standard data template; If the edit distance with the lowest value is less than or equal to a preset first threshold, it is determined that the deviation data item matches the item successfully, and the value of the successfully matched item is assigned to the deviation data item; If the edit distance with the lowest value is greater than a preset first threshold, it is determined that the deviation data item fails to match the item, and an unmatched label is marked on the deviation data item that fails to match; The step of performing at least one of renaming fields and converting data types in the original communication data after adjusting the deviation data item to obtain candidate original communication data includes: Obtain a mapping relationship, wherein the mapping relationship includes a field renaming list, a data type conversion list, and a unit conversion list; renaming the fields in the original communication data after adjusting the deviation data items according to the field renaming list; Using the type conversion function in the data type conversion list to convert the data type of the field in the renamed original communication data after adjusting the deviation data item; The performing at least one of splitting, merging and converting the data in the candidate original communication data to obtain standardized original communication data in a unified format includes: Get predefined mapping rules; If the mapping rule is a one-to-many relationship, splitting the candidate original communication data after the data type is converted; If the mapping rule is a many-to-one relationship, merging the candidate original communication data after the data type is converted; The formula defined in the mapping rule is used to perform mathematical operations on the candidate original communication data after being split or merged, and the standardized original communication data with a unified format is obtained by adopting a secure calculation function.

5. The method according to claim 1, It is characterized in that The step of encapsulating the target original communication data into a virtual representation of the original version information includes: Read the predefined unified data version model structure; Creating a dictionary object according to the unified data version model structure, and initializing fields in the dictionary object; Calculating the similarity between the fields in the target original communication data and the fields in the unified data version model structure; If the similarity is greater than or equal to a preset second threshold, filling the fields in the target original communication data into the fields in the dictionary object; Convert the fields in the dictionary object according to predefined field mapping rules; The converted fields in the dictionary object are encapsulated into a specified data exchange format to obtain a virtual representation of the original version information.

6. The method according to any one of claims 1 to 5, It is characterized in that The converting the target communication protocol into a secure communication protocol in a secure dimension according to the virtual representation comprises: Extracting data structure features, field type features, and value range features from the virtual representation to obtain a version feature set; Load the version identification model of decision tree type; Inputting the version feature set into the version identification model for processing and determining the protocol family group to which the power equipment belongs; Acquire a protocol template matching the protocol family; Determining a key field in the original communication data according to a minimum edit distance between a field of the original communication data and a field of the protocol template; Establish a security protocol conversion matrix; Use key fields in the original communication data to perform security policy mapping in the security protocol conversion matrix to obtain a security policy; The target communication protocol is converted into a secure communication protocol according to the security policy.

7. The method according to claim 6, It is characterized in that The converting the target communication protocol into a secure communication protocol in a secure dimension according to the virtual representation further includes: Collecting raw communication data transmitted in a streaming manner from power equipment connected to the power Internet of Things as sample data; Dividing the sample data into data blocks according to fixed length; Converting the data block into a fixed-size input matrix; Training a convolutional neural network as a feature model according to the input matrix; Inputting the original communication data transmitted by the unknown device into the feature model to extract the feature vector; the unknown device is an electric power device with an unknown communication protocol; Clustering the unknown devices using the feature vectors to obtain protocol groups; The decision tree is trained as a version recognition model according to the data structure characteristics, field type characteristics and value range characteristics corresponding to the protocol family group.

8. The method according to any one of claims 1 to 5, It is characterized in that The step of connecting the electric power equipment to the electric power Internet of Things according to the secure communication protocol includes: Optimizing the secure communication protocol in terms of transmission; If the optimization is completed, the security communication protocol is processed according to the device table and the protocol version table in the relational database to obtain security version information; Define standardized interfaces under the plug-in protocol adaptation framework; Obtaining the interface specification of the plug-in protocol adaptation framework according to the standardized interface definition parameters; Load the protocol adapter plug-in that matches the security version information; Calling the protocol adapter plug-in to perform at least one of parsing, converting and encrypting original communication data of the power device to obtain target communication data; The target communication data is transmitted to the electric power Internet of Things according to the interface specification.

9. A computer device, It is characterized in that include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a method for accessing power equipment in a power Internet of Things as described in any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, a method for accessing power equipment in a power Internet of Things as described in any one of claims 1-8 is implemented.

Citation Information

Cited By

  • Data access method and system of intelligent Internet of Things gateway

    CN119420712A

  • Data Access Method and System for Smart Internet of Things Gateway

    CN119420712B

  • Data analysis method, related device and electronic equipment

    CN120785802A

  • Intelligent adaptive docking method and system for power equipment of Internet of Things, and electronic equipment

    CN121173878A

  • An internet of things power equipment intelligent adaptation docking method and system, and an electronic device

    CN121173878B