NLP-based intelligent communication protocol node parameter transmission and configuration method

By using an NLP-based intelligent communication protocol node parameter transmission method and employing natural language processing technology and hidden Markov models for text parsing, the problem of reliance on professional skills in traditional tools is solved, enabling efficient and accurate configuration of power automation systems.

CN121859844APending Publication Date: 2026-04-14GUODIAN NANJING AUTOMATION
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Traditional communication protocol configuration tools require highly skilled personnel, are inefficient and error-prone in the configuration process, lack structured semantic parsing capabilities, and fail to inherit dynamic parameters, making it difficult to implement power automation systems.

Method used

A node parameter passing method based on NLP is adopted. Unstructured text is parsed using natural language processing technology. Multi-granularity word segmentation is performed by combining hidden Markov models and Viterbi dynamic programming algorithm to construct a modular parameter system and realize intelligent configuration scheme generation.

Benefits of technology

It improves the configuration efficiency and accuracy of power automation systems, reduces reliance on personnel's professional skills, supports automated parsing of multi-format documents and standardized data interfaces, and is suitable for parsing and dynamically adapting unstructured instructions in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121859844A_ABST
    Figure CN121859844A_ABST
Patent Text Reader

Abstract

The invention provides an NLP-based intelligent communication protocol node parameter transmission and configuration method, and relates to the crossing field of industrial automation and natural language processing, and the method comprises the following steps: obtaining a multi-modal document input by a user, and carrying out document conversion processing on the multi-modal document by using a natural language processing technology to obtain a natural language text; performing multi-granularity word segmentation processing on the natural language text by utilizing a hidden Markov model and a Viterbi dynamic programming algorithm to obtain a word set; constructing a multi-dimensional keyword comparison table based on the modular parameter system, and analyzing the word set; based on a self-adaptive configuration method, converting the analysis processing result into an executable configuration scheme; and performing visual correction on the executable configuration scheme by utilizing a correction mechanism of program recommendation and manual approval to obtain a final configuration file. According to the invention, the engineering configuration efficiency is improved, and the manual dependence is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the intersection of industrial automation and natural language processing, and more specifically, to a method for transmitting and configuring node parameters in an intelligent communication protocol based on NLP. Background Technology

[0002] Power systems widely adopt communication protocols such as IEC 60870-5-104 and Modbus, serving scenarios such as substation automation, distribution network monitoring, and grid connection of new energy power plants. For example: Master-substation communication: The IEC 104 protocol uses the TCP / IP protocol to achieve real-time data transmission between the dispatch master station and the substation RTU, supporting grid status awareness and control command issuance. Device-level interaction: The Modbus RTU / TCP protocol is used for data acquisition from field devices such as smart meters and protection devices, supporting hybrid networking of industrial buses and Ethernet.

[0003] Communication protocols achieve scenario-based adaptation by reading project configuration files (CSV / JSON / custom formats). Typical parameters include: network parameters: IP address (e.g., master server address), port number (IEC 104 default 2404), and communication timeout threshold; data mapping table: telemetry / telecommunication point table address (Modbus register address), unit conversion coefficients, and data quality bit rules. Currently, in the practice of "standardized design and scenario-based deployment" of power communication protocols, configuration files, as the core implementation carrier, have become a key factor in improving the implementation quality and operational reliability of power automation system engineering, due to their generation efficiency and accuracy.

[0004] Traditional communication protocol configuration tools (such as IEC 104, Modbus, etc.) require configuration personnel to possess both in-depth understanding of communication protocol standard documents and complex operational experience with dedicated configuration tools. In practice, these tools often lead to difficulties in project implementation due to six main shortcomings:

[0005] The descriptions of parameter items in different specifications have technical terminology barriers, which require a high level of professional ability from individuals;

[0006] The terminology system is fragmented, the parameter logic is hidden, and key parameters in the specification document (such as the "function code-register address" mapping relationship in Modbus) are often scattered across multiple chapters. Engineers need to search across pages and compare each item to complete the full configuration.

[0007] Existing tools lack structured semantic parsing capabilities and are highly dependent on manual intervention. Engineers are required to repeatedly consult specification documents (such as point table files and specification structure definitions) and manually fill in parameters item by item, which is inefficient and prone to errors.

[0008] The user interface is fragmented, and traditional tools use a multi-level menu nesting design (e.g., communication channel → protocol type → parameter group → field value), resulting in a lengthy operation path and a lack of context prompts.

[0009] The configuration process requires repeated manual coding conversion, which can easily lead to parameter omissions or format errors.

[0010] Dynamic parameter inheritance is missing, and the default values ​​of parameters are statically fixed and cannot be dynamically adjusted based on the preceding nodes.

[0011] Traditional communication protocol configuration tools face dual challenges in terms of efficiency and reliability due to protocol complexity, tool inefficiency, and configuration performance degradation.

[0012] No effective solutions have yet been proposed to address the problems in the relevant technologies. Summary of the Invention

[0013] In view of this, the present invention provides a method for transmitting and configuring node parameters of an intelligent communication protocol based on NLP, in order to solve the aforementioned problems.

[0014] To solve the above problems, the specific technical solution adopted by the present invention is as follows:

[0015] The method for transmitting and configuring node parameters in an NLP-based intelligent communication protocol includes the following steps:

[0016] S1. Obtain the multimodal document input by the user, and use natural language processing technology to perform document conversion processing on the multimodal document to obtain natural language text;

[0017] S2. Use Hidden Markov Model and Viterbi Dynamic Programming algorithm to perform multi-granular word segmentation on natural language text to obtain a word set;

[0018] S3. Construct a multi-dimensional keyword reference table based on a modular parameter system, and parse the word set; convert the parsing results into an executable configuration scheme based on the adaptive configuration method.

[0019] S4. Using a correction mechanism that combines program recommendations and manual approval, the executable configuration scheme is visually corrected to obtain the final configuration file.

[0020] Preferably, the step of obtaining the multimodal document input by the user and performing document conversion processing on the multimodal document using natural language processing technology to obtain natural language text includes the following steps:

[0021] S11. Obtain the multimodal document input by the user and identify the file extension using dictionary mapping;

[0022] S12. Extract multi-dimensional features from file extensions and determine the type of the multi-dimensional features. If the multi-dimensional features point to different types, it indicates a conflict. Resolve the conflict and determine the multimodal document type. Otherwise, take the type pointed to by the multi-dimensional features as the multimodal document type.

[0023] S13. Based on the multimodal document type, perform text parsing on the multimodal document and convert the text parsing results into a preset standardized data format to obtain natural language text.

[0024] Preferably, the step of obtaining the multimodal document input by the user and identifying the file extension using a dictionary mapping method includes the following steps:

[0025] S111. Extract the file extension suffix of the multimodal document based on its file path.

[0026] S112. Convert the file extension suffix to lowercase and add a prefix symbol to the converted file extension suffix to obtain the file extension string;

[0027] S113. Using the extension string, query the predefined mapping dictionary. If the query is successful, use the mapped file type to identify the extension string and obtain the file extension. Otherwise, identify the extension string according to the preset text format and obtain the file extension.

[0028] Preferably, the step of extracting multi-dimensional features from file extensions and determining the type of the multi-dimensional features, where if the multi-dimensional features point to different types, indicates a conflict, the conflict is resolved, and the multimodal document type is determined; otherwise, the type pointed to by the multi-dimensional features is taken as the multimodal document type, includes the following steps:

[0029] S121. Obtain the metadata, content structure, and semantic keywords of the multimodal document, and perform multi-dimensional feature extraction;

[0030] S122. Based on the multi-dimensional feature extraction results, determine the type of each feature mapping and count the types of all feature mappings;

[0031] S123. Compare whether the types of each feature mapping are consistent. If they are consistent, determine that the multi-dimensional features point to the same type and take the type pointed to by the multi-dimensional features as the multimodal document type. Otherwise, determine that there is a type conflict in the multi-dimensional features and use the conflict resolution protocol to resolve the conflict and determine the multimodal document type.

[0032] Preferably, the step of parsing the multimodal document based on the multimodal document type and converting the text parsing result into a preset standardized data format to obtain natural language text includes the following steps:

[0033] S131. Based on the multimodal document type, perform text parsing on the multimodal document to obtain the text parsing result;

[0034] S132. Based on the multimodal document type and a preset standardized data format, determine the format conversion method for the multimodal document;

[0035] S133. Based on the format conversion method of the multimodal document, perform format conversion on each multimodal document to obtain natural language text.

[0036] Preferably, the step of using a Hidden Markov Model and Viterbi dynamic programming algorithm to perform multi-granularity word segmentation on natural language text to obtain a word set includes the following steps:

[0037] S21. Initialize the probability parameters of the Hidden Markov Model based on natural language text;

[0038] S22. Based on the probability parameters of the Hidden Markov Model, construct the dynamic programming matrix using the Viterbi dynamic programming algorithm, and calculate the maximum probability path under different states of each character position through recursion to obtain the optimal path.

[0039] S23. Based on the optimal path, backtracking is performed to obtain the global optimal state sequence;

