A Substation Protocol Standardization Conversion Method and System

By establishing a first-order judgment model and multi-threading technology in substations, segmented parsing and parallel conversion of data packets are achieved, solving the problems of real-time performance and accuracy of protocol conversion in substations and improving the efficiency and reliability of substation communication systems.

CN119814892BActive Publication Date: 2025-10-28GUIZHOU POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411728811.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-10-28
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

In substations, the low efficiency of parsing data packets using different protocols and the poor real-time performance of protocol conversion lead to communication delays and affect the system's rapid response capability.

Method used

Protocol identification is achieved by establishing a first judgment model. Combined with multi-threading technology and deep packet inspection, segmented parsing and parallel conversion of data packets are realized. Multi-field parsing tasks and message queues are used to ensure the accuracy and real-time performance of data packets.

Benefits of technology

It improves the accuracy and efficiency of protocol identification, ensures efficient communication between different devices and systems within the substation, adapts to new protocols and protocol changes, and guarantees the stability and reliability of the communication system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814892B_ABST
    Figure CN119814892B_ABST
Patent Text Reader

Abstract

This invention discloses a substation protocol standardization conversion method and system, comprising: acquiring data packets from a target substation and performing a first preprocessing on the data packets; establishing a first judgment model and performing a first judgment on the first preprocessing result based on the first judgment model; and performing a second preprocessing on the first preprocessing result that satisfies the first judgment result to complete the substation protocol standardization conversion. It is applicable not only to the conversion of different types of protocols within a substation, but also to the conversion between old and new protocols of the same type, as well as the conversion between uncertain or non-standard protocols and standard protocols, demonstrating wide applicability and strong practicality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of substation protocol standardization and conversion technology, and in particular to a substation protocol standardization and conversion method and system. Background Art

[0002] Substation protocol standardization refers to the process of unifying and standardizing the communication protocols between various devices and systems within a substation. Its aim is to ensure that equipment from different manufacturers can communicate and interoperate, thereby improving the reliability and efficiency of the substation. A substation protocol standardization conversion device is a device used in substation automation systems. Its main function is to convert between different communication protocols. This device acts as a bridge in the substation, enabling intelligent devices using different communication protocols to communicate and exchange data, thereby improving the integration and efficiency of the substation automation system.

[0003] Because substations contain numerous different types of protocols, including international standard protocols, industry-standard protocols, and equipment manufacturer-defined protocols, these protocols differ significantly in data format, frame structure, communication rules, and semantics. Parsing the entire data packet during data packet parsing and conversion can lead to the mixing of header and checksum information, affecting the parsing process. When data traffic is high, the conversion device may not be fast enough to complete the protocol conversion in time, causing delays and impacting the overall substation system's responsiveness. Therefore, to improve the real-time performance of protocol conversion, we propose a substation protocol standardization conversion device and method. Summary of the Invention

[0004] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.

[0005] In view of the aforementioned existing problems, the present invention is proposed.

[0006] Therefore, the present invention provides a substation protocol standardization conversion method and system that can solve the problems mentioned in the background art.

[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0008] In a first aspect, the present invention provides a substation protocol standardization conversion method, comprising:

[0009] Acquire the data packet of the target substation and perform a first preprocessing on the data packet;

[0010] Establish a first judgment model, and make a first judgment on the first preprocessing result based on the first judgment model;

[0011] The first preprocessing result that meets the first judgment result is subjected to second preprocessing to complete the substation protocol standardization conversion.

[0012] As a preferred embodiment of the substation protocol standardization conversion method of the present invention, the second preprocessing of the first preprocessing result that satisfies the first judgment result includes:

[0013] The first preprocessing results that meet the first judgment result are then subjected to the first stratification.

[0014] Perform the first data transformation on the results after the first layering;

[0015] A second judgment is made on the result of the first data conversion.

[0016] As a preferred embodiment of the substation protocol standardization conversion method of the present invention, the second preprocessing of the first preprocessing result that satisfies the first judgment result further includes:

[0017] The first data conversion result that satisfies the second judgment result is encapsulated in the first encapsulation.

[0018] The first encapsulation result is configured to complete the standardization conversion of the substation protocol.

[0019] As a preferred embodiment of the substation protocol standardization conversion method of the present invention, the step of making a first judgment on the first preprocessing result based on the first judgment model includes:

[0020] The first judgment model is used to make a first judgment based on the first preprocessing result;

[0021] The first determination is used to determine whether the target protocol type identification in the first preprocessing result is correct;

[0022] The first judgment model is any model that can realize the first judgment.

[0023] As a preferred embodiment of the substation protocol standardization conversion method of the present invention, the step of making a first judgment on the first preprocessing result based on the first judgment model further includes:

[0024] The first judgment includes the first segment parsing and the second tail parsing;

[0025] The first judgment model performs a first segmentation analysis on the first preprocessing result;

[0026] The result after parsing the first segment is parsed again to obtain the first preprocessed result that satisfies the first judgment result.

[0027] Secondly, the present invention provides a substation protocol standardization conversion system, comprising:

[0028] The protocol identification module configured with the first preprocessing function;

[0029] The protocol parsing module is configured with the first judgment function;

[0030] A data conversion module configured with the first layer and the first data conversion function;

[0031] The verification encapsulation module is configured with a second judgment function.

[0032] As a preferred embodiment of the substation protocol standardization conversion system described in this invention, the protocol parsing module includes at least:

[0033] The data splitting unit configured with the first segmentation parsing function;

[0034] A data parsing unit configured with a second tail parsing function.

