Internet-of-things terminal method, system and equipment for power industry and medium
By identifying protocol types and loading communication parameters, dynamic protocol adaptation is realized, and combining encryption and two-way authentication, protocol fragmentation and security issues of power IoT terminal devices are solved, resource allocation is optimized, and terminal performance and stability are improved.
Patent Information
- Application Number
- CN202510274627.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-05-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing power IoT terminal equipment faces problems such as fragmentation of protocols, insufficient security protection, waste of resources and node overload, and it is difficult to meet the complex application scenarios of the power industry.
By obtaining the protocol comprehensive characteristics of the original message, using the pre-trained machine learning model to identify the protocol type, and loading preset communication parameters to achieve dynamic protocol adaptation; at the same time, data encryption and two-way authentication are used to ensure security, and resource allocation is optimized through edge computing and load balancing.
It improves protocol identification efficiency, saves system resources, enhances security protection, avoids resource waste and node overload, and improves the performance and stability of power IoT terminals.
Smart Images

Figure CN120050112A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power Internet of Things communication, and particularly to an Internet of Things terminal method, system, device and medium for the power industry. Background Art
[0002] In the context of the current booming development of the power Internet of Things industry, with the rapid growth in the number of terminal devices connected, the special requirements and complex application scenarios in the power industry have imposed stringent demands on the technical performance of terminal devices; these devices not only need to pre-install numerous protocol stacks to enhance the real-time nature of data processing, but also must be equipped with strong security protection measures to ensure the safe and stable operation of the power grid; at the same time, in the face of dynamically changing device connection volumes, how to effectively avoid resource waste or node overload has become one of the key challenges; all of the above problems have revealed the major challenges faced by the current power Internet of Things terminal methods.
[0003] At the present stage, power equipment communication protocols show a fragmented situation, with common protocols such as IEC 61850, Modbus, DL / T645, etc. coexisting; traditional terminals need to pre-install a large number of protocol stacks to support these protocols, which not only occupies a large amount of system resources but also results in a deterioration of data processing real-time performance; in terms of security, existing technologies mostly rely on software encryption, which is easily cracked and lacks hardware-level security protection, making data extremely vulnerable to theft or tampering during transmission, seriously threatening the data security of the power system; in addition, fixed load distribution strategies cannot adapt to the dynamic changes in device connection volumes, often resulting in resource waste or node overload, reducing the overall operating efficiency of the system; moreover, most existing Internet of Things terminals for the power industry only focus on single functions, such as protocol conversion or load balancing, lacking a systematic solution that can integrate hardware security, dynamic protocol adaptation, and adaptation to complex environments. Summary of the Invention
[0004] Embodiments of the present invention provide an Internet of Things terminal method, system, device and medium for the power industry to solve the above technical problems in the prior art.
[0005] To provide a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary part is not a general review, nor is it intended to identify key / important elements or delineate the protection scope of these embodiments. Its sole purpose is to present some concepts in a simple form as a prelude to the subsequent detailed description.
[0006] According to the first aspect of the embodiments of the present invention, an Internet of Things terminal method for the power industry is provided.
[0007] In one embodiment, the Internet of Things terminal method for the power industry includes:
[0008] Obtain the original message, extract the comprehensive protocol features of the original message, and use a pre-trained machine learning model to identify the protocol type. Load the preset communication parameters according to the protocol type;
[0009] According to the protocol type, extract the key data in the original message, and perform standardized encapsulation on the key data in combination with the communication parameters to obtain the transmission data. Use an encryption algorithm to encrypt the data to obtain the encrypted data;
[0010] Perform two-way authentication between the terminal and the cloud through a certificate, and construct a secure communication channel. Transmit the encrypted data to the cloud through the secure communication channel, and use edge computing to process the encrypted data according to priority. Generate a control instruction according to the priority processing result;
[0011] Obtain the resource loading information during the edge computing process in real time, calculate the comprehensive load value according to the resource loading information, optimize the resource allocation using the improved K-means algorithm, and adjust the bandwidth allocation according to the resource loading information.
[0012] In one embodiment, obtaining the original message, extracting the comprehensive protocol features of the original message, and using a pre-trained machine learning model to identify the protocol type, and loading the preset communication parameters according to the protocol type includes:
[0013] Obtain the original message, extract the multi-dimensional features of the original message, and use a feature fusion algorithm to fuse the multi-dimensional features to obtain the comprehensive protocol features;
[0014] Input the comprehensive protocol features into the pre-trained machine learning model to obtain the probability distribution of different protocol types, and obtain the protocol type according to the probability distribution result;
[0015] If the protocol type acquisition fails, perform protocol alarm recognition processing to obtain the degraded protocol type, and update the protocol recognition rule library;
[0016] According to the protocol type, load the preset communication parameters. If the communication fails, adjust the communication parameters in combination with the pre-set communication parameter priority table.
[0017] In one embodiment, if the protocol type acquisition fails, performing protocol alarm recognition processing to obtain the degraded protocol type, and updating the protocol recognition rule library includes:
[0018] If the protocol type acquisition fails, trigger the Simple Network Management Protocol alarm mechanism, start the degraded parsing mode, and adjust the protocol type recognition complexity;
[0019] According to the adjusted protocol type recognition complexity, perform degraded protocol type recognition processing to obtain the degraded protocol type;
[0020] Forward the original message in hexadecimal format to the cloud, use the signature recognition algorithm to record the protocol signature, and update the protocol type recognition rule library in real time in combination with the adjusted protocol type recognition dimension.
[0021] In one embodiment, according to the protocol type, extract the key data in the original message, and perform standardized encapsulation on the key data in combination with the communication parameters to obtain the transmission data, and use the encryption algorithm to encrypt the data to obtain the encrypted data, including:
[0022] According to the protocol type, extract the key data in the original message, and perform standardized processing on the key data according to the unified mapping rule to obtain the standardized data;
[0023] According to the unified data format, encapsulate the standardized data in combination with the communication parameters to obtain the transmission data;
[0024] Use the encryption algorithm to generate a session key, perform block encryption on the transmission data, and add a message authentication check code after the block-encrypted transmission data to obtain the encrypted data;
[0025] If the encryption fails, perform downgraded encryption processing on the transmission data to obtain the downgraded encrypted data. If the downgraded encryption fails, then save the transmission data and use the encryption algorithm again to obtain the encrypted data.
[0026] In one embodiment, perform two-way authentication between the terminal and the cloud through a certificate, build a secure communication channel, transmit the encrypted data to the cloud through the secure communication channel, and use edge computing to process the priority of the encrypted data. Generate control instructions according to the priority processing result, including:
[0027] Perform two-way authentication between the terminal and the cloud through a certificate, build a secure communication channel, and transmit the encrypted data to the cloud through the secure communication channel;
[0028] If the two-way authentication fails, perform log recording and security warning, and enable the pre-shared key to establish an emergency communication channel, and transmit the encrypted data to the cloud through the emergency communication channel;
[0029] Use edge computing to process the priority of the encrypted data, and generate control instructions according to the priority processing result.
[0030] In one embodiment, use edge computing to process the priority of the encrypted data, and generate control instructions according to the priority processing result, including:
[0031] Use edge computing to perform priority detection on the encrypted data to obtain the priority result of the encrypted data;
[0032] According to the priority result of the encrypted data, trigger the edge rule engine, and use the rule engine to perform instruction matching processing on the encrypted data to generate control instructions.
[0033] In one embodiment, real-time obtain the resource loading information during the edge computing process, calculate the comprehensive load value according to the resource loading information, and use the improved K-means algorithm to optimize the resource allocation. Adjusting the bandwidth allocation according to the resource loading information includes:
[0034] Real-time obtain the resource loading information of edge computing, and judge whether the resources are overloaded according to the resource loading information;
[0035] If the resources are overloaded, calculate the comprehensive load value according to the resource loading information, use the improved K-means algorithm to optimize the resource allocation, migrate the encrypted data according to the resource allocation result, and analyze the network status in combination with the resource loading information, and adjust the bandwidth allocation according to the network status;
[0036] The calculation formula of the comprehensive load value is:
[0037] L = 0.5μ 1 + 0.3μ 2 + 0.2μ 3 ;
[0038] In the formula, L represents the comprehensive load value; μ 1 represents the CPU usage rate; μ 2 represents the memory usage rate; μ 3 represents the bandwidth usage rate.
[0039] In one embodiment, using the improved K-means algorithm to optimize the resource allocation includes: based on the improved K-means algorithm, determine the migration amount in combination with the comprehensive load value, and optimize the resource allocation according to the migration amount.
[0040] In one embodiment, analyzing the network status in combination with the resource loading information and adjusting the bandwidth allocation according to the network status includes:
[0041] Analyze the network status according to the bandwidth usage rate of the resource loading information to obtain network status data;
[0042] According to the network status data, adjust the bandwidth allocation, and judge whether the network is congested. If the network is congested, perform protocol layer downgrading processing.
[0043] According to the second aspect of the embodiments of the present invention, a current grounding fault ranging system is provided.
[0044] In one embodiment, the current grounding fault ranging system includes:
[0045] A protocol type determination module, configured to obtain an original message, extract the protocol comprehensive features of the original message, identify the protocol type by using a pre-trained machine learning model, and load preset communication parameters according to the protocol type;
[0046] An encrypted data acquisition module, configured to extract key data in the original message according to the protocol type, perform standardized encapsulation on the key data in combination with the communication parameters to obtain transmission data, and perform data encryption on the transmission data by using an encryption algorithm to obtain encrypted data;
[0047] An edge computing module, configured to perform two-way authentication between the terminal and the cloud through a certificate, construct a secure communication channel, transmit the encrypted data to the cloud through the secure communication channel, perform priority processing on the encrypted data by using edge computing, and generate a control instruction according to the priority processing result;
[0048] A load balancing module, configured to obtain resource loading information during the edge computing process in real time, calculate a comprehensive load value according to the resource loading information, optimize resource allocation by using a K-means improvement algorithm, and adjust bandwidth allocation according to the resource loading information.
[0049] According to the third aspect of the embodiments of the present invention, a computer device is provided.
[0050] In some embodiments, the computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the above method are implemented.
[0051] According to the fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided.
[0052] In one embodiment, a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0053] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0054] By extracting the protocol comprehensive features of the original message, the present invention improves the real-time recognition efficiency of the protocol type, and at the same time avoids pre-installing a large number of protocol stacks, which not only saves a large amount of resources, but also improves the protocol compatibility in the power Internet of Things; and through data encryption, a strong security protection measure is provided to ensure the safe and stable operation of the power grid; and edge computing and load balancing are used to improve resource utilization rate, avoid resource waste or node overload caused by a fixed load allocation strategy, improve the overall operation efficiency, and enable the power IoT terminal to perform protocol adaptation, security control, and resource optimization, thereby improving the performance and stability of the power industry IoT terminal.
[0055] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present invention. Brief Description of the Drawings
[0056] The drawings herein are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention.
[0057] Figure 1 is a schematic flowchart of a method for an Internet of Things terminal for the power industry shown according to an exemplary embodiment;
[0058] Figure 2 is a schematic structural diagram of a system for an Internet of Things terminal for the power industry shown according to an exemplary embodiment;
[0059] Figure 3 is a schematic structural diagram of a computer device shown according to an exemplary embodiment;
[0060] Figure 4 is a flowchart of original message processing and resource allocation in a method for an Internet of Things terminal for the power industry shown according to an exemplary embodiment;
[0061] Figure 5 is a flowchart of protocol type matching in a method for an Internet of Things terminal for the power industry shown according to an exemplary embodiment;
[0062] Figure 6 is a flowchart of protocol type recognition and data encryption in a method for an Internet of Things terminal for the power industry shown according to an exemplary embodiment;
[0063] Figure 7 is a schematic diagram of the coordination of edge computing and load balancing in a method for an Internet of Things terminal for the power industry shown according to an exemplary embodiment;
[0064] Figure 8 is a flowchart of exception alarm processing in a method for an Internet of Things terminal for the power industry shown according to an exemplary embodiment. Detailed Embodiments
[0065] The following description and the accompanying drawings fully disclose specific embodiments herein, enabling those skilled in the art to practice them. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. The scope of the embodiments herein includes the entire scope of the claims and all available equivalents of the claims. In this document, the terms "first", "second", etc. are only used to distinguish one element from another, without requiring or implying any actual relationship or order between these elements. In fact, the first element can also be called the second element, and vice versa. Moreover, the terms "comprising", "including" or any other variants thereof are intended to cover non-exclusive inclusion, such that a structure, device or equipment comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such structure, device or equipment. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the structure, device or equipment comprising the said element. The various embodiments herein are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other.
[0066] In this document, the orientation or positional relationships indicated by terms such as "longitudinal", "transverse", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. are based on the orientation or positional relationships shown in the drawings. They are only for the convenience of describing this document and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation of the present invention. In the description herein, unless otherwise specified and limited, the terms "mounted", "connected", "coupled" shall be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the communication inside two elements. It can be directly connected or indirectly connected through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms can be understood according to specific circumstances.
[0067] In this document, unless otherwise stated, the term "plurality" means two or more.
[0068] In this document, the character " / " indicates that the objects before and after are in an "or" relationship. For example, A / B means: A or B.
[0069] In this document, the term "and / or" is a description of the associative relationship of an object, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B these three relationships.
[0070] It should be understood that although the steps in the flowchart are shown sequentially according to the indication of the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless there is a clear description in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the figure may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0071] Each module in the device or system of the present application can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0072] Without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0073] Figure 1 An embodiment of an Internet of Things terminal method for the power industry according to the present invention is shown.
[0074] In this alternative embodiment, the Internet of Things terminal method for the power industry includes:
[0075] Step S101: Obtain the original message, extract the protocol comprehensive features of the original message, and use a pre-trained machine learning model to identify the protocol type, and load the preset communication parameters according to the protocol type;
[0076] Step S102: Extract the key data in the original message according to the protocol type, and perform standardization encapsulation on the key data in combination with the communication parameters to obtain the transmission data, and perform data encryption using an encryption algorithm to obtain the encrypted data;
[0077] Step S103: Perform two-way authentication between the terminal and the cloud through a certificate, and build a secure communication channel, transmit the encrypted data to the cloud through the secure communication channel, perform priority processing on the encrypted data using edge computing, and generate a control instruction according to the priority processing result;
[0078] Step S104: Real-time obtain the resource loading information during the edge computing process, calculate the comprehensive load value according to the resource loading information, optimize the resource allocation using the improved K-means algorithm, and adjust the bandwidth allocation according to the resource loading information.
[0079] In this alternative embodiment, obtain the original message, extract the comprehensive protocol features of the original message, and use a pre-trained machine learning model to identify the protocol type. Loading the preset communication parameters according to the protocol type includes:
[0080] Obtain the original message, extract the multi-dimensional features of the original message, and use a feature fusion algorithm to perform feature fusion on the multi-dimensional features to obtain the comprehensive protocol features;
[0081] Input the comprehensive protocol features into the pre-trained machine learning model to obtain the probability distribution of different protocol types, and obtain the protocol type according to the probability distribution result;
[0082] If the protocol type acquisition fails, perform protocol alarm recognition processing to obtain the degraded protocol type, and update the protocol recognition rule library;
[0083] According to the protocol type, load the preset communication parameters. If the communication fails, adjust the communication parameters in combination with the pre-set communication parameter priority table.
[0084] In this alternative embodiment, if the protocol type acquisition fails, perform protocol alarm recognition processing to obtain the degraded protocol type, and updating the protocol recognition rule library includes:
[0085] If the protocol type acquisition fails, trigger the Simple Network Management Protocol alarm mechanism, start the degraded parsing mode, and adjust the protocol type recognition complexity;
[0086] According to the adjusted protocol type recognition complexity, perform degraded protocol type recognition processing to obtain the degraded protocol type;
[0087] Forward the original message to the cloud in hexadecimal form, use the feature code recognition algorithm to record the protocol feature code, and update the protocol type recognition rule library in real time in combination with the adjusted protocol type recognition dimension.
[0088] In this alternative embodiment, according to the protocol type, extract the key data in the original message, and perform standardized encapsulation on the key data in combination with the communication parameters to obtain the transmission data, and perform data encryption using the encryption algorithm to obtain the encrypted data includes:
[0089] According to the protocol type, extract the key data in the original message, and perform standardized processing on the key data according to the unified mapping rule to obtain the standardized data;
[0090] According to the unified data format, encapsulate the standardized data in combination with the communication parameters to obtain the transmission data;
[0091] Use the encryption algorithm to generate a session key, perform block encryption on the transmission data, and add a message authentication check code after the block-encrypted transmission data to obtain the encrypted data;
[0092] If the encryption fails, perform downgraded encryption on the transmitted data to obtain downgraded encrypted data. If the downgraded encryption fails, then store the transmitted data and obtain encrypted data again using the encryption algorithm.
[0093] In this alternative embodiment, perform two-way authentication between the terminal and the cloud through a certificate, and construct a secure communication channel. Transmit the encrypted data to the cloud through the secure communication channel, and use edge computing to process the priorities of the encrypted data. The control instructions generated according to the priority processing results include:
[0094] Perform two-way authentication between the terminal and the cloud through a certificate, and construct a secure communication channel. Transmit the encrypted data to the cloud through the secure communication channel;
[0095] If the two-way authentication fails, record the log and issue a security warning, and enable the pre-shared key to establish an emergency communication channel. Transmit the encrypted data to the cloud through the emergency communication channel;
[0096] Use edge computing to process the priorities of the encrypted data, and generate control instructions according to the priority processing results.
[0097] In this alternative embodiment, use edge computing to process the priorities of the encrypted data. The control instructions generated according to the priority processing results include:
[0098] Use edge computing to perform priority detection on the encrypted data to obtain the priority result of the encrypted data;
[0099] According to the priority result of the encrypted data, trigger the edge rule engine, and use the rule engine to perform instruction matching processing on the encrypted data to generate control instructions.
[0100] In this alternative embodiment, obtain the resource loading information during the edge computing process in real time, calculate the comprehensive load value according to the resource loading information, and use the improved K-means algorithm to optimize the resource allocation. Adjust the bandwidth allocation according to the resource loading information, including:
[0101] Obtain the resource loading information of the edge computing in real time, and determine whether the resources are overloaded according to the resource loading information;
[0102] If the resources are overloaded, calculate the comprehensive load value according to the resource loading information, use the improved K-means algorithm to optimize the resource allocation, migrate the encrypted data according to the resource allocation result, and analyze the network status in combination with the resource loading information, and adjust the bandwidth allocation according to the network status.
[0103] In this alternative embodiment, the resource loading information includes: CPU usage rate, memory usage rate, and bandwidth usage rate.
[0104] In this alternative embodiment, the calculation formula for the comprehensive load value is:
[0105] L = 0.5μ 1 + 0.3μ 2 + 0.2μ 3 ;
[0106] In the formula, L represents the comprehensive load value; μ 1 represents the CPU usage rate; μ 2 represents the memory usage rate; μ 3 represents the bandwidth usage rate.
[0107] In this alternative embodiment, optimizing resource allocation using the K - means improved algorithm includes: Based on the K - means improved algorithm, determining the migration amount in combination with the comprehensive load value, and optimizing resource allocation according to the migration amount.
[0108] In this alternative embodiment, analyzing the network status in combination with resource loading information and adjusting bandwidth allocation includes:
[0109] Analyzing the network status based on the bandwidth usage rate of the resource loading information to obtain network status data;
[0110] According to the network status data, adjusting the bandwidth allocation, and determining whether the network is congested. If the network is congested, perform protocol - layer degradation processing.
[0111] Figure 2 Fig. shows an embodiment of an IoT terminal system for the power industry according to the present invention.
[0112] In this alternative embodiment, the IoT terminal system for the power industry includes:
[0113] A protocol type determination module 201, configured to obtain an original message, extract the protocol comprehensive features of the original message, and use a pre - trained machine learning model to identify the protocol type, and load preset communication parameters according to the protocol type;
[0114] An encrypted data acquisition module 202, configured to extract key data from the original message according to the protocol type, and perform standardized encapsulation on the key data in combination with the communication parameters to obtain transmission data, and perform data encryption using an encryption algorithm to obtain encrypted data;
[0115] An edge computing module 203, configured to perform two - way authentication between the terminal and the cloud through a certificate, construct a secure communication channel, transmit the encrypted data to the cloud through the secure communication channel, perform priority processing on the encrypted data using edge computing, and generate a control instruction according to the priority processing result;
[0116] The load balancing module 204 is used to obtain the resource loading information in the edge computing process in real time, calculate the comprehensive load value according to the resource loading information, optimize the resource allocation by using the improved K-means algorithm, and adjust the bandwidth allocation according to the resource loading information.
[0117] It should be added that the multi-dimensional features of the original message include message header information, message length, message timing features, message content statistical features, and context information.
[0118] The message header information is to extract the fixed fields of the original message (such as the function code of Modbus, the identifier of IEC 61850, etc.); and use the message header information as the basic feature.
[0119] The message length is the message length of the protocol type. The message lengths of different protocol types are different and usually have a specific range. Therefore, the message length is extracted as one of the features.
[0120] The message timing features are to analyze the timing information such as the sending frequency and interval time of the message. Some protocols have specific timing patterns.
[0121] The message content statistical features are to perform statistical analysis on the message content and extract statistical features such as byte distribution and entropy value.
[0122] The context information is to combine the context information such as device type, communication port, and historical communication records to assist in protocol identification.
[0123] It should be added that the extracted multi-dimensional features are fused through a feature fusion algorithm to improve the accuracy of protocol identification; the specific steps are as follows:
[0124] First, feature vector construction, that is, constructing the extracted multi-dimensional features into a feature vector, with each feature corresponding to a dimension of the vector; second, feature weight assignment, that is, dynamically assigning weights according to the contribution of different features to protocol identification; for example, the weight of the message header information is relatively high, while the weight of the timing feature is relatively low; third, the feature fusion algorithm, that is, using a feature fusion algorithm based on machine learning (optional deep learning model, principal component analysis (PCA), weighted average) to fuse the feature vector to generate a comprehensive feature vector, that is, the protocol comprehensive feature; fourth, the generated comprehensive feature vector is used as the input of the pre-trained machine learning model. The pre-trained machine learning model will output the probability distribution of the original message belonging to different protocol types according to the content of the feature vector, and select the protocol type with the highest probability as the recognition result to obtain the protocol type.
[0125] Such as Figure 5As shown, match the obtained protocol type with relevant protocols, collect the device - side feature codes, encrypt and transmit the feature codes to the rule engine for protocol type recognition in the cloud, and check whether local feature matching is required. If the local features do not match, update the relevant version of the protocol type and perform incremental learning to add new protocol types, and conduct protocol alarms and protocol type recognition rule library management.
[0126] It should be noted that protocol alarm recognition processing includes immediately triggering the SNMP alarm mechanism, simultaneously starting the degraded parsing mode, adjusting the protocol type recognition complexity, simplifying the protocol matching logic, that is, preferentially parsing key fields, skipping complex verification processes or partial parsing, etc., to ensure that the protocol recognition function can still operate; at the same time, the original data with parsing failures will be forwarded to the cloud in hexadecimal form. After the cloud obtains the data, it will identify and record the protocol feature codes by virtue of the feature code recognition algorithm, and update the protocol type recognition rule library in real - time in combination with the adjusted protocol type recognition dimension to ensure the continuous evolution of the recognition ability for various protocols.
[0127] It should be noted that the protocol type recognition rule library contains protocol feature codes, parameter priority tables, and adjustment contents of protocol type recognition complexity.
[0128] It should be noted that communication parameters include key parameters such as baud rate and parity mode.
[0129] It should be noted that the pre - set communication parameter priority table is a priority table verified through a large number of tests. Through the priority table, it is possible to switch to a sub - optimal parameter combination to ensure the stable and reliable communication link to the greatest extent and maintain the coherence of data transmission.
[0130] It should be noted that standardize and encapsulate key data in combination with communication parameters. For example, extract the register address and register value in the Modbus protocol, extract the object reference and attribute value in the IEC 61850 protocol; after extraction, convert the extracted fields into a unified data type, such as string or integer, etc.; and map the fields of different protocols to a unified JSON format. Taking the Modbus protocol as an example, assuming that the voltage data is stored in register address 0x0001, it will be mapped to "voltage", where the mapping rules can be managed and updated through a configuration file. After mapping, it will be encapsulated in a unified JSON format, such as {"device":"ID","data":{"voltage":220}}; this standardized data format greatly improves the convenience of data transfer within the system and interaction with external systems.
[0131] It should be noted that the encryption algorithm is used to generate session keys and encrypt the transmitted data in blocks. Specifically, the SM4 session key is generated through the powerful encryption computing capability in the hardware security module (HSM), the transmitted data is efficiently encrypted in blocks, and a message authentication (MAC) check code is attached to each block of data to fully protect the integrity and security of the data.
[0132] It should be noted that if the encryption fails due to abnormal situations such as HSM unresponsiveness, the software downgrade encryption strategy will be quickly initiated, that is, the AES-128 algorithm will be used for alternative encryption, and the maximum number of retries is set to 3 times; if the downgrade encryption fails, the transmitted data will be properly transferred to the local encryption queue and wait for the HSM to return to normal before being reprocessed to ensure that the data will not be lost and is always in an encrypted and protected state.
[0133] It should be noted that two-way authentication between the terminal and the cloud is carried out through certificates, that is, a strict two-way authentication process is completed between the terminal and the cloud with the help of X.509 certificates to ensure the authenticity and legitimacy of the identities of both communicating parties; a secure communication channel TLS secure channel is built to transmit encrypted data to edge computing.
[0134] It should be noted that if two-way authentication fails, that is, the certificate becomes invalid, the pre-shared key (PSK) will be automatically enabled to establish an emergency communication channel, and the bandwidth limit will be adjusted to 50% of the normal bandwidth. While ensuring basic communication needs, the overall security and stability of the system are maintained. At the same time, detailed log records will be made for authentication failures, and security alarms will be triggered in time so that operation and maintenance personnel can respond quickly.
[0135] It should be noted that when edge computing detects high-priority data, such as fault alarm data, it will immediately trigger the edge rule engine. The rule engine processes the data according to preset rules and logic. For example, if the voltage value exceeds the preset threshold, it will trigger the "cut off power" command; that is, after matching the corresponding rules, the corresponding control instructions are generated and fed back to the device in real time, realizing rapid response and precise control of the equipment.
[0136] It should be noted that if edge computing resources are detected to be overloaded during operation, that is, the CPU utilization rate exceeds 90%, low-priority data will be discarded decisively based on the pre-set data priority strategy, and the load balancing task migration process will be quickly triggered to ensure the efficient execution of high-priority tasks.
[0137] It should be noted that edge computing will set up a data cache queue specifically for caching non-real-time data, with the maximum cache capacity set at 10,000 entries; when there is a risk of queue overflow, 50% of the earliest stored data will be strictly eliminated in chronological order of timestamps, and the overflow events will be detailedly recorded to provide detailed data basis for subsequent performance optimization.
[0138] It should be noted that triggering the load balancing task migration process means obtaining the resource loading information during the edge computing process in real time, calculating the comprehensive load value based on the resource loading information, optimizing the resource allocation using the improved K-means algorithm, and adjusting the bandwidth allocation according to the resource loading information.
[0139] It should be noted that the comprehensive load value is calculated through key parameters such as CPU usage rate, memory occupancy rate, and network load rate, and the node load status table is reported periodically for data migration, that is, task migration is carried out.
[0140] It should be noted that the improved K-means (K-means++) algorithm is used to optimize the resource allocation, and the encrypted data is migrated according to the resource allocation result, that is, the task migration decision is made based on the K-means++ algorithm. Through a large number of simulation tests and actual applications, the migration threshold is accurately quantified; once the node receiving the encrypted data becomes unresponsive, it will be immediately marked as a down node and removed from the cluster, and at the same time, the encrypted data will be quickly allocated to the backup node to ensure the continuity and stability of the entire task execution.
[0141] It should be noted that adjusting the bandwidth allocation includes: restricting the bandwidth ratio of control instructions to less than 70% to ensure the real-time transmission of key instructions; restricting the bandwidth ratio of monitoring data to less than 30% to reduce the transmission of non-critical data; if the packet loss rate is found to be greater than 5% through real-time network monitoring, it is determined that network congestion occurs, and the protocol layer degradation operation will be quickly triggered, such as automatically closing non-critical protocols to give priority to ensuring the transmission quality and efficiency of key data.
[0142] It should be noted that the HSM security circuit suppresses signal reflection by connecting a 22Ω resistor in series to the I2C bus and is independently powered to avoid power interference; the key storage area is physically isolated, and illegal access triggers chip self-destruction.
[0143] It should be noted that the trigger is a watchdog circuit. Specifically, the main control unit sends a watchdog pulse every second, and a reset is triggered after 1.6 seconds of timeout; the reset signal is filtered by an RC circuit (10kΩ + 0.1μF) to avoid false triggering.
[0144] Such as Figure 8As shown, if the watchdog times out without reset, the hardware forces a reset. The Bootloader performs signature verification, then kernel and driver integrity verification, and finally task recovery and retransmission.
[0145] Among them, the main control unit is connected to the HSM through the I2C bus; the multi-channel isolated serial port realizes electrical isolation through an optocoupler; the power supply supports a wide voltage input of 9 - 36V and overvoltage protection. Among them, the HSM is independent of the main control unit and manages the key life cycle through a physically isolated bus.
[0146] It should be added that the power supply fault tolerance design is that the input - stage TVS tube suppresses surges below 36V, and the self - resetting fuse limits the current to 500mA; the output - stage LC filter (10μH + 100μF), and the ripple < 50mV.
[0147] It should be added that the protocol compatibility improvement is to support dynamic conversion of more than 12 power protocols, and the success rate of unknown protocol processing ≥ 95%; the security level enhancement is that hardware encryption enables the data transmission anti - attack ability to reach the fourth level of equal protection, and the risk of key leakage is reduced by 90%; the resource utilization optimization is that the load - balancing algorithm improves the cluster resource utilization rate from 60% to 88%, and the response delay < 100ms; the complex environment adaptation is to work at a wide temperature range of - 40°C to 85°C, with a wide voltage input of 9 - 36V, and pass the IEC61000 - 4 - 5 surge test.
[0148] For example, when the device is accessed, the system receives the Modbus message. The protocol recognition module parses the message, identifies the function code 0x03 as a read register request, and sets the initial communication parameters to 9600bps, even parity. If the communication fails three times in a row, the parameter adaptation module switches to 115200bps according to the priority table; parses the register data and converts it into JSON format, calls the HSM to generate an SM4 session key to encrypt the data, and after attaching the MAC check code, transmits it to the edge computing through the TLS secure channel; the edge node calculates the comprehensive load value by monitoring the resource loading information; when L reaches 80%, triggers the K - means++ algorithm, selects low - load nodes to migrate 50% of non - real - time tasks to the cloud; and limits the monitoring data bandwidth to 30Mbps, giving priority to ensuring the transmission bandwidth of control instructions.
[0149] It should be noted that the comprehensive load value represents the overall load situation of the node. When L ≤ 80%, the node is in the low-load range, and at this time, the node load is controllable and no migration is required. When 80% < L ≤ 100%, the node is in the high-load range. At this time, the amount of tasks to be migrated increases linearly with the increase of the load, gradually increasing from 1% to 100%. A reasonable migration task will ensure the balance of the load while retaining the processing capacity of the node. When L > 100%, the node is in the extremely high-load range. At this time, all tasks need to be migrated to completely release the node and avoid node collapse.
[0150] Among them, when 80% < L ≤ 100%, the calculation formula for the migration amount is:
[0151]
[0152] In the formula, N represents the migration amount.
[0153] The communication interface test includes testing the RS485 interface under an electromagnetic interference environment. By simulating the electromagnetic interference signals in the actual power environment, it is verified that the interface can maintain stable communication under the interference environment, and the bit error rate is controlled at an extremely low level.
[0154] The security verification includes encrypting the data using HSM, and decrypting the encrypted data at the receiving end. After multiple tests, the decrypted data is exactly the same as the original data, and the MAC verification pass rate reaches 100%, proving the reliability of the hardware encryption.
[0155] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 3 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store static information and dynamic information data. The network interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it realizes the steps in the above method embodiments.
[0156] Those skilled in the art can understand that Figure 3 the structure shown in
[0157] In addition, the present invention also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0158] In addition, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0159] Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium, and when the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided by the present invention can include at least one of non-volatile and volatile memories. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. The volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0160] The present invention is not limited to the structures that have been described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. A method for IoT terminals in the power industry, characterized in that: The IoT terminal method for the power industry includes: Obtain the original message, extract the comprehensive protocol features of the original message, and use the pre-trained machine learning model to identify the protocol type, and load the preset communication parameters according to the protocol type; According to the protocol type, the key data in the original message is extracted, and the key data is standardized and encapsulated in combination with the communication parameters to obtain the transmission data, and the data is encrypted using the encryption algorithm to obtain the encrypted data; Use certificates to perform two-way authentication between the terminal and the cloud, build a secure communication channel, transmit encrypted data to the cloud through the secure communication channel, use edge computing to prioritize the encrypted data, and generate control instructions based on the priority processing results; Obtain resource loading information in the edge computing process in real time, calculate the comprehensive load value based on the resource loading information, use the K-means improved algorithm to optimize resource allocation, and adjust bandwidth allocation based on resource loading information.
2. The method for Internet of Things terminals for the power industry according to claim 1 is characterized in that: The obtaining of the original message, extracting the comprehensive protocol features of the original message, identifying the protocol type using a pre-trained machine learning model, and loading preset communication parameters according to the protocol type include: Obtain the original message, extract the multi-dimensional features of the original message, and use the feature fusion algorithm to fuse the multi-dimensional features to obtain the comprehensive features of the protocol; Input the comprehensive features of the protocol into the pre-trained machine learning model to obtain the probability distribution of different protocol types, and obtain the protocol type based on the probability distribution results; If the protocol type acquisition fails, perform protocol alarm identification processing, obtain the downgraded protocol type, and update the protocol identification rule base; According to the protocol type, the preset communication parameters are loaded. If the communication fails, the communication parameters are adjusted in combination with the preset communication parameter priority table.
3. The method for Internet of Things terminals for the power industry according to claim 2 is characterized in that: If the protocol type acquisition fails, performing protocol alarm identification processing, obtaining the downgraded protocol type, and updating the protocol identification rule base include: If the protocol type acquisition fails, the SNMP alarm mechanism is triggered, and the downgrade parsing mode is started to adjust the complexity of protocol type identification; According to the adjusted protocol type identification complexity, a downgraded protocol type identification process is performed to obtain a downgraded protocol type; The original message is forwarded to the cloud in hexadecimal form, and the protocol signature code is recorded using the signature code recognition algorithm. The protocol type recognition rule base is updated in real time based on the adjusted protocol type recognition dimension.
4. The method for Internet of Things terminals for the power industry according to claim 1 is characterized in that: The key data in the original message is extracted according to the protocol type, and the key data is standardized and encapsulated in combination with the communication parameters to obtain the transmission data, and the data is encrypted using the encryption algorithm to obtain the encrypted data including: According to the protocol type, the key data in the original message is extracted, and the key data is standardized according to the unified mapping rules to obtain standardized data; According to the unified data format, the standardized data is encapsulated in combination with the communication parameters to obtain the transmission data; Generate a session key using an encryption algorithm, encrypt the transmission data in blocks, and add a message authentication check code after the block-encrypted transmission data to obtain encrypted data; If the encryption fails, the transmission data is downgraded to obtain downgraded encrypted data. If the downgrade encryption fails, the transmission data is transferred and the encryption algorithm is used again to obtain encrypted data.
5. The method for Internet of Things terminals for the power industry according to claim 1 is characterized in that: The two-way authentication between the terminal and the cloud is performed through the certificate, and a secure communication channel is established, the encrypted data is transmitted to the cloud through the secure communication channel, the encrypted data is prioritized by edge computing, and the control instructions are generated according to the priority processing results, including: Use certificates to perform two-way authentication between the terminal and the cloud, build a secure communication channel, and transmit encrypted data to the cloud through the secure communication channel; If two-way authentication fails, log records and security alerts are issued, and the pre-shared key is enabled to establish an emergency communication channel, and the encrypted data is transmitted to the cloud through the emergency communication channel; Edge computing is used to prioritize encrypted data and generate control instructions based on the priority processing results.
6. The method for Internet of Things terminals for the power industry according to claim 5 is characterized in that: The using edge computing to perform priority processing on the encrypted data and generating control instructions according to the priority processing result includes: Use edge computing to perform priority detection on encrypted data and obtain the priority result of encrypted data; According to the priority result of the encrypted data, the edge rule engine is triggered, and the rule engine is used to perform instruction matching processing on the encrypted data to generate control instructions.
7. The method for Internet of Things terminals for the power industry according to claim 1 is characterized in that: The real-time acquisition of resource loading information in the edge computing process, calculation of the comprehensive load value according to the resource loading information, and optimization of resource allocation using the K-means improved algorithm, and adjustment of bandwidth allocation according to the resource loading information include: Obtain resource loading information of edge computing in real time, and determine whether resources are overloaded based on the resource loading information; If resources are overloaded, the comprehensive load value is calculated based on the resource loading information, and the K-means improved algorithm is used to optimize resource allocation. The encrypted data is migrated according to the resource allocation results, and the network status is analyzed in combination with the resource loading information, and the bandwidth allocation is adjusted according to the network status; The calculation formula of the comprehensive load value is: L = 0.5μ1 + 0.3μ2 + 0.2μ3; Where L represents the comprehensive load value; μ1 represents the CPU utilization rate; μ2 represents the memory utilization rate; and μ3 represents the bandwidth utilization rate.
8. The method for Internet of Things terminals for the power industry according to claim 7, characterized in that: The method of optimizing resource allocation by using the K-means improved algorithm includes: determining the migration amount based on the K-means improved algorithm in combination with the comprehensive load value, and optimizing resource allocation according to the migration amount.
9. The method for Internet of Things terminals for the electric power industry according to claim 7, characterized in that: Analyzing the network status in combination with the resource loading information and adjusting the bandwidth allocation according to the network status includes: Analyze the network status according to the bandwidth usage of resource loading information to obtain network status data; Adjust bandwidth allocation based on network status data and determine whether the network is congested. If the network is congested, perform protocol layer downgrade processing.
10. An Internet of Things terminal system for the power industry, characterized in that: The IoT terminal system for the power industry includes: The protocol type determination module is used to obtain the original message, extract the comprehensive protocol features of the original message, identify the protocol type using a pre-trained machine learning model, and load preset communication parameters according to the protocol type; The encrypted data acquisition module is used to extract the key data in the original message according to the protocol type, and standardize the key data in combination with the communication parameters to obtain the transmission data, and encrypt the data using the encryption algorithm to obtain the encrypted data; The edge computing module is used to perform two-way authentication between the terminal and the cloud through certificates, build a secure communication channel, transmit the encrypted data to the cloud through the secure communication channel, use edge computing to prioritize the encrypted data, and generate control instructions based on the priority processing results; The load balancing module is used to obtain resource loading information in the edge computing process in real time, calculate the comprehensive load value based on the resource loading information, optimize resource allocation using the K-means improved algorithm, and adjust bandwidth allocation based on the resource loading information.
Citation Information
Patent Citations
Network traffic protocol identification method and device based on machine learning
CN112367215A
Rapid access method for protocol adaptation of Internet of Things equipment
CN117834454A
Industrial control equipment identification method and device based on knowledge graph
CN118779764A
Data access method and system of intelligent Internet of Things gateway
CN119420712A
Edge computing load balancing method of power distribution network
CN119537033A