[0040] S24. Segment the natural language text into words based on the optimal state sequence, and optimize and adjust it in combination with the dictionary and the selected word segmentation mode to finally generate a word set.

[0041] Preferably, the probability parameters for initializing the Hidden Markov Model based on natural language text include:

[0042] S211. Perform corpus state annotation on natural language text, and combine domain dictionary and word segmentation rules to assign state labels to each corpus character and generate a state set;

[0043] S212. Based on the state set, count the original frequencies of the initial probability, transition probability and emission probability of the Hidden Markov Model.

[0044] S213. Perform probabilistic calculations on the original frequencies of the initial probability, transition probability, and emission probability to obtain the final initial probability matrix, transition probability matrix, and emission probability matrix.

[0045] Preferably, the formula for calculating the optimal path by recursively calculating the maximum probability path under different character positions is as follows:

[0046] ;

[0047] In the formula, Vt (s) represents the maximum probability path value when the state is s at time t, where s represents the state at the current time t, and its value ranges from the set of states. s′ represents the state at the previous time t-1. V t-1 (s′) represents the maximum probability path value when the state is s′ at time t-1, P(s|s′) represents the state transition probability, and P(o t |s) represents the emission probability, B represents the beginning of the word, M represents the middle of the word, E represents the end of the word, and S represents a single word.

[0048] Preferably, the construction of a multi-dimensional keyword lookup table based on a modular parameter system and the parsing of the word set, and the conversion of the parsing results into an executable configuration scheme based on an adaptive configuration method, includes the following steps:

[0049] S31. Based on the preset modular parameter system, establish a multi-dimensional keyword reference table, and use the multi-dimensional keyword reference table to perform word segmentation and entity recognition on the word set to obtain an entity list;

[0050] S32. Based on the semantic decoupling parsing mechanism, the entity list is dynamically generated and context parameter passing is processed to generate configuration parameters.

[0051] S33. The configuration parameters are mapped using a semantic alignment engine and a pre-defined modular parameter system to obtain the mapping result.

[0052] S34. Utilize conflict detection and intelligent completion strategies to optimize and adjust the mapping results, thereby obtaining an executable configuration scheme.

[0053] Preferably, the preset modular parameter system includes a specification parameter definition table, a point table parameter mapping table, an output parameter configuration table, and historical configuration parameters;

[0054] The specification parameter definition table is used to construct the basic framework of the communication protocol;

[0055] The point table parameter mapping table is used to construct a standardized description system for device data points;

[0056] The output parameter configuration table is used to standardize the configuration file generation stream;

[0057] The historical configuration parameters are used to automatically load and apply to dynamically generated default parameter values ​​or optimized configuration strategies if historical configuration parameters of the same type of communication protocol are detected during the configuration process; if no historical parameters exist, the loading process is skipped and the configuration is performed using preset rules.

[0058] Preferably, the step of dynamically generating nodes and passing context parameters for the entity list based on the semantic decoupling parsing mechanism, and generating configuration parameters, includes the following steps:

[0059] S321. Based on the semantic decoupling parsing mechanism, the entity list is decoupled by syntax and position to obtain the modifier descriptor and keyword parameters; and by semantic role labeling and confidence analysis, the combination scheme of the modifier descriptor parameters is determined.

[0060] S322. Construct a keyword co-occurrence matrix and a semantic dependency graph enhanced with domain knowledge, and add configuration constraints to the parameter combination scheme of the modifier descriptor.

[0061] S323. Based on the parameter combination scheme of the modified descriptor after adding configuration constraints, conflict detection is performed through dynamic node generation and address allocation algorithm. If the detection is successful, proceed to step S324. Otherwise, trigger the self-healing mechanism until the conflict is eliminated, and proceed to step S324.

[0062] S324. Based on the parameter combination scheme of the modifier descriptor after conflict elimination, the configuration parameters are generated using the context parameter passing engine.

[0063] Preferably, the step of optimizing and adjusting the mapping results using conflict detection and intelligent completion strategies to obtain an executable configuration scheme includes the following steps:

[0064] S341. Construct a multi-dimensional verification rule system based on the domain knowledge base, and use the multi-dimensional verification rule system to perform conflict detection on the mapping results. If there is no conflict, proceed to step S342; otherwise, use the preset resolution mechanism to eliminate the conflict and proceed to step S342.

[0065] S342. A multi-level rule-driven mechanism is adopted, and an intelligent completion decision tree is constructed based on the domain knowledge base;

[0066] S343. Use the intelligent completion decision tree to intelligently complete the mapping results after conflict detection, and normalize the intelligent completion results to obtain an executable configuration scheme.

[0067] Preferably, the word segmentation and entity recognition formula is:

[0068] ;

[0069] In the formula, Tokens represents the list of words after word segmentation, and D input This represents the set of input words, JiebaSegment(·) represents the word segmentation function used to divide the text into a sequence of words, Entities represents the list of entities that are actually filtered and extracted through the accumulation operation, and t represents a single word in the word segmentation result.

[0070] The beneficial effects of this invention are as follows:

[0071] 1. This invention utilizes the deep integration of natural language processing and industrial communication protocols. It parses unstructured text instructions using natural language processing technology and combines it with a professional dictionary in the field of power communication to achieve intelligent mapping from natural language to structured configuration parameters. This solves the dependence of traditional tools on fixed syntax templates, supports the flexibility of Chinese word order, and solves the problem of ambiguous expression through dynamic binding of role weights and semantic dependency graph parsing. This improves the efficiency of engineering configuration and reduces the dependence on manual intervention.

[0072] 2. This invention supports automated parsing of multi-format documents and standardized data interfaces. It combines a domain knowledge base to achieve semantic alignment and feature extraction of heterogeneous data. Based on the dynamic binding of role weights and the parsing mechanism of semantic dependency graphs, it achieves flexibility in natural language expression. It completes parameter mapping through keyword co-occurrence matrix and domain rule engine. It automatically allocates register addresses based on global starting address and historical configuration data to achieve address inheritance and conflict detection. It adopts a program recommendation + manual approval mode, highlights differences through a visual interface, supports interactive conflict resolution, and finally generates standardized configuration files. This can reduce the dependence on personnel professional skills and improve the configuration efficiency and accuracy of power automation systems. It is especially suitable for unstructured instruction parsing and dynamic adaptation in complex scenarios. Attached Figure Description

[0073] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly described 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. In the drawings:

[0074] Figure 1 This is a flowchart of a method for transmitting and configuring node parameters based on an NLP-based intelligent communication protocol according to an embodiment of the present invention.

[0075] Figure 2 This is a general framework diagram of the NLP-based intelligent communication protocol node parameter transmission and configuration method according to an embodiment of the present invention;

[0076] Figure 3 This is a flowchart of the conflict resolution protocol execution process in the NLP-based intelligent communication protocol node parameter transmission and configuration method according to an embodiment of the present invention.

[0077] Figure 4 This is a semantic dependency example diagram in the NLP-based intelligent communication protocol node parameter transmission and configuration method according to an embodiment of the present invention.

[0078] Figure 5 This is an adaptive configuration flowchart in the NLP-based intelligent communication protocol node parameter transmission and configuration method according to an embodiment of the present invention.

[0079] Figure 6 This is a schematic diagram of the protocol parameter display interaction interface in the NLP-based intelligent communication protocol node parameter transmission and configuration method according to an embodiment of the present invention.

[0080] Figure 7 This is a schematic diagram of the interactive interface for displaying the protocol point table in the method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to an embodiment of the present invention. Detailed Implementation

[0081] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0082] According to an embodiment of the present invention, a method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol is provided.

[0083] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, the method for transmitting and configuring node parameters based on NLP according to an embodiment of the present invention includes the following steps:

[0084] S1. Obtain the multimodal document input by the user, and use natural language processing technology to perform document conversion processing on the multimodal document to obtain natural language text;

[0085] In a preferred embodiment, the step of acquiring the multimodal document input by the user and performing document conversion processing on the multimodal document using natural language processing technology to obtain natural language text includes the following steps:

[0086] S11. Obtain the multimodal document input by the user and identify the file extension using dictionary mapping;

[0087] In a preferred embodiment, the step of acquiring the multimodal document input by the user and identifying the file extension using a dictionary mapping method includes the following steps:

[0088] S111. Extract the file extension suffix of the multimodal document based on its file path.

[0089] S112. Convert the file extension suffix to lowercase and add a prefix symbol to the converted file extension suffix to obtain the file extension string;

[0090] S113. Using the extension string, query the predefined mapping dictionary. If the query is successful, use the mapped file type to identify the extension string and obtain the file extension. Otherwise, identify the extension string according to the preset text format and obtain the file extension.

[0091] S12. Extract multi-dimensional features from file extensions and determine the type of the multi-dimensional features. If the multi-dimensional features point to different types, it indicates a conflict. Resolve the conflict and determine the multimodal document type. Otherwise, take the type pointed to by the multi-dimensional features as the multimodal document type.