[0035] As a preferred embodiment of the substation protocol standardization conversion system of the present invention, the verification and encapsulation module includes at least:

[0036] A data verification unit configured with a second judgment function;

[0037] The data encapsulation unit configured with the first encapsulation function.

[0038] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.

[0039] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.

[0040] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention proposes a substation protocol standardization conversion method and system, which acquires data packets from a target substation and performs a first preprocessing on the data packets; establishes a first judgment model, and performs a first judgment on the first preprocessing result based on the first judgment model; performs a second preprocessing on the first preprocessing result that satisfies the first judgment result, thus completing the substation protocol standardization conversion. The collected substation data packets are scanned by a protocol identification module, and feature word recognition performs preliminary screening of the data packets. For those data packets that cannot be identified by feature word recognition, deep packet inspection technology is used for in-depth analysis to identify the protocol type. Then, a protocol parsing module is used to split the data packets, establishing a multi-field parsing task. A message queue communication method is used between the field parsing tasks to achieve segmented parsing of the data packets, preventing the mixing of data information during overall data packet parsing. Furthermore, this technical solution, by constructing a complete identification and operational stability monitoring and evaluation system, not only improves the accuracy and efficiency of protocol identification but also provides a basis for continuous system optimization and improvement. With strong support, stable and efficient network communication was ultimately achieved. When converting the parsed data, the data conversion module layers the data packets according to the protocol layer, and further allocates them according to the data block size within each layer. For data of different protocol layers, a multi-threaded approach is used for parallel conversion, and for different data blocks of the same protocol layer, a multi-process approach is used for parallel conversion, improving data conversion efficiency, speeding up the data conversion process, and improving the accuracy and real-time performance of protocol conversion. It is not only suitable for different types of protocol conversion within substations, but also for conversion between old and new protocols of the same type, as well as for conversion between uncertain or non-standard protocols and standard protocols, making it widely applicable and highly practical. Attached Figure Description

[0041] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0042] Figure 1 A flowchart of a substation protocol standardization conversion method and system provided in one embodiment of the present invention;

[0043] Figure 2 An overall system structure diagram of a substation protocol standardization conversion method and system provided in one embodiment of the present invention;

[0044] Figure 3A detailed system structure diagram of a substation protocol standardization conversion method and system provided in one embodiment of the present invention;

[0045] Figure 4 A schematic diagram of the protocol monitoring unit of a substation protocol standardization conversion method and system provided in one embodiment of the present invention;

[0046] Figure 5 A conversion and encapsulation structure diagram of a substation protocol standardization conversion method and system provided in one embodiment of the present invention;

[0047] Figure 6 This is an internal structural diagram of a computer device for a substation protocol standardization conversion method and system provided in one embodiment of the present invention. Detailed Implementation

[0048] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0049] Example 1

[0050] Reference Figures 1-6 This is the first embodiment of the present invention, which provides a substation protocol standardization conversion method and system, including:

[0051] Existing technologies have some problems, such as low packet parsing efficiency and poor real-time performance of protocol conversion.

[0052] This application provides a method that can effectively solve the problems mentioned above. The following will describe in detail how to implement the substation protocol standardization conversion method with reference to several embodiments.

[0053] Figure 1 A flowchart illustrating a substation protocol standardization conversion method and system is provided, including:

[0054] S101, acquire the data packet of the target substation and perform the first preprocessing on the data packet;

[0055] In an optional embodiment, the target substation data packet is a data packet generated during the operation of the substation and includes characteristic words. It may include substation equipment status information, fault alarm information, control commands, etc. The characteristic words are used to identify the type and content of the data packet, enabling the system to more accurately identify and classify the data packet after preprocessing. For example, a data packet containing equipment status information may contain specific characteristic words such as "status," while a data packet containing fault alarm information may contain characteristic words such as "alarm."

[0056] In an optional embodiment, during the preprocessing stage, the system first decodes the data packets from the target substation to extract feature words. Then, based on these feature words, the data packets are classified and processed accordingly. For example, data packets containing equipment status information are sent to the status information processing module, while data packets containing fault alarm information are sent to the fault processing module.

[0057] In an optional embodiment, to improve the real-time performance of protocol conversion, the system of the present invention employs multi-threading technology. Each processing module runs on an independent thread, enabling parallel processing of different types of data packets. This ensures efficient system operation even under heavy data traffic, preventing bottlenecks caused by slow processing of individual modules. For example, the status information processing module and the fault handling module can run concurrently, exchanging data via a thread-safe message queue to ensure timely processing of data packets.

[0058] In one optional embodiment, the first preprocessing method may differ for different types of data packets. For example, when performing the first preprocessing on substation equipment status information data packets, it may include steps such as removing redundant information and verifying the integrity of the data packets. However, for fault alarm information data packets, it may be necessary to extract key alarm information and perform formatting processing.

[0059] In this embodiment of the application, the first preprocessing includes at least the operation of identifying feature words. First, by scanning the feature words in the data packets, some obviously inconsistent protocol types are eliminated. For those data packets that cannot be identified by feature words, deep packet inspection technology is used for in-depth analysis to identify the protocol type.

[0060] It should be noted that acquiring data packets from the target substation and performing initial preprocessing on these packets can effectively reduce the amount of data processed subsequently and improve the processing efficiency of the protocol identification module. Through preliminary screening, data packets that clearly do not belong to the target protocol can be quickly eliminated, thereby reducing further processing of these packets, saving system resources, and accelerating the overall protocol conversion speed.

[0061] S102, Establish a first judgment model, and make a first judgment on the first preprocessing result based on the first judgment model;

[0062] In this embodiment of the application, the first judgment on the first preprocessing result according to the first judgment model includes:

[0063] The first judgment model is used to make a first judgment based on the first preprocessing result;

[0064] The first judgment is used to determine whether the target protocol type identification in the first preprocessing result is correct;

[0065] The first judgment model is any model that can realize the first judgment.

[0066] In an optional embodiment, the first judgment model can be constructed by combining machine learning algorithms after determining the first judgment content. For example, algorithms such as decision trees, support vector machines, and neural networks can be used to train the model, enabling it to accurately identify the protocol type based on the characteristics of data packets. Through training with a large amount of historical data, the model can learn the characteristic patterns of data packets of different protocols and quickly and accurately classify new data packets in practical applications.

[0067] In an alternative embodiment, the first judgment model can also be designed in other ways. For example, it can be based on expert system principles, constructing a rule base containing characteristic rules for various protocols. After the data packets are preprocessed, the system matches the data packets according to the rules in the rule base to identify the protocol type of the data packets. This method is particularly suitable for identifying protocol types that are highly structured and have clearly defined rules.

[0068] In an optional embodiment, a first judgment model can be established by creating multi-field parsing tasks to parse and verify data. Each field parsing task focuses on a specific field in the data packet, such as source address, destination address, port number, protocol type, etc. This approach allows for more detailed analysis of the data packets, thereby improving the accuracy of protocol identification.

[0069] In this embodiment of the application, the construction and training process of the first judgment model can be divided into the following steps:

[0070] First, collect a large number of substation data packet samples, which should cover various protocol types to ensure the generalization ability of the model;

[0071] Then, these samples are preprocessed to extract features that help in protocol identification, such as packet length, values ​​of specific fields, and packet structure.

[0072] Next, select a suitable machine learning algorithm and train the model using the extracted features and corresponding protocol type labels;

[0073] After training, the model's performance is evaluated using methods such as cross-validation to ensure that its recognition accuracy on unknown data meets the requirements.

[0074] Finally, the trained model is deployed to the protocol recognition module for real-time protocol type identification.

[0075] It should be noted that the first judgment model built using machine learning algorithms can significantly improve the accuracy and efficiency of protocol identification. Compared with traditional rule-based identification methods, machine learning models can automatically learn and adapt to changes in data packet characteristics, thus better addressing new or non-standard protocols that may emerge in substations.

[0076] In this embodiment of the application, the first judgment on the first preprocessing result based on the first judgment model further includes:

[0077] The first judgment includes the first segment analysis and the second tail analysis;

[0078] The first judgment model performs a first segmentation analysis on the first preprocessing result;

[0079] The result after parsing the first segment is parsed again to obtain the first preprocessed result that satisfies the first judgment result.

[0080] In an optional embodiment, the first segmentation parsing and the second tail parsing can be implemented using different parsing techniques. For example, the first segmentation parsing can employ a regular expression-based parsing method, which can flexibly match and extract key information from data packets. By defining a series of regular expression rules, precise field segmentation and content extraction can be performed on the data packets. The second tail parsing, on the other hand, can employ a pattern matching-based parsing method, which identifies the end of the data packet using a predefined protocol tail pattern, ensuring the integrity of the data packet.

[0081] In an optional embodiment, the first segment parsing and the second tail parsing can be used in combination to improve the accuracy and robustness of the parsing. For example, key fields of the data packet are first extracted through the first segment parsing, and then the second tail parsing is used to verify the correctness of these fields. If the tail of the data packet is found to be inconsistent with the expected protocol format during the second tail parsing, the system can readjust the rules of the first segment parsing to adapt to the changes in the data packet. This iterative parsing process helps improve the accuracy of protocol identification and reduces the possibility of misjudgment.

[0082] In this embodiment, the implementation of the first segment parsing and the second tail parsing can rely on a high-performance parsing engine. This parsing engine can be a specially designed software module or a functional component integrated into the protocol identification module. The parsing engine needs to have efficient data processing capabilities to support real-time parsing of large-scale data packets. Furthermore, the parsing engine should also have good scalability to adapt to new protocols or protocol changes that may emerge in the future.

[0083] In this embodiment of the application, the steps of first segment parsing and second tail parsing can be further refined into the following operations:

[0084] First, the first preprocessing result is parsed in the first segmentation, and the data packet is divided according to the predefined fields to extract the values ​​of each field;

[0085] Then, the field values ​​obtained from the first segment parsing are parsed again to verify whether these field values ​​conform to the format requirements of the target protocol.

[0086] If the field value passes the validation of the second tail parsing, the first preprocessing result is considered valid and subsequent processing steps can be performed.

[0087] If a field value fails the validation of the second tail parser, the rules for the first segment parser need to be readjusted, or the data packet needs to be analyzed more deeply to determine the correct protocol type.

[0088] It should be noted that combining the first segment parsing and the second tail parsing can effectively improve the accuracy and efficiency of protocol identification. This segmented parsing method can handle not only highly structured protocols but also those with complex structures or varied formats. Furthermore, by continuously optimizing the parsing rules and algorithms, the system's performance can be further improved, enabling it to adapt to constantly changing network environments and protocol standards.

[0089] S103, perform second preprocessing on the first preprocessing result that satisfies the first judgment result, and complete the substation protocol standardization conversion.

[0090] In this embodiment of the application, the second preprocessing of the first preprocessing result that satisfies the first judgment result includes:

[0091] The first preprocessing results that meet the first judgment result are then subjected to the first stratification.

[0092] Perform the first data transformation on the results after the first layering;

[0093] A second judgment is made on the result of the first data conversion.

[0094] In an optional embodiment, the first layering is performed on the first preprocessing result that satisfies the first judgment result. Each layered data needs to undergo a first data transformation, which is a synchronous transformation.

[0095] In an optional embodiment, the first layer and the first data conversion can use different protocol conversion techniques to adapt to the conversion requirements of different protocol layers. For example, for transport layer protocols, the TCP / IP protocol stack can be used for conversion; while for application layer protocols, customized conversion processing may be required based on the semantic rules of the specific protocol. In this way, the accuracy and efficiency of the conversion process can be ensured.

[0096] In the embodiments of this application, those skilled in the art can select the specific means of the first layering and the first data conversion operation according to actual needs, and this application does not impose any restrictions.

[0097] In this embodiment of the application, the second preprocessing of the first preprocessing result that satisfies the first judgment result further includes:

[0098] The first data transformation result that satisfies the second judgment result is encapsulated in the first encapsulation.

[0099] Perform the first configuration on the first encapsulation result to complete the standardization conversion of the substation protocol.

[0100] In an optional embodiment, the second determination is to check whether the format and structure of the converted data are correct. This can be done using various methods, such as regular expression matching or XML Schema validation, to ensure the correctness of the data format. If the data format is incorrect, the system will return an error message and may trigger a re-conversion process.

[0101] In an optional embodiment, the first encapsulation involves encapsulating the converted data according to the requirements of the target protocol, ensuring that the data packets conform to the format of the target protocol. The encapsulation process may include steps such as adding necessary header information, padding the data packets to meet minimum length requirements, and calculating and adding checksums.

[0102] In an optional embodiment, the first configuration involves configuring the encapsulated data packet according to the specific requirements of the target substation. This may include setting specific transmission parameters, adjusting the packet priority, and adding security encryption. After these configurations are completed, the data packet can be sent to the target substation for further processing.

[0103] It should be noted that, through the above steps, the substation protocol standardization conversion method and system provided by this invention can effectively convert data packets from different sources and formats into a unified protocol format, thereby achieving efficient communication between different devices and systems within the substation. Furthermore, the method and system also possess good scalability and adaptability, capable of adapting to new protocols and protocol changes that may emerge in the future, ensuring the long-term stable operation of the substation communication system.

[0104] In summary, the substation protocol standardization conversion method and system of the present invention achieves efficient and accurate protocol identification by establishing a first judgment model, and combined with the first and second preprocessing steps, realizes fast and accurate conversion and encapsulation of data packets, which greatly improves the efficiency and reliability of substation communication.

[0105] Example 2

[0106] This embodiment also provides a substation protocol standardization conversion system, including:

[0107] The protocol identification module configured with the first preprocessing function;

[0108] The protocol parsing module is configured with the first judgment function;

[0109] A data conversion module configured with the first layer and the first data conversion function;

[0110] The verification encapsulation module is configured with a second judgment function.

[0111] In this embodiment of the application, the protocol parsing module includes at least:

[0112] The data splitting unit configured with the first segmentation parsing function;

[0113] A data parsing unit configured with a second tail parsing function.

[0114] In this embodiment of the application, the verification packaging module includes at least:

[0115] A data verification unit configured with a second judgment function;

[0116] The data encapsulation unit configured with the first encapsulation function.

[0117] In an optional embodiment, the protocol parsing module may further include:

[0118] Data feature units configured with feature character recognition function;

[0119] A data depth analysis unit configured with deep packet inspection technology.

[0120] In an optional embodiment, the verification packaging module may further include:

[0121] A data verification unit configured with data verification functionality;

[0122] A data encapsulation unit configured with data encapsulation functionality.

[0123] In an optional embodiment, the data feature unit is used to perform preliminary screening of the collected substation data packets. It quickly identifies the protocol type of the data packets using feature word recognition technology. For data packets that cannot be identified by feature word recognition, the data depth analysis unit uses deep packet inspection technology to perform in-depth analysis to ensure accurate identification of the protocol type.

[0124] In one optional embodiment, the data verification unit is responsible for verifying the data packets to ensure the integrity and accuracy of the data during the conversion process. The data encapsulation unit encapsulates the data according to the converted data format to ensure the security and reliability of the data packets during transmission.

[0125] In summary, through the collaborative work of the above modules, the substation protocol standardization conversion system of the present invention can efficiently and accurately complete the communication protocol conversion between different devices and systems within the substation, thereby improving the integration and efficiency of the entire substation automation system and ensuring the reliability and efficiency of the substation.

[0126] The above-mentioned unit modules can be embedded in the processor of the computer device in hardware form or independent of it, or they can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of the above modules.

[0127] This embodiment also provides a computer device, which may be a terminal, and its internal structure diagram may be as follows. Figure 6 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a substation protocol standardization conversion method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0128] This embodiment also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it performs the following steps:

[0129] Acquire the data packet from the target substation and perform the first preprocessing on the data packet;

[0130] Establish a first judgment model, and make a first judgment on the first preprocessing result based on the first judgment model;

[0131] The first preprocessing result that meets the first judgment result is subjected to second preprocessing to complete the substation protocol standardization conversion.

[0132] Example 3

[0133] In a preferred embodiment, the design is as follows Figure 2-5 The complete system shown implements the method flow of this application, wherein: as Figure 2 As shown, the overall system may include a protocol identification module 100, a protocol parsing module 200, a data conversion module 300, and a verification and encapsulation module 400;