[0092] In a preferred embodiment, the step of extracting multi-dimensional features from file extensions and determining the type of the multi-dimensional features, indicating a conflict if the multi-dimensional features point to different types, and resolving the conflict to determine the multimodal document type, or otherwise, taking the type pointed to by the multi-dimensional features as the multimodal document type, includes the following steps:

[0093] S121. Obtain the metadata, content structure, and semantic keywords of the multimodal document, and perform multi-dimensional feature extraction;

[0094] S122. Based on the multi-dimensional feature extraction results, determine the type of each feature mapping and count the types of all feature mappings;

[0095] S123. Compare whether the types of each feature mapping are consistent. If they are consistent, determine that the multi-dimensional features point to the same type and take the type pointed to by the multi-dimensional features as the multimodal document type. Otherwise, determine that there is a type conflict in the multi-dimensional features and use the conflict resolution protocol to resolve the conflict and determine the multimodal document type.

[0096] S13. Based on the multimodal document type, perform text parsing on the multimodal document and convert the text parsing results into a preset standardized data format to obtain natural language text.

[0097] In a preferred embodiment, the step of parsing the multimodal document based on the multimodal document type and converting the text parsing result into a preset standardized data format to obtain natural language text includes the following steps:

[0098] S131. Based on the multimodal document type, perform text parsing on the multimodal document to obtain the text parsing result;

[0099] S132. Based on the multimodal document type and a preset standardized data format, determine the format conversion method for the multimodal document;

[0100] S133. Based on the format conversion method of the multimodal document, perform format conversion on each multimodal document to obtain natural language text.

[0101] Specifically, multimodal document parsing can uniformly convert heterogeneous multi-source documents (such as csv, docx, txt, json, etc.) into standardized data formats, providing a standardized input interface for subsequent semantic analysis and parameter extraction, and achieving seamless connection and efficient processing of cross-format data.

[0102] The process of uniformly converting heterogeneous multi-source documents (such as csv, docx, txt, json, etc.) into a standardized data format:

[0103] 1. Identify file extensions; file extensions are the part after the last period (.) in a filename, usually used to identify the file format or type. The basic method for identifying file extensions is through string manipulation, extracting and matching the extension suffix.

[0104] The recognition method is dictionary mapping:

[0105] "type_map = {

[0106] ".csv": "csv",

[0107] ".docx": "docx",

[0108] ".txt": "txt",

[0109] ".json": "json"

[0110] }".

[0111] If the file extension is not recognized, parse it as text.

[0112] Steps for identifying file extensions:

[0113] (1) Extract the file extension. Extract the string after the last period from the file path. Convert it to lowercase (to eliminate case differences).

[0114] Add a prefix (.) to match the mapping table key (e.g., .txt instead of txt).

[0115] (2) Mapping type: use the extracted extension string to query the predefined mapping dictionary.

[0116] (3) Default processing logic: if the extension is unknown or the verification fails, process it according to the general text format (txt) (try UTF-8 decoding).

[0117] 2. Conflict detection and multi-dimensional decision-making mechanism: Traditional dictionary mapping methods cannot handle multiple conflicting features in the same file (e.g., a .doc extension but a PDF signature header, or a Word document containing an Excel spreadsheet). The technical solution is as follows:

[0118] (1) Construct a multi-dimensional feature extraction layer to simultaneously obtain file metadata (extension, file header), content structure (text / table / image ratio), and semantic keywords.

[0119] (2) Conflict detection algorithm: Conflict detection is triggered when multi-dimensional features point to different types. Examples of conflict detection and multi-dimensional decision-making mechanisms are provided:

[0120] Suppose there is a file: config.ini;

[0121] Surface characteristics: The file extension indicates that it is an INI configuration file.

[0122] Actual content:

[0123] name, age, department, salary;

[0124] Alice, 28, Engineering, 8500;

[0125] Bob, 32, Marketing, 9200;

[0126] Carol, 25, Sales, 7800;

[0127] In addition, multi-dimensional feature extraction is shown in Table 1;

[0128] Table 1 Multidimensional Features

[0129] It should be noted that the collision detection calculation includes:

[0130] # Content Structure Score Calculation

[0131] csv_score = 0.0

[0132] # Feature 1: Consistent delimiters (the same number of commas in each line)

[0133] if line1.count(',') == line2.count(',') == line3.count(','):

[0134] csv_score += 0.4 # Weight 40%

[0135] # Feature 2: First line text features (no numbers, all letters)

[0136] if all(word.isalpha() for word in header.split(',')):

[0137] csv_score += 0.3 # Weight 30%

[0138] # Feature 3: Data type matching (second column is an integer)

[0139] if all(entry.split(',')[1].isdigit() for entry in data_lines):

[0140] csv_score += 0.3 # Weight 30%

[0141] # INI file threshold settings (a typical INI file should have [section] and key=value)

[0142] ini_threshold = 0.6

[0143] # Detection conditions

[0144] if (file header != "INI") or (csv_score > ini_threshold):

[0145] Initiate Conflict Resolution Protocol

[0146] Calculation results:

[0147] csv_score = 0.4 + 0.3 + 0.3 = 1.0

[0148] ini_threshold = 0.6

[0149] 1.0 > 0.6 → Triggers conflict protocol.

[0150] The conflict resolution protocol execution process, such as Figure 3 As shown.

[0151] Verification results:

[0152] No [section] header → Does not conform to INI;

[0153] Consistent delimiters (4 columns per row) → conforms to CSV;

[0154] Consistent data types (second column all numbers) → strong CSV characteristics;

[0155] Final determination: CSV data file.

[0156] Specifically, parsing and converting data into a standardized format includes:

[0157] txt file: detect encoding and convert to UTF-8.

[0158] CSV file: Read using the csv module, convert to text format, and separate each line with a period.

[0159] docx file: Extracts the text content of all paragraphs.

[0160] JSON files: Parsed and converted into an easy-to-read text format using Jackson.

[0161] Example of converting a CSV file to a TXT file:

[0162] Original CSV file:

[0163] Name, point number, address;

[0164] Remote signal 1, 1, 0x001;

[0165] Remote signal 2, 2, 0x003;

[0166] Remote signal 3, 3, 0x005;

[0167] The converted TXT content:

[0168] Name Remote Signal 1, Point Number 1, Address 0x001. Name Remote Signal 2, Point Number 2, Address 0x003. Name Remote Signal 3, Point Number 3, Address 0x005.

[0169] Example of converting a docx file to a txt file:

[0170] Original docx file:

[0171] RS485; default baud rate 9600; character format uses an asynchronous serial communication format with 1 start bit, 8 data bits, default odd parity bit, and 1 stop bit.

[0172] The converted TXT content:

[0173] RS485; default baud rate 9600; character format uses an asynchronous serial communication format with 1 start bit, 8 data bits, default odd parity bit, and 1 stop bit.

[0174] Example of converting a JSON file to a TXT file:

[0175] Original JSON file:

[0176] {

[0177] "Remote message": [

[0178] {“Name”: “Remote Signal 1”, “Address”: “0x001”},

[0179] {"Name": "Remote Signal 2", "Address": "0x003"} ]

[0181] }".

[0182] The converted TXT content:

[0183] Remote signal name Remote signal 1 address 0x001.

[0184] Remote signal name Remote signal 2 address 0x003.

[0185] Unified encoding: Convert to UTF-8 encoding to eliminate the risk of garbled characters.

[0186] S2. Use Hidden Markov Model and Viterbi Dynamic Programming algorithm to perform multi-granular word segmentation on natural language text to obtain a word set;

[0187] As a preferred embodiment, the step of using a Hidden Markov Model and Viterbi dynamic programming algorithm to perform multi-granularity word segmentation on natural language text to obtain a word set includes the following steps:

[0188] S21. Initialize the probability parameters of the Hidden Markov Model based on natural language text;

[0189] In a preferred embodiment, the probability parameters of the hidden Markov model initialized based on natural language text include:

[0190] S211. Perform corpus state annotation on natural language text, and combine domain dictionary and word segmentation rules to assign state labels to each corpus character and generate a state set;

[0191] S212. Based on the state set, count the original frequencies of the initial probability, transition probability and emission probability of the Hidden Markov Model.

[0192] S213. Perform probabilistic calculations on the original frequencies of the initial probability, transition probability, and emission probability to obtain the final initial probability matrix, transition probability matrix, and emission probability matrix.

[0193] S22. Based on the probability parameters of the Hidden Markov Model, construct the dynamic programming matrix using the Viterbi dynamic programming algorithm, and calculate the maximum probability path under different states of each character position through recursion to obtain the optimal path.

[0194] S23. Based on the optimal path, backtracking is performed to obtain the global optimal state sequence;

[0195] S24. Segment the natural language text into words based on the optimal state sequence, and optimize and adjust it in combination with the dictionary and the selected word segmentation mode to finally generate a word set.

[0196] In a preferred embodiment, the formula for calculating the optimal path by recursively calculating the maximum probability path under different character positions is as follows:

[0197] ;