[0134] In this embodiment, the protocol identification module 100 first performs feature word identification on the collected substation data packets, searches for byte sequences that match the feature words in the feature word library, and identifies the corresponding protocol type. If the feature word identification corresponds to multiple protocol types, then deep packet inspection is performed on the data packet. The deep packet inspection technology is used to judge the binary data structure and text data structure of the data packet, identify the corresponding protocol type, and transmit the protocol data packet to the corresponding protocol parsing module 200.

[0135] In this embodiment, the protocol parsing module 200 first splits the data packet into multiple parsing tasks and establishes a multi-field parsing task. A message queue is used to communicate between the field parsing tasks to realize the segmented parsing of the data packet. Based on the information after the header is parsed, the data payload parsing task and the tail verification parsing task are executed. The protocol identification is judged by the result of the tail verification parsing task. If the verification result passes, the integrated parsing result is transmitted to the data conversion module 300. If the verification result fails, the protocol is re-identified.

[0136] In this embodiment of the application, the data conversion module 300 divides the parsed data packets transmitted by the protocol parsing module 200 into layers according to the protocol layer, and further allocates them according to the data block size within each layer. For data from different protocol layers, a multi-threaded approach is used to perform parallel conversion of the data. For different data blocks of the same protocol layer, a multi-process approach is used to perform parallel conversion, and the converted data is transmitted to the verification and encapsulation module 400.

[0137] In this embodiment of the application, the verification and encapsulation module 400 uses the specification of the target protocol as the standard, first merges the conversion results of multiple data block parallel processing units, then verifies the format and structure of the conversion results of each protocol layer parallel processing unit, and encapsulates the converted data according to the frame structure and format requirements of the target protocol.

[0138] In the embodiments of this application, such as Figure 3 As shown, the protocol identification module 100 includes a feature word identification unit 110, a deep packet detection unit 120, and a protocol monitoring unit 130;

[0139] In this embodiment of the application, the feature word recognition unit 110 scans the collected substation data packets byte by byte to find the byte sequence that matches the feature words in the feature word library, quickly filters the data packets, excludes non-compliant protocol types, and transmits the protocols that the feature word recognition cannot determine to the deep packet detection unit 120.

[0140] In this embodiment, the deep packet inspection unit 120 uses deep packet inspection technology to analyze the content of data packets, analyzes the specific content and behavioral characteristics of the protocol, and then identifies the protocol type;

[0141] In this embodiment, the protocol identification module 100 first performs feature word identification on the collected substation data packets, searches for byte sequences that match the feature words in the feature word library, and identifies the corresponding protocol type. If the feature word identification corresponds to multiple protocol types, then deep packet inspection is performed on the data packet. The deep packet inspection technology is used to judge the binary data structure and text data structure of the data packet, identify the corresponding protocol type, and transmit the protocol data packet to the corresponding protocol parsing module 200.

[0142] In the embodiments of this application, such as Figure 4 As shown, the protocol monitoring unit 130 includes a real-time monitoring component for identification data 131, a component for extracting the total number of scanned bytes 132, a component for obtaining the evaluation coefficient of identification operation stability 133, a comparison component 134, and an anomaly determination and alarm component 135.

[0143] In this embodiment of the application, the real-time data monitoring component 131 is used to monitor in real time the recognition response time from the start time of byte scanning to the start time of protocol transmission in each recognition process of the feature character recognition unit 110;

[0144] In this embodiment of the application, the total number of scanned bytes extraction component 132 is used to extract the total number of scanned bytes in each recognition process of the feature word recognition unit 110;

[0145] In this embodiment of the application, the identification operation stability evaluation coefficient acquisition component 133 is used to acquire the identification operation stability evaluation coefficient by utilizing the corresponding identification response time and the total number of scanned bytes in each identification process of the feature word identification unit 110.

[0146] In an optional embodiment, the operational stability evaluation coefficient is obtained using the following formula:

[0147]

[0148] Where H represents the stability evaluation coefficient of the recognition operation; n represents the total number of recognitions by the feature character recognition unit 110; T i T represents the recognition response time for the i-th recognition attempt; i+1 T represents the recognition response time for the (i+1)th recognition attempt; c This represents the preset reference value for recognition response time; L represents the first adjustment coefficient; s represents the second adjustment coefficient; and k represents the third adjustment coefficient.

[0149] In an optional embodiment, the first adjustment coefficient is obtained by the following formula:

[0150]

[0151] Where L represents the first adjustment coefficient; N i N represents the number of bytes corresponding to the i-th recognition; i+1 T represents the number of bytes corresponding to the (i+1)th recognition; i T represents the recognition response time for the i-th recognition attempt; i+1 This represents the recognition response time for the (i+1)th recognition attempt;

[0152] In an optional embodiment, the second adjustment coefficient is obtained by the following formula:

[0153]

[0154] Where s represents the second adjustment coefficient; T c This represents the preset reference value for recognition response time; N c Indicates the preset reference value for the number of bytes; N max T represents the maximum number of bytes completed in a single scan process across n recognition attempts; max This represents the recognition response time corresponding to the maximum number of bytes completed in a single scan process across n recognition attempts.

[0155] In an optional embodiment, the third adjustment coefficient is obtained by the following formula:

[0156]