[0198] In the formula, V t (s) represents the maximum probability path value when the state is s at time t, where s represents the state at the current time t, and its value ranges from the set of states. s′ represents the state at the previous time t-1. V t-1 (s′) represents the maximum probability path value when the state is s′ at time t-1, P(s|s′) represents the state transition probability, and P(o t |s) represents the emission probability, B represents the beginning of the word, M represents the middle of the word, E represents the end of the word, and S represents a single word.

[0199] It should be noted that the natural language processing utilizes the Cppjieba word segmentation tool, supporting three-level segmentation strategies: precise mode, full mode, and search engine mode. It comes pre-installed with a professional dictionary for power communication protocols, including Modbus address specifications and the IEC 60870-5 terminology set. It provides a user-definable terminology knowledge injection interface, allowing developers to dynamically inject domain-specific terms and their semantic descriptions through structured configuration files. For example, adding GOOSE messages and defining their associated characteristics: MMS protocol, sampled value transmission, etc., and a special symbol preservation mechanism, such as complete recognition of 0x0001 address format and RTU / ASCII mode identifiers. Through Hidden Markov Models (HMMs) and Viterbi dynamic programming algorithms, the natural language text generated after parsing by the multimodal document parsing module is intelligently segmented at multiple granularities. Breaking through the limitations of static dictionaries in traditional word segmentation tools, the user-definable terminology knowledge injection interface enables the system to continuously adapt to the technological evolution in the power communication field.

[0200] Analysis of the core mechanism:

[0201] (1) Hidden Markov Model (HMM) Modeling:

[0202] State set: {B,M,E,S} represents the beginning of a word, the middle of a word, the end of a word, and a single word, respectively.

[0203] Observation sequence: The character sequence of the input text.

[0204] The probability parameters include:

[0205] Initial probability: The probability that each state is the first character of the sentence.

[0206] Transition probability: The transition matrix between states (such as the probability of B→E).

[0207] Emission probability: The probability of generating a certain character under a specific state.

[0208] (2) Viterbi dynamic programming:

[0209] Construct a dynamic programming matrix to record the maximum probability path for each state at each location; calculate the optimal path using a recursive formula, and finally backtrack to obtain the global optimal state sequence.

[0210] (3) Multi-granularity implementation:

[0211] Dictionary-based word segmentation combined: Prioritize matching dictionary words, and use HMM to handle out-of-vocabulary words.

[0212] Dynamically adjust granularity: control the granularity of the segmentation through HMM probability weights.

[0213] Supports mixed segmentation of multiple modes (precise / full / search engine mode).

[0214] Example of segmentation result:

[0215] Type: "What he said makes sense."

[0216] Output: ["he", "said", "of", "indeed", "reasonable"].

[0217] S3. Construct a multi-dimensional keyword reference table based on a modular parameter system, and parse the word set; convert the parsing results into an executable configuration scheme based on the adaptive configuration method.

[0218] As a preferred embodiment, the construction of a multi-dimensional keyword lookup table based on a modular parameter system and the parsing of the word set, and the conversion of the parsing results into an executable configuration scheme based on an adaptive configuration method, includes the following steps:

[0219] S31. Based on the preset modular parameter system, establish a multi-dimensional keyword reference table, and use the multi-dimensional keyword reference table to perform word segmentation and entity recognition on the word set to obtain an entity list;

[0220] As a preferred embodiment, the preset modular parameter system includes a specification parameter definition table, a point table parameter mapping table, an output parameter configuration table, and historical configuration parameters;

[0221] The specification parameter definition table is used to construct the basic framework of the communication protocol;

[0222] The point table parameter mapping table is used to construct a standardized description system for device data points;

[0223] The output parameter configuration table is used to standardize the configuration file generation stream;

[0224] S32. Based on the semantic decoupling parsing mechanism, the entity list is dynamically generated and context parameter passing is processed to generate configuration parameters.

[0225] The historical configuration parameters are used to automatically load and apply to dynamically generated default parameter values ​​or optimized configuration strategies if historical configuration parameters of the same type of communication protocol are detected during the configuration process; if no historical parameters exist, the loading process is skipped and the configuration is performed using preset rules.

[0226] As a preferred implementation, the step of dynamically generating nodes and passing context parameters to the entity list based on the semantic decoupling parsing mechanism, and generating configuration parameters, includes the following steps:

[0227] S321. Based on the semantic decoupling parsing mechanism, the entity list is decoupled by syntax and position to obtain the modifier descriptor and keyword parameters; and by semantic role labeling and confidence analysis, the combination scheme of the modifier descriptor parameters is determined.

[0228] S322. Construct a keyword co-occurrence matrix and a semantic dependency graph enhanced with domain knowledge, and add configuration constraints to the parameter combination scheme of the modifier descriptor.

[0229] S323. Based on the parameter combination scheme of the modified descriptor after adding configuration constraints, conflict detection is performed through dynamic node generation and address allocation algorithm. If the detection is successful, proceed to step S324. Otherwise, trigger the self-healing mechanism until the conflict is eliminated, and proceed to step S324.

[0230] S324. Based on the parameter combination scheme of the modifier descriptor after conflict elimination, the configuration parameters are generated using the context parameter passing engine.

[0231] S33. The configuration parameters are mapped using a semantic alignment engine and a pre-defined modular parameter system to obtain the mapping result.

[0232] S34. Utilize conflict detection and intelligent completion strategies to optimize and adjust the mapping results, thereby obtaining an executable configuration scheme.

[0233] As a preferred implementation, the step of optimizing and adjusting the mapping results using conflict detection and intelligent completion strategies to obtain an executable configuration scheme includes the following steps:

[0234] S341. Construct a multi-dimensional verification rule system based on the domain knowledge base, and use the multi-dimensional verification rule system to perform conflict detection on the mapping results. If there is no conflict, proceed to step S342; otherwise, use the preset resolution mechanism to eliminate the conflict and proceed to step S342.

[0235] S342. A multi-level rule-driven mechanism is adopted, and an intelligent completion decision tree is constructed based on the domain knowledge base;

[0236] S343. Use the intelligent completion decision tree to intelligently complete the mapping results after conflict detection, and normalize the intelligent completion results to obtain an executable configuration scheme.

[0237] Specifically, this invention uses a modular parameter system to construct a multi-dimensional keyword lookup table, which is adjusted to take into account the diversity of communication protocols and the differences in configuration tools. It mainly has the following four-layer parameter structure.

[0238] (1) Protocol parameter definition table. This table is used to build the basic framework of the communication protocol, including: basic protocol parameters (Modbus mode: RTU / ASCII / TCP), data verification mechanism (parity check / CRC check method), etc. It establishes a mapping relationship between parameter items in the configuration tool and natural language parsing, supporting flexible adaptation across protocols and tools. The definition requirements for the protocol parameter definition table are: the configuration tool developer or user must declare the fields in the protocol parameter definition table as shown in Table 2:

[0239] Table 2. Configuration tool developers or users must declare in the specification parameter definition table.

[0240] Configuration tool developers or users need to define, optionally, an enumeration set of keywords, names, data types, and values ​​for communication protocol parameter items related to the configuration tool in the specification parameter definition table. After reading the specification parameter definition table, the intelligent configuration module records the parameter item information, uses the parameter item name as the search keyword, and after intelligently parsing the specification text, sends the final configured parameter items and values ​​to the configuration tool according to the specified format via a function interface. The specification parameter definition table is in the following format:

[0241] "parcfg": {

[0242] "ModbusMod": "Mode||ushort||TCP / RTU / ASCII"

[0243] "VerityMod": "Verification method || ushort || CRC / RTU"

[0244] "IEDAddrAss": "Device address || ushort"

[0245] "FunByteCount": "Function code / occupied / bytes||ushort||1 / 2"

[0246] "VerifyByteCount": "Verification / bytes || ushort || 1 / 2"

[0247] "YKSelectAutoReply": "Remote Control / Reverse Calibration ||ushort ||0 / 1"

[0248] "call_mode": "Call / Mode ||ushort || Telemetry, remote control, and pulse-based call / Call by function code",

[0249] "ask_intval": "Send interval || uint",

[0250] "ask_time_out": "Timeout period || uint"

[0251] ......".

[0252] (2) The point table parameter mapping table is used to construct a standardized description system for device data points, unify the configuration specifications between different devices, and ensure the consistency and resolvability of data point definitions in the communication protocol. It includes: function type configuration (telecommunications, telemetry, remote control, etc.), data point metadata (function code, starting address, data type, register usage), etc. The specific form of the point table parameter mapping table is as follows:

[0253] "Telemetry": {

[0254] "fun_code": "Function code||short",

[0255] "reg_addr": "Register address||int",

[0256] "reg_count": "Number of registers in use || char",

[0257] "data_type": "Data type||enumDatatype"

[0258] },

[0259] "Remote letter": {

[0260] "fun_code": "Function code||short",

[0261] "reg_addr": "Register address||int",

[0262] "bit_no": "bit number||char",

[0263] "value": "value||ushort",

[0264] "parse_type": "parse method || char",

[0265] "trans_soe": "Convert to SOE||char"

[0266] },

[0267] "Remote Pulse": {

[0268] "fun_code": "Function code||short",

[0269] "reg_addr": "Register address||int",

[0270] "reg_count": "Number of registers in use || char",

[0271] "data_type": "Data type||enumDatatype"

[0272] },

[0273] "Remote control": {

[0274] "fun_code": "Function code||short",

[0275] "reg_addr_select_on": "Select control register address||int",

[0276] "reg_addr_select_off": "Select control register address||int",

[0277] "reg_addr_excute_on": "Execution control register address||int",

[0278] "reg_addr_excute_off": "Execution control register address||int",

[0279] "YKValue_on": "Control value||ushort",

[0280] "YKValue_off": "Control score || ushort"

[0281] },

[0282] "Remote Adjustment": {

[0283] "fun_code": "Function code||short",

[0284] "reg_addr": "Register address||int",

[0285] "reg_count": "Number of registers in use || char",

[0286] "data_type": "Data type||enumDatatype"

[0287] }".

[0288] (3) Output Parameter Configuration Table. This table standardizes the configuration file generation process, regulates the output file format, encoding, field mapping, and version management, ensuring cross-system compatibility, maintainability, and project traceability of the configuration file. It covers: output format selection (INI structured configuration / CSV tabular data / JSON standardized interface, etc.), file encoding standard (UTF-8 / GB2312 / ASCII character set configuration), field mapping rules (namespace definition, etc.), and version control parameters (file header identifier, configuration version number, etc.). The output parameter configuration table takes the following form:

[0289] {

[0290] "output_config": {

[0291] "format": "JSON",

[0292] "encoding": "UTF-8",

[0293] "namespace": "V1.2_SP2",

[0294] "version": "1.0.0",

[0295] "output_path": "$CPS_ENV / / etc / fepcfg / protocolCfg / modbus / "

[0296] }".

[0297] (4) Historical configuration parameters: During the configuration process, if historical configuration parameters of the same type of communication protocol are detected, they will be automatically loaded and applied to dynamically generated default parameter values ​​or optimized configuration strategies; if no historical parameters exist, the loading process will be skipped and the preset rules will be used directly for configuration. The historical configuration parameters of the Modbus communication protocol include the device and parameter template mapping table, the Modbus protocol parameter mapping table, and the Modbus protocol 5 remote point table.

[0298] The device and parameter template mapping table is as follows:

[0299] {

[0300] "root_modbus_cfg": {

[0301] "CPU1 107386765314": {

[0302] "IEDDefine": "CPU.json"

[0303] },

[0304] "CPU1 107403542529": {

[0305] "IEDDefine": "CPU.json"

[0306] },

[0307] "LD1 107382571009": {

[0308] "IEDDefine": "LD.json"

[0309] },

[0310] "LD1 107382571012": {

[0311] "IEDDefine": "LD.json"

[0312] },

[0313] "LD2 107382571010": {

[0314] "IEDDefine": "LD.json"

[0315] },

[0316] "LD3 107382571011": {

[0317] "IEDDefine": "LD.json"

[0318] },

[0319] "Power Distribution MODBUS 1713700339717": {

[0320] "IEDDefine": "Power Distribution MODBUS.json"

[0321] },

[0322] "Power Distribution Modbus2 1713700339718": {

[0323] "IEDDefine": "Power Distribution MODBUS.json"

[0324] }

[0325] }

[0326] }

[0327] The Modbus protocol parameter mapping table is as follows:

[0328] "comcfg": {

[0329] "ModbusMod": "2",

[0330] "check_head_id": "0",

[0331] "head_id_ins": "1",

[0332] "head_id_start": "0",

[0333] "NeedColonBool": "0",

[0334] "NeedEnterBool": "0",

[0335] "NeedNewlineBool": "0",

[0336] "VerityMod": "1",

[0337] "IEDAddrByteCount": "1",

[0338] "IEDAddrAss": "1",

[0339] "FunByteCount": "1",

[0340] "FunAss": "1",

[0341] "RegAddrByteCount": "2",

[0342] "RegAddrAss": "1",

[0343] "GetDataCountByteCount": "2",

[0344] "GetDataCountAss": "1",

[0345] "GetYxType": "2",

[0346] "YKDataByteCount": "2",

[0347] "YKDataAss": "1",

[0348] "RecvDataCountByteCount": "1",

[0349] "RecvDataCountAss": "1",

[0350] "VerifyByteCount": "2",

[0351] "VerifyAss": "1",

[0352] "YKregCount_10H": "2",

[0353] "YKbyteCount_10H": "1",

[0354] "YKrecvBytes_10H": "8",

[0355] "YCYMDataLengthDef": "1",

[0356] "YXDataLengthDef": "1",

[0357] "YXDataAss": "2",

[0358] "call_mode": "1",

[0359] "YCYXYM_MaxRegnum": "128",

[0360] "YKSelectAutoReply": "0",

[0361] "ask_intvel": "1000",

[0362] "ask_time_out": "1000",

[0363] "resend_count": "1",

[0364] "YCcyclic_count": "1",

[0365] "YXcyclic_count": "3",

[0366] "YMcyclic_count": "1"

[0367] },

[0368] The Modbus protocol 5 telepoint table is as follows:

[0369] "YC": {

[0370] "1": "3||1||2||3",

[0371] "2": "3||3||2||3",

[0372] "3": "3||5||2||3",

[0373] "4": "3||7||2||3",

[0374] "5": "3||9||2||3"

[0375] },

[0376] "YX": {

[0377] "1": "3||100||1||1||0||0",

[0378] "2": "3||102||1||2||0||0",

[0379] "3": "3||104||1||3||0||1",

[0380] "4": "3||106||1||4||0||0",

[0381] "5": "3||108||1||5||0||0"

[0382] },

[0383] "YM": {

[0384] "1": "5||200||4||3",

[0385] "2": "5||204||4||3",

[0386] "3": "5||208||4||3",

[0387] "4": "5||212||4||3",

[0388] "5": "5||216||4||3"

[0389] },

[0390] "YK": {

[0391] "1": "6||300||400||500||600||1||0",

[0392] "2": "6||302||402||502||602||1||0",

[0393] "3": "6||304||404||504||604||1||0",

[0394] "4": "6||306||406||506||606||1||0",

[0395] "5": "6||308||408||508||608||1||0"

[0396] },

[0397] "YT": {

[0398] "1": "6||600||4||3",

[0399] "2": "6||604||4||3",

[0400] "3": "6||608||4||3",

[0401] "4": "6||612||4||3",

[0402] "5": "6||616||4||3"

[0403] }".

[0404] In addition, a keyword lookup table is used to label elements in the word set with roles such as subject, numerical modifier, and unit identifier. Then, through word segmentation and entity recognition, dynamic node generation, context parameter passing, and word order reversal tolerance, intelligent parsing is performed on the segmented data, and relevant information from the text is written into the configuration model. Specifically, the following steps are included:

[0405] 1. Word segmentation and entity recognition: Obtain the sequence of tokens output by the word segmentation tool, then load the domain keyword comparison table (regulation parameter table / table point parameter table) as the core vocabulary library, and perform word segmentation and entity recognition based on the predefined keyword comparison table (regulation parameter table / table point parameter table).

[0406] The formula for word segmentation and entity recognition is:

[0407] ;

[0408] In the formula, Tokens represents the list of words after word segmentation. Example: ["Configure", "Remote signal", "100", "addresses", "starting from", "0X001", "each", "occupying", "2", "registers"].

[0409] D input represents the input set of words (natural language description or configuration instruction). Example: Configure 100 remote signals, starting from address 0X001, each occupying 2 registers.

[0410] JiebaSegment(·) represents the Jieba word segmentation function, which is used to segment the text into a sequence of words;

[0411] Entities represents the list of entities actually extracted by cumulative operation for screening;

[0412] t represents a single word in the word segmentation result, such as "remote signal", "0X001".

[0413] {address, register,...}, is a predefined set of entity keywords, the target parameters to be extracted. Example: {"remote signal", "address", "register"};

[0414] II(·) is an indicator function, which returns 1 if the word t belongs to the entity set, otherwise returns 0.

[0415] The mathematical definition is: ;

[0416] In the formula, t represents a single word in the word segmentation result, S represents the predefined set of entity keywords, and otherwise represents words in other non-entity keyword sets. If the word t belongs to the entity set S, it returns 1, otherwise it returns 0 for non-entity sets.

[0417] It should be noted that the semantic decoupling parsing mechanism (word order independent rule) adopts a dynamic binding strategy based on role weights to achieve order-independent matching between the subject entity and the modified parameter. It supports the flexibility of natural language expressions (such as inverted sentences, parenthetical remarks), eliminates the dependence on fixed grammar templates of traditional tools, and its core features are:

[0418] (1) Decoupling of grammatical position: By replacing position analysis with keyword feature markers, it supports arbitrary permutations and combinations of components, realizes the debinding of word segmentation type markers and position, realizes word order-independent parsing of language components, and breaks through the order constraints of traditional syntactic analysis. It supports the arbitrary arrangement of subjects (e.g., telemetry address) and parameters (e.g., 0x0001), with typical equivalent expressions.

[0419] Examples of syntax position decoupling:

[0420] "Set telemetry address 0x0001";

[0421] "Set 0x0001 as the telemetry address";

[0422] The traditional analytical scheme is compared with the scheme of the present invention, as shown in Table 3;

[0423] Table 3 Comparison of traditional analytical schemes and the scheme of the present invention

[0424] (2) Role weight-driven, dynamically determining word functions through semantic role labeling:

[0425] # Example of role weight representation

[0426] role_weights = {

[0427] "subject": 0.9, # Subject entity (e.g., "register");

[0428] "value": 0.7, # Numerical parameter (e.g., "0x0010");

[0429] "modifier": 0.6 # Modify the description (e.g., "start" "end");

[0430] }".

[0431] Prioritize the combination with the highest weight, rather than relying on the grammatical order.

[0432] (3) Dynamic binding verification; when multiple possible matches are detected, the binding confidence is calculated using the following formula:

[0433] ;

[0434] In the formula, Confidence (binding confidence) represents the degree of confidence in binding a set of parameters; a higher value indicates a more reasonable binding scheme. The value range is 0 ≤ Confidence ≤ ∑w i(In practical applications, it is usually normalized to a probability value) and used to select the optimal solution from multiple possible parameter binding schemes.

[0435] w i (Role Weight) represents the weight of the i-th semantic role, reflecting the importance of that role in the binding. See the example of role weight representation. Different roles contribute differently to the binding; higher weights indicate higher priority.

[0436] The 'r' (attenuation factor) controls the impact of distance across nodes on the weights. A smaller value means that the contribution of more distant nodes to the confidence score decays more rapidly. The default value is r = 0.8 (optimized for the power sector). This reflects the semantic association pattern of "strong dependence on nearby nodes and weak dependence on distant nodes."

[0437] d i (Cross-node distance) represents the hierarchical interval between the current node and the target node, used to quantify the logical affinity between the parameter and the entity. Example: If the parameter directly modifies the subject, d i =1; if it crosses two nodes, d i =2.

[0438] n represents the number of semantic roles.

[0439] An example of a semantic decoupling parsing mechanism is as follows:

[0440] Enter the command: "Set 0x0001 as telemetry address" (equivalent to "Set telemetry address 0x0001", but with the word order reversed).

[0441] Syntax position decoupling:

[0442] # Enter text

[0443] text = "Set 0x0001 as the telemetry address"

[0444] # Jieba word segmentation results

[0445] tokens = ["set", "0x0001", "as", "telemetry", "address"]

[0446] # Entity Recognition (Predefined Entity Set)

[0447] entities = {

[0448] "subject": ["telemetry address", "telecommunications address", "control command"], # Subject entity

[0449] "value": ["0x[0-9A-F]{4}"], # Numeric parameter (regular expression matching)

[0450] "modifier": ["start", "end", "set as"] # Modifier

[0451] }

[0452] # Decouple recognition results (ignore the function word "will", no semantic role)

[0453] decoupled_entities =

[0454] {"token": "Telemetry address", "type": "subject"},

[0455] {"token": "0x0001", "type": "value"},

[0456] {"token": "set as", "type": "modifier"}

[0458] Role weight drive:

[0459] Role weight table:

[0460] role_weights = {

[0461] "subject": 0.9, # Subject entity ("Telemetry address")[[]END]]

[0462] "value": 0.7, # Numerical parameter ("0x0010")[[]END]]

[0463] "modifier": 0.6 # Modifying description ("set as")[[]END]]

[0464] }"

[0465] The dynamic binding combination generates possible parameter binding schemes as shown in Table 4;

[0466] Table 4 The dynamic binding combination generates possible parameter binding schemes

[0467] Among them, Scheme 2 is pre-filtered due to type mismatch (numerical values cannot be used as subjects and subjects cannot be used as numerical values).

[0468] The confidence calculation of Scheme 1 in Table 4 includes:

[0469] (1) Calculate the cross-node distance (word position index), as shown in Table 5;

[0470] Table 5 Word position index ​

[0471] 1) Distance between Subject (telemetry address) and value (0x0001):

[0472] d1 = |3 - 1| = 2 (take the minimum distance);

[0473] 2) Distance between Subject (telemetry address) and modifier (set to):