[0157] Where k represents the third adjustment coefficient; N max T represents the maximum number of bytes completed in a single scan process across n recognition attempts; max This represents the recognition response time corresponding to the maximum number of bytes completed in a single scan process across n recognition attempts; N min T represents the minimum number of bytes required to complete a single scan process in n recognitions; min T represents the recognition response time corresponding to the minimum number of bytes completed in a single scan process across n recognition attempts; c This indicates the preset reference value for recognition response time; T p represents the average recognition response time during n recognition processes; m represents the number of recognition times of feature character recognition unit 110 between the minimum and maximum number of bytes appearing in a single recognition process;

[0158] In this embodiment of the application, the comparison component 134 is used to compare the identified operational stability evaluation coefficient with a preset evaluation coefficient threshold.

[0159] In this embodiment of the application, the anomaly determination and alarm component 135 is used to determine that the recognition process of the feature character recognition unit 110 has an anomaly when the recognition operation stability evaluation coefficient is lower than the preset evaluation coefficient threshold, and to issue an anomaly alarm.

[0160] The technical effects of the above solution are as follows: By monitoring the recognition response time of the feature character recognition unit 110 in real time, i.e., the time interval from the start of byte scanning to the start of protocol transmission, this module can quickly capture any delays or accelerations in the recognition process, providing basic data for subsequent analysis and evaluation. Extracting the total number of scanned bytes in each recognition process helps to understand the relationship between recognition efficiency and data volume, providing a basis for optimizing the recognition algorithm and resource allocation. Using the above mathematical model, a comprehensive evaluation coefficient H is calculated by comprehensively considering multiple dimensions such as recognition response time and total number of scanned bytes. The introduction of this coefficient not only quantifies the stability of the recognition process but also makes the stability assessment more scientific and objective. The introduction of the first adjustment coefficient L, the second adjustment coefficient s, and the third adjustment coefficient k allows the evaluation coefficient to adapt more flexibly to the needs of different recognition scenarios. These coefficients are calculated through complex formulas, fully considering factors such as the number of recognitions, changes in the number of bytes, and response time, ensuring the accuracy and comprehensiveness of the evaluation results. By comparing the calculated recognition operation stability evaluation coefficient with the preset evaluation coefficient threshold, an anomaly judgment and alarm mechanism is immediately triggered once insufficient stability is detected. This instant feedback mechanism can quickly draw the attention of operations and maintenance personnel, facilitating timely action and preventing stability issues from impacting protocol recognition and the overall system operation. Through continuous monitoring and evaluation, operations and maintenance personnel can clearly understand the operating status of the feature character recognition unit 110 under different conditions, thereby enabling them to optimize the recognition algorithm, adjust system configuration, or upgrade hardware devices in a targeted manner to continuously improve the stability and efficiency of protocol recognition. Stable protocol recognition capabilities are crucial for maintaining smooth network communication and ensuring the accuracy of data transmission. The implementation of this technical solution not only enhances system reliability but also increases user trust and satisfaction with the system.

[0161] In summary, this technical solution, by constructing a comprehensive identification and operational stability monitoring and evaluation system, not only improves the accuracy and efficiency of protocol identification, but also provides strong support for the continuous optimization and improvement of the system, ultimately achieving stable and efficient network communication operation.

[0162] In this embodiment of the application, the protocol parsing module 200 includes a data splitting unit 210 and a data parsing unit 220;

[0163] According to the protocol standard document, the data splitting unit 210 locates the header fields, data payload fields, and tail fields of each protocol layer, splits them, and establishes parsing tasks for the corresponding fields;

[0164] The data parsing unit 220 parses the corresponding fields sequentially according to the protocol parsing standard of the protocol, and parses the current field based on the parsing result of the previous field. Finally, it judges whether the protocol recognition is correct based on the verification parsing result of the tail field.

[0165] Protocol standard documents provide unified rules for communication between different devices, systems, and software, specifying in detail the format of protocol data, including the structure of the header, data section, and trailer, as well as the data encoding methods, such as character encoding, binary encoding, and data compression methods.

[0166] To ensure that the parsing information between fields is not mixed when parsing corresponding field tasks, the data parsing unit 220 uses a message queue communication method between field parsing tasks. The previous field parsing task sends the parsed data packet or conversion request as a message to the queue, and other field parsing tasks retrieve messages from the message queue and process them.

[0167] A message queue is an asynchronous communication mechanism for passing messages (data) between different modules. One module encapsulates data into a message and sends it to the message queue, while other modules retrieve the message from the message queue and process it.

[0168] The message queue enables asynchronous communication between field parsing tasks, eliminating the need for the sender and receiver to be running simultaneously. This helps decouple the fields, making the system architecture more flexible. Additionally, it acts as a buffer to control data flow; when data generation exceeds processing speed, the message queue can temporarily store data to prevent loss. Furthermore, it differentiates the parsed data for each field task, preventing the mixing of parsed information between fields and ensuring the accuracy of the parsed data.

[0169] In the embodiments of this application, such as Figure 5 As shown, the data conversion module 300 includes a data layering unit 310 and a data conversion unit 320;

[0170] Data layering unit 310, based on the protocol's layered structure, decomposes the data conversion task into the link layer, network layer, and so on.

[0171] The transport layer and application layer are treated as independent tasks, and the data in the same layer is subdivided according to the size of the data blocks within the same layer.

[0172] The data conversion unit 320 uses a multi-process parallel conversion method to convert data blocks of different sizes at the same layer, and a multi-threaded parallel conversion method to convert data at different protocol layers.

[0173] In order to better identify the boundaries of parallel transformation, the data layering unit 310 identifies the boundaries of parallel transformation based on data dependencies and determines which data layers can be transformed in parallel.