[0474] d2 = |3 - 2| = 1 (take the minimum distance);

[0475] (2) The calculation of the confidence level of each item includes:

[0476] 1) Subject-Value binding contribution:

[0477] =0.9 x 0.64 = 0.576;

[0478] 2) Subject-Modifier binding contribution:

[0479] =0.9 x 0.8 = 0.72;

[0480] Value-Modifier binding contribution (not directly bound, ignored);

[0481] (3) Overall confidence level: Confidence = 0.576 + 0.72 = 1.296;

[0482] The normalization process includes: assuming the total confidence of all options is ∑Confidence = 1.296 (only option 1 is valid), the formula for calculating the normalized probability is:

[0483] P(Option 1) = 1.296 / 1.296 = 100% (Confidence level of the current option / Sum of confidence levels of all options);

[0484] Final structured output:

[0485] {

[0486] "operation": "set",

[0487] "target": {

[0488] "type": "telemetry address",

[0489] value: "0x0001"

[0490] }

[0491] }".

[0492] The technical comparisons are shown in Table 6:

[0493] The results of the comparison of 6 technologies are shown.

[0494] It should be noted that the keyword co-occurrence matrix is ​​constructed by calculating the co-occurrence frequency of keywords within N word distances. For the power industry, a word distance of 3 is recommended as the default value, but this distance can be adjusted. Then, the high-frequency co-occurrence frequency of keywords is calculated, and parameter association rules are automatically established.

[0495] Taking the power system configuration instruction: "Set the CRC check of telemetry address 0x0001 to Modbus RTU mode, data length 8 bits, baud rate 9600" as an example, the construction rule is to count the co-occurrence frequency of keywords within 3 word distances;

[0496] The keywords “telemetry address” and “CRC check” are within 3 word intervals, with no other keywords in between, so the value is 1;

[0497] The keywords “telemetry address” and “data length” are not within 3 word intervals, and are separated by “CRC check” and “Modbus RTU”, so the value is 0;

[0498] Similarly, the relationship between multiple keywords and whether they are within 3 word distances can be obtained as shown in Table 7 below;

[0499] The results of the technology comparison are shown in section 7.

[0500] The system detects a high frequency co-occurrence of CRC checksum and data length (value = 1), and automatically establishes parameter association rules. It also detects a strong correlation between baud rate and Modbus RTU (value = 1), triggering a checksum rule: IF Protocol Mode = RTU THEN Baud Rate ∈ {1200, 2400, 4800, 9600, 19200}.

[0501] Specifically, constructing a domain-knowledge-enhanced semantic dependency graph involves parsing the domain-knowledge keywords and values ​​of a lexical sequence to obtain two types of dependency relationships: entity-value relationships (Key-Value) and entity-key relationships (Key-Key). All dependency relationships can then be represented by a semantic dependency graph. Within this graph, the head-to-tail dependency relationships can be viewed as a path. By analyzing these paths, both attribute assignments and logical constraints can be captured, thereby uncovering implicit parameter relationships (such as the positive correlation between data length and validation methods) and revealing the deep logic of the lexical sequence.

[0502] Specifically, let's take the power system configuration command "Set the CRC checksum of telemetry address 0x0001 to Modbus RTU mode, data length 8 bits, baud rate 9600" as an example to illustrate the semantic dependency graph:

[0503] First, using expertise in the field, keywords such as telemetry address, CRC checksum, Modbus RTU, data length, and baud rate were predefined. Then, after parsing the instructions, two dependency relationships were obtained:

[0504] The key-value pair is associated with the entity as follows:

[0505] Telemetry Address - 0x0001, Data Length - 8, Baud Rate - 9600.

[0506] The key-key relationship between entities is as follows:

[0507] "CRC check" - "Modbus RTU".

[0508] Structural parsing uses simple dependency relations such as Figure 4 As shown.

[0509] The combined application of co-occurrence matrices and dependency graphs includes:

[0510] When two keywords co-occur in a matrix and their paths exist in the dependency graph, configuration constraints can be automatically added based on domain knowledge. This can effectively derive some unmentioned parameter values, which are more accurate than the default values.

[0511] For example: When the matrix shows the co-occurrence of "CRC check - data length" and the dependency graph has a data length → CRC check path, automatically add the configuration constraint: IF data_bits=8 THEN crc_type=CRC16.

[0512] In the exception of dynamic node generation and address allocation algorithms, communication protocol point table nodes (such as remote signaling and telemetry point table address allocation nodes) can be generated according to the dynamic node generation and address allocation algorithm. The specific process is as follows:

[0513] 1) Node definition formula:

[0514] ;

[0515] In the formula, Node i This represents the complete definition of the i-th dynamic node.

[0516] type i Indicates the node type, example: type i∈{remote signaling, telemetry, control commands}, as defined in the communication protocol.

[0517] Aistart represents the starting register address of node i (in hexadecimal or decimal). Example: Aistart = 0X001 (MODBUS starting address).

[0518] Aiend represents the end register address of node i.