[0174] When the input data of one task directly depends on the output data of another task, there is a direct data dependency relationship. When there is no direct input and output data dependency between two tasks, but they have an indirect dependency relationship through intermediate data or other tasks, there is an indirect dependency relationship. When there is no data connection between two tasks, that is, the execution of one task does not depend on any data of the other task, then they can be executed in parallel.

[0175] Each task is treated as a node. For example, in protocol parsing and conversion, the link layer parsing, network layer parsing, transport layer parsing, application layer parsing, and the conversion tasks of each layer are treated as nodes. Based on the data dependencies between tasks, connections are made between nodes. For example, if task A directly or indirectly depends on the result of task B, then a directed edge is drawn from node B to node A. In this way, a data dependency graph is constructed, which can intuitively show the dependencies between tasks. In the data dependency graph, there may be parallel boundaries between tasks represented by nodes that are not directly or indirectly connected by directed edges. For example, if nodes C and D are not connected, then tasks C and D may be able to be executed in parallel. Based on the data dependencies, the boundaries of parallel conversion are accurately identified, and the data layers that can be converted in parallel are determined, thus speeding up the parsing and conversion of data.

[0176] In an optional embodiment, in order to ensure data consistency and accuracy during parallel conversion, the data conversion unit 320 uses a locking mechanism to ensure data consistency when performing multi-threaded parallel conversion, and uses a communication mechanism to coordinate shared data and ensure data accuracy when performing multi-process data conversion.

[0177] Mutex locks are the most common type of locking mechanism. Their basic principle is that only one thread can acquire the lock at any given time. Once a thread acquires the mutex lock, other threads attempting to acquire it will be blocked until the holding thread releases the lock. Parallel conversion technology refers to using multiple threads, processes, or resources simultaneously to process different parts of the data during the data conversion process, thereby accelerating recovery. It breaks the traditional sequential recovery model, fully utilizing the system's multi-core processors, multi-disk I / O channels, and other hardware resources. It divides the data conversion task into multiple subtasks for parallel execution. By analyzing the structure and content of the backup data, it identifies the parts that can be converted independently. For example, when converting parsed data, the data packets are layered, with each layer assigned a conversion thread. These parallel conversion tasks can be performed simultaneously, independently of each other, yet collaboratively completing the entire data conversion work.

[0178] The verification and encapsulation module 400 includes a data verification unit 410 and a data encapsulation unit 420.

[0179] In an optional embodiment, the data verification unit 410 checks whether the length of the converted data meets the requirements according to the target protocol, then checks whether the order of each field in the converted data is consistent with the target protocol specification, and finally verifies whether the format and content of the header and footer meet the requirements.

[0180] In an optional embodiment, the data encapsulation unit 420 encapsulates the converted data that conforms to the requirements of the target protocol. According to the format requirements of the target protocol header, it fills in each field in sequence. After the header encapsulation is completed, the converted data is placed in the correct position according to the format of the target protocol. Finally, the tail check information is filled into the last part of the data packet to complete the encapsulation of the entire data packet.

[0181] In order to more accurately verify and encapsulate the converted data, the data encapsulation unit 420 calculates the checksum of the entire data packet according to the checksum calculation method specified by the target protocol when encapsulating the tail check information, and adds the checksum information to the tail field. At the receiving end, the tail information will be used to verify the integrity of the data and correctly parse the data packet.

[0182] In an optional embodiment, the checksum is generated by performing mathematical operations on a specific part of the data, such as the entire data packet, data block, etc., to produce a relatively short value (checksum value). This value represents a characteristic of the original data. At the receiving end or when reading data, the same calculation method is used to recalculate the checksum on the received data, and then the new checksum value is compared with the original checksum value.

[0183] In an optional embodiment, a checksum is added to the data during data encapsulation to facilitate verification of whether the converted data conforms to the target protocol standard during substation protocol standardization, thereby improving the accuracy of data conversion.

[0184] Example 4

[0185] Example 3 illustrates the conversion between different types of protocols within a substation. This standardized substation protocol conversion method and system are also applicable to the conversion between old and new protocols of the same type, as detailed below:

[0186] In an optional embodiment, the protocol identification module 100 identifies the type of the old protocol, and the feature word identification unit 110 scans the collected substation data packets byte by byte to find the byte sequence that matches the feature words in the feature word library. The data packets are quickly filtered to eliminate non-compliant protocol types. Protocols that cannot be determined by feature word identification are passed to the deep packet inspection unit 120. The deep packet inspection unit 120 uses deep packet inspection technology to analyze the content of the data packets, analyzes the specific content and behavioral characteristics of the protocol, and then identifies the type of the old protocol.

[0187] In an optional embodiment, the protocol parsing module 200 uses the data splitting unit 210 to locate the header field, data payload field, and trailer field of each protocol layer according to the protocol standard document, and splits the old protocol data packet to establish parsing tasks for the corresponding fields. The data parsing unit 220 parses the parsing tasks for the corresponding fields in turn, and parses the current field based on the parsing result of the previous field. Finally, based on the verification and parsing result of the trailer field, it determines whether the old protocol is correctly identified.

[0188] In an optional embodiment, the data conversion module 300 layers the parsed data packets transmitted by the protocol parsing module 200 according to the protocol layer, and further allocates them according to the data block size within each layer. For data from different protocol layers, a multi-threaded approach is used to perform parallel data conversion, and for different data blocks of the same protocol layer, a multi-process approach is used to perform parallel conversion, thereby improving the data conversion rate.

[0189] The verification and encapsulation module 400 uses the target protocol specification as a standard, first merges the conversion results of multiple data block parallel processing units, then verifies the format and structure of the conversion results of each protocol layer parallel processing unit, and encapsulates the converted data into a new protocol according to the frame structure and format requirements of the target protocol.

[0190] Example 5

[0191] In addition to the above embodiments, this substation protocol standardization conversion method and system are also applicable to the conversion between some uncertain or non-standard protocols and standard protocols, as detailed below:

[0192] In an optional embodiment, when the protocol identification module 100 identifies uncertain or non-standard protocols, the deep packet inspection unit 120 is used to directly identify the data packets transmitted by the uncertain or non-standard protocols. The deep packet inspection technology is used to analyze the content of the data packets, analyze the specific content and behavioral characteristics of the protocol, and then identify the type of the protocol.

[0193] In an optional embodiment, the protocol parsing module 200 uses the data splitting unit 210 to locate the header field, data payload field, and trailer field of each protocol layer according to the protocol standard document, and splits the old protocol data packets to establish parsing tasks for the corresponding fields. The parsing tasks do not include content that does not conform to the protocol standard transmitted by uncertain protocols or non-standard protocols, and only parse data that conforms to the protocol standard. The data parsing unit 220 parses the parsing tasks of the corresponding fields in turn, and parses the current field based on the parsing result of the previous field. Finally, based on the verification and parsing result of the trailer field, it determines whether the old protocol is correctly identified.

[0194] In an optional embodiment, the data conversion module 300 layers the parsed data packets transmitted by the protocol parsing module 200 according to the protocol layer, and further allocates them according to the data block size within each layer. For data from different protocol layers, a multi-threaded approach is used to perform parallel data conversion, and for different data blocks of the same protocol layer, a multi-process approach is used to perform parallel conversion, thereby improving the data conversion rate.

[0195] In an optional embodiment, the verification and encapsulation module 400 uses the target protocol specification as a standard, first merges the conversion results of multiple data block parallel processing units, then verifies the format and structure of the conversion results of each protocol layer parallel processing unit, and encapsulates the converted data into a standard protocol according to the frame structure and format requirements of the target protocol.

[0196] This substation protocol standardization conversion method and system uses a protocol identification module 100 to scan collected substation data packets. Feature word recognition performs initial screening of the data packets. For data packets that cannot be identified through feature word recognition, deep packet inspection technology is used for in-depth analysis to identify the protocol type. Then, a protocol parsing module 200 splits the data packets, establishing multi-field parsing tasks. Message queues are used for communication between these tasks to achieve segmented parsing of the data packets, preventing data mixing that occurs when parsing the entire data packet. Finally, the parsed data is converted using a data conversion process. Module 300 layers data packets according to protocol levels, and further allocates them within each layer based on the data block size. For data from different protocol layers, a multi-threaded approach is used for parallel data conversion. For different data blocks within the same protocol layer, a multi-process approach is used for parallel conversion, improving data conversion efficiency, accelerating the data conversion process, and enhancing the accuracy and real-time performance of protocol conversion. This substation protocol standardization conversion device and method is not only suitable for converting different types of protocols within a substation, but also for converting between old and new protocols of the same type, as well as between uncertain or non-standard protocols and standard protocols. It has a wide range of applications and strong practicality.

[0197] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

[0198] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0199] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0200] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0201] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0202] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0203] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for standardizing and converting substation protocols, characterized in that, include: Acquire the data packet of the target substation and perform a first preprocessing on the data packet; Establish a first judgment model, and make a first judgment on the first preprocessing result based on the first judgment model, including: The first judgment model is used to make a first judgment based on the first preprocessing result; The first determination is used to determine whether the target protocol type identification in the first preprocessing result is correct; The first judgment model is any model that can realize the first judgment; The first judgment includes the first segment parsing and the second tail parsing; The first judgment model performs a first segmentation analysis on the first preprocessing result; The result after parsing the first segment is parsed again to obtain the first preprocessed result that satisfies the first judgment result; The first preprocessing result that satisfies the first judgment result is subjected to a second preprocessing, including: The first preprocessing results that meet the first judgment result are then subjected to the first stratification. The first layer involves the data conversion module layering data packets according to protocol layers during the conversion of parsed data. Perform the first data transformation on the results after the first layering; Perform a second judgment on the result of the first data conversion; The first data conversion result that satisfies the second judgment result is encapsulated in the first encapsulation. The first encapsulation result is configured to complete the standardization conversion of the substation protocol.

2. A substation protocol standardization conversion system, employing the substation protocol standardization conversion method as described in claim 1, characterized in that, include: The protocol identification module configured with the first preprocessing function; The protocol parsing module is configured with the first judgment function; A data conversion module configured with the first layer and the first data conversion function; The verification encapsulation module is configured with a second judgment function.

3. The substation protocol standardization conversion system as described in claim 2, characterized in that, The protocol parsing module includes at least: The data splitting unit configured with the first segmentation parsing function; A data parsing unit configured with a second tail parsing function.

4. The substation protocol standardization conversion system as described in claim 3, characterized in that, The verification and encapsulation module includes at least: A data verification unit configured with a second judgment function; The data encapsulation unit configured with the first encapsulation function.

5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method of claim 1.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method of claim 1.

Citation Information

Patent Citations

  • Base station monitoring analysis method, device and system, electronic equipment and storage medium

    CN113950088A

  • Transformer substation power and environment monitoring alarm processing system and method

    CN115208059A