[0519] Calculation formula: L i This is the register length.

[0520] FC i This represents the function code (FunctionCode) of node i, bound according to the communication protocol. Example: Remote signaling (Boolean) FC i =01 (Read coil status). Telemetry (analog) FC i =04 (Read input register).

[0521] 2) Dynamic address allocation rules:

[0522] ;

[0523] In the formula, A global This represents the global starting address, specified by the user or a system default. Example: A global =0X001 (Remote signaling start address).

[0524] This represents the total length of the registers occupied by the first i-1 nodes.

[0525] L k This indicates the register length of the k-th node (defined by the configuration rules).

[0526] Example: If the first two nodes occupy lengths L1=2 and L2=4, then =6.

[0527] When a new node is added using dynamic address allocation, its starting address automatically inherits the ending address of the previous node, without the need for manual intervention.

[0528] 3) Collision detection formula:

[0529] ;

[0530] In the formula, This represents the closed interval of the address range of node i. Example: The address range of node 1 is [0X001, 0X002].

[0531] ∩ represents the interval intersection operator, indicating that two address ranges overlap.

[0532] represents the empty set, and represents the absence of conflict.

[0533] The condition means that the address ranges of any two different nodes (i≠j) are not allowed to overlap; otherwise, a conflict alarm will be triggered.

[0534] Specifically, an example of the application of dynamic node generation and address allocation algorithms is as follows:

[0535] (1) Scenario description: Configure 3 remote signaling nodes, each occupying 2 registers, with a global starting address of 0X001.

[0536] Node 1:

[0537] A1start=0X001+0=0X001;

[0538] A1end=0X001+2-1=0X002;

[0539] Node 2:

[0540] A2start=0X001+2=0X003;

[0541] A2end=0X003+2-1=0X004;

[0542] Node 3:

[0543] A3start=0X001+2+2=0X005;

[0544] A3end=0X005+2-1=0X006;

[0545] (2) Conflict detection: The address ranges [0X001, 0X002] and [0X003, 0X004] of node 1 and node 2 have no intersection, so the detection is passed.

[0546] If node 2's L2=3 is manually modified, then A2end=0X005, which conflicts with node 3's A3start=0X005, triggering the self-healing mechanism.

[0547] It should be noted that the context parameter passing engine is used during dynamic configuration to dynamically generate configuration parameters (such as function codes, default addresses, etc.) based on device type, historical data, or real-time status. Specifically, this includes the following steps:

[0548] 1) Function code dynamic binding formula:

[0549] ;

[0550] In the formula, FCi The function code of the i-th node is defined by the communication protocol. Example: In MODBUS, 01 (read coil) and 04 (read input register).

[0551] type i Indicates the node type, such as remote signaling (Boolean), telemetry (analog), and control command (switching).

[0552] data_type i Indicates the data type, such as Boolean, 16-bit integer, or 32-bit floating-point number.

[0553] f(·) represents a mapping function, which binds the function code according to the context rules. Example: f(telecommunications, Boolean) = 01, f(telemetry, floating-point) = 04.

[0554] 2) Default value dynamically generated formula:

[0555] ;

[0556] In the formula, V default This indicates dynamically generated default parameter values ​​(such as starting address and register length).

[0557] μ 历史 This represents the historical average parameters of similar devices. Calculation formula:

[0558] ;

[0559] In the formula, N represents the number of historical configurations; Param k This represents the parameter value configured in the kth configuration.

[0560] σ represents the standard deviation of historical parameters, reflecting data fluctuations. The calculation formula is:

[0561] ;

[0562] Device type is defined by contextual category labels (such as regular or high load), which determine the offset strategy for default values.

[0563] 3) Context-aware parameter passing functions:

[0564] ;

[0565] In the formula, Param i This represents the final parameter value (such as register address or data length) of the i-th node.

[0566] Type i Indicates point type (same as type) i ).

[0567] HistoricalConfig represents the historical configuration database, which stores parameter records for similar devices.

[0568] ContextLookup(·) represents a context lookup function, and its logic is as follows:

[0569] Same configuration record;

[0570] Select a reference value based on business rules (such as latest priority, frequency priority);

[0571] Adjust parameters based on the current scenario (such as network load).

[0572] An example of the context parameter passing engine application is as follows:

[0573] (1) Scenario description: Assign a default register length to the newly added "high load temperature sensor".

[0574] 1) Historical data:

[0575] Register length records for similar devices: [4,4,6,4,5];

[0576] Calculate the mean and standard deviation:

[0577] ≈0.8;

[0578] 2) Dynamically generate default values:

[0579] Vdefault=μ 历史 +2σ=4.6+2×0.8=6.2≈6 (rounded down);

[0580] 3) Binding function code:

[0581] FC i =f(telemetry, floating-point number)=04.

[0582] Specifically, such as Figure 5 As shown, the intelligent parsing results are transformed into an executable configuration scheme through a multi-level processing flow, including:

[0583] Semantic alignment engine: Based on the specification parameter definition table and point table parameter mapping table read by the program, the program obtains the specific parameter items of the configuration tool, the parsing keyword lookup table, and the precise mapping of the parsing results.

[0584] Conflict Detection Matrix: A multi-dimensional verification rule system is constructed based on a domain knowledge base. Through an automated conflict detection and resolution mechanism, it ensures that the configuration scheme conforms to protocol specifications and engineering practices. The detection dimensions are shown in Table 8.

[0585] Table 8 Detection Dimensions

[0586] The intelligent decision tree completion employs a multi-level rule-driven mechanism. Based on an accumulated domain knowledge base, the system has built-in various default value matching relationships, such as automatic parity checking associated with Modbus RTU. When the input information does not explicitly specify relevant parameters, the program will intelligently match and apply the default value that best matches the domain knowledge.

[0587] The priority of the completion strategy includes:

[0588] 1) Forced completion (red warning item):

[0589] Example: "ModbusRTU" was detected but the checksum was missing → "Parity Check" was automatically filled in;

[0590] Rule: IFMode=RTU∧Checksum=NullTHENSetChecksum=Odd;

[0591] 2) Recommended completion (yellow prompt):

[0592] Example: Data length = 16 bits → It is recommended to enable CRC32 checksum;

[0593] Rule: IFDataBits≥16THENSuggestChecksum=CRC32;

[0594] 3) Unit standardization (blue optimization item):

[0595] Example: "Interval = 500ms" → Convert and store as "0.5s";

[0596] Configuration parameter normalization: Through structured reorganization and format standardization, multi-source heterogeneous configuration parameters are transformed into a unified format that can be executed by the machine.

[0597] Hexadecimal address formatting ("0010" → "0x0010");

[0598] Floating-point precision control ("3.1415926" → "3.142");

[0599] S4. Using a correction mechanism that combines program recommendations and manual approval, the executable configuration scheme is visually corrected to obtain the final configuration file.

[0600] It should be noted that the final configuration scheme employs a dual-safety mechanism of "program recommendation + manual approval." The configuration scheme is visually modified, with differences highlighted (color-coded changes). For conflicts that cannot be automatically resolved, an interactive selection interface is provided, prioritizing manual decision-making. The final configuration file is output after manual confirmation. Figure 6 and Figure 7 The interface for configuring protocol parameters using the Modbus communication protocol as an example is shown, and configuration verification and manual confirmation functions are implemented through visual interaction.

[0601] Specifically, based on the technical solution of the present invention, such as Figure 2 As shown, the system's overall architecture can be constructed, including a natural language processing module, an intelligent parsing and processing module, an adaptive configuration module, and a human-computer interaction module. The natural language processing module uses the Cppjieba word segmentation tool, supporting three-level segmentation strategies: precise mode, full mode, and search engine mode. The intelligent parsing and processing module uses a keyword lookup table to label elements in the word set with roles such as subject, numerical modifier, and unit identifier. The adaptive configuration module converts the parsing results from the intelligent parsing and processing module into an executable configuration scheme through a multi-level processing flow. The human-computer interaction module uses a dual-insurance mechanism of program recommendation and manual verification to visually correct configuration schemes, highlighting differences (color-coded change items). For conflicts that cannot be automatically resolved, an interactive selection interface is provided, prioritizing human decision-making. The final configuration file is output after human confirmation.

[0602] In summary, by leveraging the above-mentioned technical solutions of this invention, the present invention utilizes the deep integration of natural language processing and industrial communication protocols. It parses unstructured text instructions using natural language processing technology, combines it with a professional dictionary in the power communication field, and achieves intelligent mapping from natural language to structured configuration parameters. This solves the dependence of traditional tools on fixed syntax templates, supports flexible Chinese word order, and addresses the problem of ambiguous expression through dynamic role weight binding and semantic dependency graph parsing. This improves engineering configuration efficiency and reduces reliance on manual intervention. The present invention supports automated parsing of multi-format documents and standardized data interfaces. It achieves semantic alignment and feature extraction of heterogeneous data by combining a domain knowledge base. Based on the dynamic role weight binding and semantic dependency graph parsing mechanism, it achieves flexibility in natural language expression. Parameter mapping is completed through a keyword co-occurrence matrix and a domain rule engine. Register addresses are automatically allocated based on the global starting address and historical configuration data, achieving address inheritance and conflict detection. It adopts a program recommendation + manual approval mode, highlights differences through a visual interface, supports interactive conflict resolution, and finally generates a standardized configuration file. This reduces reliance on personnel expertise, improves the configuration efficiency and accuracy of power automation systems, and is particularly suitable for unstructured instruction parsing and dynamic adaptation in complex scenarios.

[0603] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, etc.) containing computer-usable program code.

[0604] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for transmitting and configuring node parameters in an NLP-based intelligent communication protocol, characterized in that, Includes the following steps: S1. Obtain the multimodal document input by the user, and use natural language processing technology to perform document conversion processing on the multimodal document to obtain natural language text; S2. Use Hidden Markov Model and Viterbi Dynamic Programming algorithm to perform multi-granular word segmentation on natural language text to obtain a word set; S3. Construct a multi-dimensional keyword comparison table based on a modular parameter system, and parse the word set; Based on the adaptive configuration method, the parsing and processing results are converted into an executable configuration scheme; S4. Using a correction mechanism that combines program recommendations and manual approval, the executable configuration scheme is visually corrected to obtain the final configuration file.

2. The method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to claim 1, characterized in that, The process of obtaining multimodal documents input by the user and converting them using natural language processing techniques to obtain natural language text includes the following steps: S11. Obtain the multimodal document input by the user and identify the file extension using dictionary mapping; S12. Extract multi-dimensional features from file extensions and determine the type of the multi-dimensional features. If the multi-dimensional features point to different types, it indicates a conflict. Resolve the conflict and determine the multimodal document type. Otherwise, take the type pointed to by the multi-dimensional features as the multimodal document type. S13. Based on the multimodal document type, perform text parsing on the multimodal document and convert the text parsing results into a preset standardized data format to obtain natural language text.

3. The method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to claim 2, characterized in that, The process of obtaining multimodal documents input by the user and identifying file extensions using dictionary mapping includes the following steps: S111. Extract the file extension suffix of the multimodal document based on its file path. S112. Convert the file extension suffix to lowercase and add a prefix symbol to the converted file extension suffix to obtain the file extension string; S113. Using the extension string, query the predefined mapping dictionary. If the query is successful, use the mapped file type to identify the extension string and obtain the file extension. Otherwise, identify the extension string according to the preset text format and obtain the file extension.

4. The method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to claim 2, characterized in that, The process of extracting multi-dimensional features from file extensions and determining the type of these features, including resolving conflicts if the features point to different types, and determining the multimodal document type, or using the type pointed to by the multi-dimensional features as the multimodal document type, includes the following steps: S121. Obtain the metadata, content structure, and semantic keywords of the multimodal document, and perform multi-dimensional feature extraction; S122. Based on the multi-dimensional feature extraction results, determine the type of each feature mapping and count the types of all feature mappings; S123. Compare whether the types of each feature mapping are consistent. If they are consistent, determine that the multi-dimensional features point to the same type and take the type pointed to by the multi-dimensional features as the multimodal document type. Otherwise, determine that there is a type conflict in the multi-dimensional features and use the conflict resolution protocol to resolve the conflict and determine the multimodal document type.

5. The method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to claim 2, characterized in that, The process of parsing multimodal documents based on multimodal document types and converting the parsing results into a preset standardized data format to obtain natural language text includes the following steps: S131. Based on the multimodal document type, perform text parsing on the multimodal document to obtain the text parsing result; S132. Based on the multimodal document type and a preset standardized data format, determine the format conversion method for the multimodal document; S133. Based on the format conversion method of the multimodal document, perform format conversion on each multimodal document to obtain natural language text.

6. The method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to claim 1, characterized in that, The process of using Hidden Markov Models and Viterbi Dynamic Programming to perform multi-granularity word segmentation on natural language text to obtain a word set includes the following steps: S21. Initialize the probability parameters of the Hidden Markov Model based on natural language text; S22. Based on the probability parameters of the Hidden Markov Model, construct the dynamic programming matrix using the Viterbi dynamic programming algorithm, and calculate the maximum probability path under different states of each character position through recursion to obtain the optimal path. S23. Based on the optimal path, backtracking is performed to obtain the global optimal state sequence; S24. Segment the natural language text into words based on the optimal state sequence, and optimize and adjust it in combination with the dictionary and the selected word segmentation mode to finally generate a word set.

7. The method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to claim 6, characterized in that, The probability parameters for initializing the Hidden Markov Model based on natural language text include: S211. Perform corpus state annotation on natural language text, and combine domain dictionary and word segmentation rules to assign state labels to each corpus character and generate a state set; S212. Based on the state set, count the original frequencies of the initial probability, transition probability and emission probability of the Hidden Markov Model. S213. Perform probabilistic calculations on the original frequencies of the initial probability, transition probability, and emission probability to obtain the final initial probability matrix, transition probability matrix, and emission probability matrix.

8. The method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to claim 6, characterized in that, The formula for calculating the optimal path by recursively calculating the maximum probability path under different character positions is as follows: ; In the formula, V t (s) represents the maximum probability path value when the state is s at time t, where s represents the state at the current time t, and its value ranges from the set of states. s′ represents the state at the previous time t-1. V t-1 (s′) represents the maximum probability path value when the state is s′ at time t-1, P(s|s′) represents the state transition probability, and P(o t |s) represents the emission probability, B represents the beginning of the word, M represents the middle of the word, E represents the end of the word, and S represents a single word.

9. The method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to claim 1, characterized in that, The method involves constructing a multi-dimensional keyword lookup table based on a modular parameter system and parsing the word set. Based on the adaptive configuration method, converting the parsing results into an executable configuration scheme includes the following steps: S31. Based on the preset modular parameter system, establish a multi-dimensional keyword reference table, and use the multi-dimensional keyword reference table to perform word segmentation and entity recognition on the word set to obtain an entity list; S32. Based on the semantic decoupling parsing mechanism, the entity list is dynamically generated and context parameter passing is processed to generate configuration parameters. S33. The configuration parameters are mapped using a semantic alignment engine and a pre-defined modular parameter system to obtain the mapping result. S34. Utilize conflict detection and intelligent completion strategies to optimize and adjust the mapping results, thereby obtaining an executable configuration scheme.

10. The method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to claim 9, characterized in that, The preset modular parameter system includes a specification parameter definition table, a point table parameter mapping table, an output parameter configuration table, and historical configuration parameters. The specification parameter definition table is used to construct the basic framework of the communication protocol; The point table parameter mapping table is used to construct a standardized description system for device data points; The output parameter configuration table is used to standardize the configuration file generation stream; The historical configuration parameters are used to automatically load and apply to dynamically generated default parameter values ​​or optimized configuration strategies if historical configuration parameters of the same type of communication protocol are detected during the configuration process; if no historical parameters exist, the loading process is skipped and the configuration is performed using preset rules.

11. The method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to claim 9, characterized in that, The semantic decoupling parsing mechanism involves dynamic node generation and context parameter passing for the entity list. Generating configuration parameters includes the following steps: S321. Based on the semantic decoupling parsing mechanism, the entity list is decoupled by syntax and position to obtain the modifier descriptor and keyword parameters; and by semantic role labeling and confidence analysis, the combination scheme of modifier descriptor parameters is determined. S322. Construct a keyword co-occurrence matrix and a semantic dependency graph enhanced with domain knowledge, and add configuration constraints to the parameter combination scheme of the modifier descriptor. S323. Based on the parameter combination scheme of the modified descriptor after adding configuration constraints, conflict detection is performed through dynamic node generation and address allocation algorithm. If the detection is successful, proceed to step S324. Otherwise, trigger the self-healing mechanism until the conflict is eliminated, and proceed to step S324. S324. Based on the parameter combination scheme of the modifier descriptor after conflict elimination, the configuration parameters are generated using the context parameter passing engine.

12. The method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to claim 9, characterized in that, The process of optimizing and adjusting the mapping results using conflict detection and intelligent completion strategies to obtain an executable configuration scheme includes the following steps: S341. Construct a multi-dimensional verification rule system based on the domain knowledge base, and use the multi-dimensional verification rule system to perform conflict detection on the mapping results. If there is no conflict, proceed to step S342; otherwise, use the preset resolution mechanism to eliminate the conflict and proceed to step S342. S342. A multi-level rule-driven mechanism is adopted, and an intelligent completion decision tree is constructed based on the domain knowledge base; S343. Use the intelligent completion decision tree to intelligently complete the mapping results after conflict detection, and normalize the intelligent completion results to obtain an executable configuration scheme.

13. The method for transmitting and configuring node parameters of an NLP-based intelligent communication protocol according to claim 9, characterized in that, The word segmentation and entity recognition formula is as follows: ; In the formula, Tokens represents the list of words after word segmentation, and D input This represents the set of input words, JiebaSegment(·) represents the word segmentation function used to divide the text into a sequence of words, Entities represents the list of entities that are actually filtered and extracted through the accumulation operation, and t represents a single word in the word segmentation result.