A method and system for managing multi-channel communication of a smart metering terminal
By implementing a multi-channel communication management method for dedicated transformer acquisition terminals, the channel status is monitored in real time, and adaptive channel switching and parallel transmission are performed. This solves the problems of untimely channel switching and insufficient communication reliability, and improves the reliability and throughput of data transmission.
Patent Information
- Application Number
- CN202611675672.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-28
- Publication Date
- 2026-11-27
AI Technical Summary
Existing dedicated transformer data acquisition terminals suffer from problems such as untimely channel switching, insufficient communication reliability, low scheduling efficiency, and complex protocol adaptation in multi-channel communication, making it difficult to meet the requirements of high reliability and low latency communication.
By establishing independent status monitoring objects for each communication channel, real-time collection of communication duration deviation and buffer saturation level is achieved, channel status monitoring data is generated, message framing and timeout management are performed, channel matching and protocol processing are realized, and adaptive channel switching and parallel transmission are adopted to reduce communication latency and packet loss rate.
It enables real-time status awareness, service priority scheduling, and adaptive channel switching of the dedicated transformer data acquisition terminal in multi-channel communication scenarios, significantly reducing communication latency and packet loss rate, and improving the reliability, real-time performance, and throughput of data transmission.
Smart Images

Figure CN123185274A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a multi-channel communication management method and system for a dedicated transformer data acquisition terminal, belonging to the field of communication technology for dedicated transformer data acquisition terminals. Background Technology
[0002] With the development of smart IoT technology, the electricity consumption patterns of dedicated transformer users are becoming increasingly diversified. Power companies are placing higher demands on the operational capabilities of dedicated transformer user equipment, including status acquisition, remote signaling, remote pulse, control, monitoring, and source-grid-load-storage interaction. To meet the needs of multiple services, dedicated transformer acquisition terminals need to have high multi-channel communication capabilities. Therefore, it has become necessary to study multi-channel communication management methods for dedicated transformer acquisition terminals to achieve real-time perception of channel status, service priority scheduling, adaptive channel switching, and parallel transmission, thereby improving the reliability, real-time performance, and throughput of data transmission.
[0003] Traditional dedicated transformer data acquisition terminals have several shortcomings in multi-channel communication. In terms of networking, they often employ point-to-point or bus topologies, resulting in relatively fixed structures and difficulties in expansion. Simultaneous communication across multiple channels easily leads to bus congestion, complicating addressing and scheduling. Due to the numerous communication protocols, interoperability between devices from different manufacturers is poor, resulting in a significant workload for later product development. Communication methods are mostly polling-based, leading to high terminal latency, slow response, and susceptibility to connection timeouts and data packet loss. Furthermore, subsequent block processing of communication protocols consumes substantial resources.
[0004] Figure 1 The system architecture of an existing dedicated transformer data acquisition terminal is shown, typically consisting of a main control module 101, an operating system 102, a driver module 103, a basic driver interface section 104, an internal communication bus 109, a dedicated transformer data acquisition terminal function section 105, a dedicated transformer terminal control section 106, a human-machine interface section 107, a multi-communication channel management section 108, and a dedicated transformer terminal external interface section 110. The multi-channel communication section is responsible for the serial and unified communication management of the uplink master station, downlink meter reading, and internal APP. However, this architecture still suffers from problems such as untimely channel switching, insufficient communication reliability, low scheduling efficiency, and complex protocol adaptation in multi-channel communication, making it difficult to meet the current requirements for high-reliability, low-latency communication in multi-service scenarios.
[0005] Given the complex multi-channel communication architecture of existing dedicated transformer data acquisition terminals, including RS232, RS485, infrared, Bluetooth, 4G / 5G, multi-channel communication modules, and multi-channel Ethernet, there is an urgent need to design an innovative multi-channel communication management method. The purpose of this invention is to solve the aforementioned problems in the existing technology and provide an efficient, reliable, and engineering-applicable multi-channel communication management method and system for dedicated transformer data acquisition terminals. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and provide a multi-channel communication management method and system for dedicated transformer data acquisition terminals. This method and system realizes real-time channel status perception, service priority scheduling, adaptive channel switching and parallel transmission, reduces communication latency and packet loss rate, reduces protocol processing resource consumption, and improves the reliability, real-time performance and throughput of data transmission.
[0007] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0008] In a first aspect, the present invention provides a multi-channel communication management method for a dedicated transformer data acquisition terminal, comprising:
[0009] An independent status monitoring object is established for each communication channel, and the status monitoring object is bound to the corresponding communication channel as a channel feature. The communication duration deviation and buffer saturation level of the bound channel are collected periodically through the status monitoring object to generate channel status monitoring data.
[0010] Receive all channel data communication messages, extract message information, and associate the message information with the channel status monitoring data generated by the corresponding channel status monitoring object;
[0011] The message information is constructed into message interface class data. Message framing and message timeout management are performed within the communication channel timeout period based on the message interface class data. The timeout threshold used for message timeout management is determined by the corresponding channel status monitoring object based on the channel status monitoring data. The framed communication message is then output.
[0012] Channel matching is performed on the framed communication messages. First, unsuitable channels are filtered out by a fast coarse screening layer. Then, the optimal matching channel is calculated by a precise matching layer based on the channel scanning period determined by the channel status monitoring data. A sub-thread is selected to process the channel, the matched message to be processed is output, and a protocol object to be processed is created.
[0013] The protocol object to be processed is processed to extract target parameter information from valid messages and generate protocol response data, while the processed communication messages are deleted.
[0014] Based on the preset communication protocol and communication channel type, the protocol response data is framed and a response protocol message is output.
[0015] Furthermore, the use of the channel status monitoring data includes: automatically increasing the message processing speed of the channel when the buffer saturation exceeds the critical threshold; requesting the channel matching module to expedite channel processing when the cumulative message increase rate exceeds the threshold, while doubling the time slice to detect the reception and transmission of channel messages; and automatically triggering the priority promotion mechanism when the message processing time approaches 80% of the timeout threshold to preempt system resources for priority processing.
[0016] Furthermore, the message information includes channel ID, channel type, message length, channel communication duration, and channel transmission delay, wherein the channel transmission delay in the message information... The calculation formula is:
[0017] ;
[0018] in For data frame length, The channel rate; the channel transmission delay The timeout threshold used to determine the message timeout management.
[0019] Furthermore, in the message timeout management, the receiving timeout period... The calculation formula is:
[0020] ;
[0021] in For transmission delay, For transmission delay, For frame processing delay, To delay task scheduling, For frame transmission delay; when the message reception time exceeds When the timeout occurs, delete the corresponding timed-out communication message.
[0022] Furthermore, the message interface data includes channel ID, protocol type, raw data, processing time, and timeout threshold; wherein the protocol type and timeout threshold are set with specific values after channel matching, and the set protocol type and timeout threshold are used for the protocol processing and the message timeout management, respectively.
[0023] Furthermore, the fast coarse screening layer includes: querying the communication status of the current thread channel; if the current thread channel is processing subsequent data blocks or subsequent communication messages of a specific channel, then waiting until the channel communication times out or a new frame communication message of the channel is received; if it is idle, then directly matching the next channel.
[0024] Furthermore, the precise matching layer includes: for channels with high bit error rates or unknown protocol communication data, gradually reducing the scanning period and increasing the selection of other channel communication options; the precise matching algorithm is as follows:
[0025] ;
[0026] in Total number of channels, For channel The scanning frequency, This represents the i-th communication channel. This represents the dedicated communication channel scanning period for this channel, determined based on real-time signal quality. Indicates time; the system is at The system continuously scans the target communication channel simultaneously, including both the channel header and the message. When a poor channel signal quality is detected, the scanning time for that channel is gradually reduced, and the released scanning resources are allocated to channels with better signal quality.
[0027] Furthermore, the extraction of target parameter information from valid messages employs a precise extraction algorithm based on offset mapping:
[0028] ;
[0029] in, For the extracted target parameter information, For packet processing functions, For message data, Let be the byte offset of the j-th target parameter in the message data segment. For parameter length, The parameter data types include integer, floating-point, and byte arrays; the target parameter information extracted through the pre-configured parameter mapping relationship is used to generate the protocol response data.
[0030] Furthermore, the protocol processing includes: acquiring a preset known protocol library for matching; the frame structure detection adopts a dual detection mechanism of feature awareness and state awareness, and the frame structure detection algorithm is as follows:
[0031] ;
[0032] in, The results are for frame structure detection. For frame header and frame tail feature character recognition, For fixed-length frame feature recognition, Text is for text pattern feature recognition;
[0033] Feature perception performs feature matching based on a pre-defined library of known protocols. When the protocol matching similarity reaches a certain level... At that time, state awareness is activated, and frame protocol parsing is performed.
[0034] Furthermore, if a match cannot be found based on the known protocol library, the dedicated transformer acquisition terminal actively reports the communication channel to the remote master station. The remote master station then performs auxiliary protocol remote analysis and constructs a new protocol library. Once successfully constructed, the new protocol library is sent to the dedicated transformer terminal's protocol library. The new protocol library uses the protocol code and protocol version as unique identifiers to construct new protocol units. The constructed new protocol library is used for subsequent protocol processing.
[0035] Furthermore, the method also includes: reading actively reported data parameters, the actively reported data parameters including reporting type, protocol type, channel type and data to be reported; obtaining the mapping relationship between the corresponding protocol fields and database data from the protocol library according to the protocol type, and encapsulating the data to be reported into a protocol message data request according to the mapping relationship; and treating the protocol message data request as a message to be processed and executing subsequent protocol processing steps.
[0036] Furthermore, the proactive reporting adopts a unified interface algorithm, and the reporting types include proactive data reporting, event-triggered reporting, and supplementary reporting; the channel type is selected using a dynamic matching method, based on the communication duration deviation and buffer saturation level, channel keep-alive status, and protocol communication cycle collected periodically by the status monitoring object, and the channel selection strategy is dynamically adjusted for proactive reporting services of different priorities; the proactive reporting frame is constructed according to the following formula:
[0037] ;
[0038] in For the content to be reported, Indicates the reporting type. Indicates the protocol type. Indicates the reporting channel. For database data.
[0039] Furthermore, the protocol processing interface data invoked by the protocol processing includes: channel type, protocol type, protocol version, request message frame structure, communication channel configuration, timeout time, and number of retransmissions; after executing the protocol processing, the response returns the processing status, response frame, and error code, and the response frame is used as protocol response data for framing.
[0040] Furthermore, the protocol response data is framed, including: determining the length of the communication data according to the protocol type and channel characteristics, performing frame processing, and preparing data for the next frame of communication. The prepared data is used in subsequent message reception.
[0041] Furthermore, the method also includes: recording the processing time of the protocol processing through the status monitoring object, updating the historical average processing statistics time of the corresponding protocol type message, and fine-tuning the timeout threshold of the corresponding type message and the scanning period of the corresponding channel based on the historical average processing statistics time. The fine-tuned timeout threshold and scanning period are used in subsequent message timeout management and channel matching.
[0042] Secondly, the present invention provides a multi-channel communication management system for a dedicated transformer data acquisition terminal, used to implement the multi-channel communication management method for a dedicated transformer data acquisition terminal as described in any of the preceding claims, including:
[0043] Status monitoring objects are used to bind to each communication channel as channel characteristics, periodically collect communication duration deviation and buffer saturation level of the bound channels, and generate channel status monitoring data.
[0044] The multi-channel management module is used to receive data communication messages from all channels and extract message information;
[0045] The communication message management module is used to construct message interface class data based on the message information, perform message framing and message timeout management, and output the framed communication message.
[0046] The communication channel matching management module is used to perform channel matching on the framed communication messages, select the sub-thread processing channel, output the matched messages to be processed, and create the protocol objects to be processed.
[0047] The communication protocol processing module is used to process the protocol object to be processed, generate protocol response data, and delete the processed communication messages.
[0048] The response framing management module is used to frame the protocol response data according to the communication protocol and communication channel type, and output the response protocol message.
[0049] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0050] Fourthly, the present invention provides an electronic device, comprising:
[0051] Memory, used to store computer programs / instructions;
[0052] A processor for executing the computer program / instructions to implement the steps of any of the methods described above.
[0053] Fifthly, the present invention provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of any of the methods described above.
[0054] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0055] This invention provides a multi-channel communication management method and system for a dedicated transformer data acquisition terminal. It receives all channel data communication messages, extracts message information, performs message framing and timeout management based on the message information, outputs the framed communication messages, performs channel matching on the framed communication messages and selects a sub-thread processing channel, outputs the matched messages to be processed, creates a protocol object to be processed, performs protocol processing on the protocol object to be processed and generates protocol response data, deletes processed communication messages, and finally frames the protocol response data according to the communication protocol and channel type and outputs response protocol messages. This enables the dedicated transformer data acquisition terminal to achieve real-time channel status awareness, service priority scheduling, adaptive channel switching, and parallel transmission in multi-channel communication scenarios. This effectively solves the problems of untimely channel switching, insufficient communication reliability, low scheduling efficiency, and complex protocol adaptation in traditional solutions, significantly reducing communication latency and packet loss rate, reducing resource consumption for protocol processing, and improving the reliability, real-time performance, and throughput of data transmission. Attached Figure Description
[0056] Figure 1 This is a schematic diagram of the dedicated transformer data acquisition terminal system architecture provided by the background technology of this invention;
[0057] Figure 2 This is a schematic diagram of the architecture of the multi-channel communication management method and system for the dedicated transformer data acquisition terminal provided in this embodiment of the invention;
[0058] Figure 3 This is a schematic diagram of the functional algorithm of the communication message management module provided in an embodiment of the present invention;
[0059] Figure 4 This is a schematic diagram of the functional algorithm of the communication channel matching management module provided in an embodiment of the present invention. Detailed Implementation
[0060] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0061] Example 1: This example introduces a multi-channel communication management method for a dedicated transformer data acquisition terminal, including:
[0062] An independent status monitoring object is established for each communication channel, and the status monitoring object is bound to the corresponding communication channel as a channel feature. The communication duration deviation and buffer saturation level of the bound channel are collected periodically through the status monitoring object to generate channel status monitoring data.
[0063] Receive all channel data communication messages, extract message information, and associate the message information with the channel status monitoring data generated by the corresponding channel status monitoring object;
[0064] The message information is constructed into message interface class data. Message framing and message timeout management are performed within the communication channel timeout period based on the message interface class data. The timeout threshold used for message timeout management is determined by the corresponding channel status monitoring object based on the channel status monitoring data. The framed communication message is then output.
[0065] Channel matching is performed on the framed communication messages. First, unsuitable channels are filtered out by a fast coarse screening layer. Then, the optimal matching channel is calculated by a precise matching layer based on the channel scanning period determined by the channel status monitoring data. A sub-thread is selected to process the channel, the matched message to be processed is output, and a protocol object to be processed is created.
[0066] The protocol object to be processed is processed to extract target parameter information from valid messages and generate protocol response data, while the processed communication messages are deleted.
[0067] Based on the preset communication protocol and communication channel type, the protocol response data is framed and a response protocol message is output.
[0068] This embodiment provides a multi-channel communication management method for a dedicated transformer data acquisition terminal, the overall implementation logic of which is as follows: Figure 2 As shown. In this embodiment, the independent status monitoring object 200 is bound to the communication channel and runs through all operating modules, realizing the functions of statistical analysis and prediction of the communication channel status.
[0069] 1. Establishment of status monitoring objects and acquisition of channel status monitoring data;
[0070] An independent status monitoring object 200 is established for each communication channel, and the status monitoring object 200 is bound to the corresponding communication channel as a channel feature. The status monitoring object 200 periodically collects the communication duration deviation and buffer saturation level of the bound channel to generate channel status monitoring data.
[0071] When the cache saturation exceeds the critical threshold, the message processing speed of the channel is automatically increased; when the cumulative increase rate of messages exceeds the threshold, the status monitoring object 200 requests the channel matching module to expedite channel processing, and at the same time doubles the time slice to detect the reception and transmission of channel messages, so as to resolve the message congestion problem in a timely manner.
[0072] The status monitoring object 200 simultaneously records the historical average processing time of messages of each protocol type, thereby dynamically fine-tuning the timeout threshold of that type of message; when the message processing time approaches 80% of the timeout threshold, the priority promotion mechanism is automatically triggered to seize system resources for priority processing, thereby reducing the message timeout and discard rate.
[0073] 2. Reception of data communication messages and extraction of message information;
[0074] The multi-channel management module 201 receives all channel data communication messages and extracts message information. The message information includes channel ID, channel type, message length, channel communication duration, and channel transmission delay.
[0075] In the channel receiving interface, based on the communication type and characteristics of the receiving channel, the communication message management module 202 constructs message information that can be recognized, namely, channel ID, channel type, message length, channel communication duration, and channel transmission delay. The message and information are written to the communication message management module 202, and an exclusive protection operation is set during writing to prevent the data from being abnormally tampered with and to ensure the reliability of the communication process; the message information is associated with the channel status monitoring data generated by the corresponding channel status monitoring object 200.
[0076] Channel transmission delay in message information The calculation formula is:
[0077] ;
[0078] in This refers to the length of the data frame, in bits. The channel rate is expressed in bps; the calculated channel transmission delay is... Used for determining timeout thresholds in subsequent message timeout management.
[0079] In this embodiment, the message information is constructed as message interface class data, which includes channel ID, protocol type, raw data, processing time and timeout threshold. The protocol type and timeout threshold are set with specific values after subsequent channel matching.
[0080] 3. Message framing and message timeout management;
[0081] The communication message management module 202 performs message framing and timeout management on messages received within the communication channel timeout period based on the message interface class data. The core function of the communication message management module 202 is to handle the reception timeout and framing of multi-channel communication data messages. (Reception timeout period) The calculation formula is:
[0082] ;
[0083] in For transmission delay, For transmission delay, For frame processing delay, To delay task scheduling, For frame transmission delay; when the accumulated processing time from the receipt of the message exceeds When the timeout occurs, the communication message management module 202 deletes the corresponding timeout communication message.
[0084] Framing involves framing received messages within the communication channel timeout period, outputting the framed communication message, and then transmitting it to the communication channel matching management module 203. The communication message management module 202 is the core component connecting the multi-channel management module 201 and the dedicated transformer data acquisition terminal protocol processing, achieving reliable, fast-response, and scalable multi-channel communication. The functional algorithm of the communication message management module 202 is as follows: Figure 3 As shown.
[0085] 4. Channel matching and sub-thread processing channel selection;
[0086] The communication channel matching management module 203 performs channel matching on the framed communication messages, selects a sub-thread to process the channel, and outputs the matched messages to be processed. The communication channel matching management module 203 is based on a multi-threaded processing architecture, primarily addressing the congestion caused by concurrent processing of multi-channel communication and the high resource consumption issues of multi-channel point-to-point communication. Specifically, the main thread is associated with the active reporting management module 206 to manage the communication of the data reporting channel, while the sub-thread performs channel matching based on the message interface data output by the communication message management module 202.
[0087] In traditional dedicated transformer data acquisition terminal communication processing, some manufacturers use a one-to-one correspondence between communication thread channels and the number of communication channels. Taking one manufacturer as an example, its dedicated transformer data acquisition terminal has 20 communication channels, and the traditional approach would create 20 communication thread channels. This method consumes a large amount of system resources such as CPU processing power and memory space, leading to a decrease in overall system performance. On the other hand, when communication tasks are concentrated, thread blocking is prone to occur, slowing down the communication response speed and even causing data loss.
[0088] The channel matching algorithm in this embodiment is designed based on the principles of frequently used channels and maximum simultaneous communication. It rationally allocates communication threads according to system processing capacity and actual channel conditions, enabling as many channels as possible to communicate simultaneously while reserving capacity for frequently used channels. The core of the channel matching process is to first perform coarse screening for speed improvement, then precise matching and filtering, and finally select and execute the decision output. The execution status of channel information is then fed back in a closed loop to the execution thread's channel status awareness. The channel matching method block diagram is shown below. Figure 4 As shown.
[0089] (1) Fast coarse screening layer. First, more than 90% of the non-compatible channels are filtered through the fast coarse screening layer. The fast coarse screening layer first queries the communication status of the current thread channel itself to determine whether the current thread channel is processing subsequent data block information or subsequent communication messages of a specific channel; if it is processing, the thread channel will not rematch a new channel communication request, but will wait until the channel communication times out or a new frame communication message is received from the channel. The specific status can be viewed in the thread channel state machine; if it is idle, it will directly match the next channel for communication processing.
[0090] (2) Precise matching layer. The optimal matching channel is then calculated through the precise matching layer. The matching process is based on channel status, service requirements, environmental interference, and the previous channel message execution status, and automatically matches the appropriate weights for the dimensions, rather than fixed weights; the dynamic weights used in this embodiment include carrier channel routing depth, GPRS channel signal strength, RS485 communication success rate, etc.
[0091] For channels with high bit error rates or communication data using unknown protocols, the scanning cycle is gradually reduced, and other channel communication options are increased to reduce the probability of channel congestion. The precise matching algorithm is as follows:
[0092] ;
[0093] in Total number of channels, For channel The scanning frequency, This represents the i-th communication channel. This represents the dedicated communication channel scanning period for this channel, determined based on real-time signal quality. Indicates the time.
[0094] The system in The system continuously scans the target communication channel simultaneously, performing both the channel header and message scans to accurately determine the channel's real-time communication quality. When a channel is detected to have poor signal quality, the system gradually reduces the scan duration of that channel, allocating the freed-up scan resources to channels with better signal quality. As shown in the formula above, the sum of the scan frequencies of each channel remains constant, significantly improving the monitoring and response efficiency of high-quality channels without increasing the total scan overhead throughout the process.
[0095] The thread channel processing features communication status awareness and dedicated message waiting capabilities. The child thread first queries its own communication status to determine whether to process subsequent data blocks, and decides whether to match a new communication channel message or wait for a dedicated message from a historical channel. If the channel is not switched, it waits for the dedicated message until the communication channel times out or a new frame communication message for the current channel is received.
[0096] 5. Protocol processing and protocol response data generation;
[0097] The communication protocol processing module 208 processes the protocol object to be processed, generates protocol response data, and deletes the processed communication messages. The communication protocol processing module 208 is the core operation for data communication in the dedicated transformer acquisition terminal. Its implemented communication protocol processing interface includes channel type, protocol type, protocol version, request message frame structure, communication channel configuration, timeout time, and retransmission count. After executing the protocol processing interface, it returns the processing status, response frame, and error code.
[0098] (1) Target parameter extraction. The communication protocol processing module 208 extracts target parameter information from valid messages using a precise extraction algorithm based on offset mapping:
[0099] ;
[0100] in, For the extracted target parameter information, For packet processing functions, For message data, Let be the byte offset of the j-th target parameter in the message data segment. For parameter length, The parameter data types include integer, floating-point, and byte arrays. Through pre-configured parameter mapping relationships, multi-protocol message extraction can be achieved quickly and universally without manual parsing byte by byte. The extracted target parameter information is used to generate protocol response data.
[0101] (2) Known Protocol Library Matching. Protocol processing includes obtaining a preset known protocol library for matching. The known protocol library is based on the mapping relationship of protocol data in the database. After determining that the data in the database is the target mapping relationship, the communication frame format is captured and the corresponding data is parsed. Error tolerance processing is performed for data errors or unrecognizable protocol fields. For complex data mapping relationships, more logical processing is required, such as for protocols Modbus, IEC62056, DL / T698.45, etc.
[0102] After determining the protocol data mapping relationship, the logical processing interface of the protocol architecture is then determined to process the data into identifiable and unidentifiable data. The protocol identifier of the unidentifiable data is temporarily stored in a cache with limited storage, serving as the basis for data processing, data improvement and supplementation, and writing to the database after the new protocol construction module successfully builds the protocol. The protocol library retains the protocol version interface to facilitate the integration of different protocol versions for new data processing in the future.
[0103] (3) New Protocol Construction and Frame Structure Detection. If a known protocol library cannot be matched, the user interface custom protocol dynamic library is checked, and the new protocol construction module 205 is called to construct a new protocol library. The new protocol construction module 205 is used to create a known protocol library, add new protocol units, and construct the mapping relationship between new protocol frame data and database data. It is executed after successful creation. The new protocol library uses the protocol encoding plus the protocol version as a unique identifier to construct new protocol units to avoid duplicate creation: for different versions with the same encoding, the new protocol unit is added to the protocol library corresponding to the protocol version; for the same encoding and version, the original protocol is not modified.
[0104] A unified interface model for the new protocol library is constructed, combining existing design specifications for dedicated transformer terminals, standard multimodal data processing optimization strategies, and best practices for standardized communication protocols. This model enables dynamic protocol adaptation and unified interface mapping, resolving interface heterogeneity issues in scenarios with multiple protocols coexisting. It facilitates rapid access, automatic detection, intelligent conversion, and efficient management of new protocols. The interface model includes the new protocol version, encoding, new protocol library frame structure detection function, response frame structure creation function interface, new protocol database data mapping relationship size, new protocol command identifier and conversion data conversion, and database ID identifier.
[0105] The new protocol library's frame structure detection employs a dual detection mechanism of feature awareness and state awareness. The frame structure detection algorithm is as follows:
[0106] ;
[0107] in The results are for frame structure detection. For frame header and frame tail feature character recognition, For fixed-length frame feature recognition, Text is for text pattern feature recognition.
[0108] Feature perception performs feature matching based on a pre-defined library of known protocols. When the protocol matching similarity reaches a certain level... When a match cannot be found, the dedicated transformer acquisition terminal actively reports the communication channel to the remote master station, which then performs auxiliary protocol remote analysis and builds a new protocol library. Once successfully built, the new protocol library is sent to the dedicated transformer terminal's protocol library for subsequent protocol processing.
[0109] (4) Handling Callbacks and Resource Management. The communication protocol processing module 208 protects the range and operating interval of each parameter, executes the communication data flow to the database, and requests communication with other functional communication modules 211; at the same time, it requests the protocol message processing callback module 209 to delete the processed communication messages, requests the protocol memory management module 210 to apply for storage space, and saves the protocol information in the sub-thread protocol processing channel. After the protocol processing is completed, the protocol response callback module 212 is executed to complete the creation of the protocol user data format and save it in the communication memory management part, preparing to respond to the communication protocol processing result.
[0110] 6. Proactively report data processing;
[0111] For proactively reported data, the main thread of the communication channel matching management module 203 references the proactive reporting management module 206. First, it reads the proactively reported data parameters, which include the reporting type, protocol type, channel type, and the data to be reported. Based on the protocol type, it retrieves the mapping relationship between the corresponding protocol fields and database data from the protocol library. According to the mapping configuration specific to each protocol, the reporting protocol construction module 207 creates a protocol request message, transforming the protocol description into a protocol message data request, thus achieving automatic mapping and association for proactive reporting. Then, this protocol message data request is treated as a pending message and enters the communication protocol processing module 208 to execute subsequent protocol processing steps.
[0112] Active reporting employs a unified interface algorithm. Reporting types include active data reporting as required by the dedicated transformer data acquisition terminal specifications, event-triggered reporting, and supplementary reporting, and an auxiliary protocol for remote analysis is constructed. Channel types are selected using a dynamic matching method, based on factors such as the communication duration deviation and buffer saturation level collected periodically by the monitored object, channel keep-alive status, and protocol communication cycle. The channel selection strategy is dynamically adjusted for active reporting services of different priorities to achieve optimal resource allocation. Active reporting frames are constructed according to the following formula:
[0113] ;
[0114] in For the content to be reported, Indicates the reporting type. Indicates the protocol type. Indicates the reporting channel. For database data.
[0115] 7. Protocol response data framing and response message output;
[0116] The response framing management module 213 frames the protocol response data according to the communication protocol and communication channel type, and outputs a response protocol message. Specifically, the response framing management module 213 determines the length of the communication data based on the protocol type and channel characteristics, performs framing processing, and prepares data for the next frame of communication. The prepared data is used in subsequent message reception. When the multi-channel management module 201 requests response data, the response framing management module 213 completes the framing and sending operation of the message output according to the communication protocol category, and outputs a response protocol message.
[0117] 8. Feedback loop;
[0118] The status monitoring object 200 records the processing time of the protocol processing, updates the historical average processing statistics time of the corresponding protocol type message, and fine-tunes the timeout threshold of the corresponding type message and the scanning period of the corresponding channel based on the historical average processing statistics time. The fine-tuned timeout threshold and scanning period are used in subsequent message timeout management and channel matching, forming a closed loop for the entire data transmission process.
[0119] Through the above steps, this embodiment realizes that the dedicated transformer data acquisition terminal can achieve real-time channel status perception, service priority scheduling, adaptive channel switching and parallel transmission in multi-channel communication scenarios, effectively reducing communication latency and packet loss rate, reducing the resource consumption of protocol processing, and improving the reliability, real-time performance and throughput of data transmission.
[0120] Example 2
[0121] This embodiment provides a multi-channel communication management system for a dedicated transformer data acquisition terminal, used to implement the multi-channel communication management method for the dedicated transformer data acquisition terminal described in Embodiment 1. The system includes a status monitoring object 200, a multi-channel management module 201, a communication message management module 202, a communication channel matching management module 203, a communication protocol processing module 208, and a response framing management module 213. It also includes a communication protocol packet management module 204, a new protocol construction module 205, an active reporting management module 206, a reporting protocol construction module 207, a protocol message processing callback module 209, a protocol memory management module 210, other functional communication modules 211, and a protocol response callback module 212.
[0122] The specific functional implementation of each module and object mentioned above is described in the relevant content of the method in Embodiment 1, and will not be repeated here.
[0123] Example 3: This example provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described in Example 1.
[0124] Example 4: This example provides an electronic device, including:
[0125] Memory, used to store computer programs / instructions;
[0126] A processor for executing the computer program / instructions to implement the steps of any of the methods described in Embodiment 1.
[0127] Example 5: This example provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the method described in any one of Examples 1.
[0128] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
[0129] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure 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, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0130] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0131] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0132] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure and not to limit its protection scope. Although this disclosure has been described in detail with reference to the above embodiments, those skilled in the art should understand that after reading this disclosure, they can still make various changes, modifications or equivalent substitutions to the specific implementation of the invention, but these changes, modifications or equivalent substitutions are all within the protection scope of the pending claims.
Claims
1. A multi-channel communication management method for a dedicated transformer data acquisition terminal, characterized in that, include: An independent status monitoring object is established for each communication channel, and the status monitoring object is bound to the corresponding communication channel as a channel feature. The communication duration deviation and buffer saturation level of the bound channel are collected periodically through the status monitoring object to generate channel status monitoring data. Receive all channel data communication messages, extract message information, and associate the message information with the channel status monitoring data generated by the corresponding channel status monitoring object; The message information is constructed into message interface class data. Message framing and message timeout management are performed within the communication channel timeout period based on the message interface class data. The timeout threshold used for message timeout management is determined by the corresponding channel status monitoring object based on the channel status monitoring data. The framed communication message is then output. Channel matching is performed on the framed communication messages. First, unsuitable channels are filtered out by a fast coarse screening layer. Then, the optimal matching channel is calculated by a precise matching layer based on the channel scanning period determined by the channel status monitoring data. A sub-thread is selected to process the channel, the matched message to be processed is output, and a protocol object to be processed is created. The protocol object to be processed is processed to extract target parameter information from valid messages and generate protocol response data, while the processed communication messages are deleted. Based on the preset communication protocol and communication channel type, the protocol response data is framed and a response protocol message is output.
2. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 1, characterized in that, The use of the channel status monitoring data includes: automatically increasing the message processing speed of the channel when the buffer saturation exceeds the critical threshold; requesting the channel matching module to expedite channel processing when the cumulative message increase rate exceeds the threshold, while doubling the time slice to detect the reception and transmission of channel messages; and automatically triggering the priority promotion mechanism when the message processing time approaches 80% of the timeout threshold to preempt system resources for priority processing.
3. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 1, characterized in that, The message information includes channel ID, channel type, message length, channel communication duration, and channel transmission delay. The channel transmission delay in the message information... The calculation formula is: ; in For data frame length, The channel rate; the channel transmission delay The timeout threshold used to determine the message timeout management.
4. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 1, characterized in that, In the message timeout management, the receiving timeout period is... The calculation formula is: ; in For transmission delay, For transmission delay, For frame processing delay, To delay task scheduling, For frame transmission delay; when the message reception time exceeds When the timeout occurs, delete the corresponding timed-out communication message.
5. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 1, characterized in that, The message interface data includes channel ID, protocol type, raw data, processing time, and timeout threshold; the protocol type and timeout threshold are set with specific values after channel matching, and the set protocol type and timeout threshold are used for protocol processing and message timeout management, respectively.
6. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 1, characterized in that, The fast coarse screening layer includes: querying the communication status of the current thread channel; if the current thread channel is processing subsequent data blocks or subsequent communication messages of a specific channel, then waiting until the channel communication times out or a new frame communication message of the channel is received; if it is idle, then directly matching the next channel.
7. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 1, characterized in that, The precise matching layer includes: for channels with high bit error rates or unknown protocol communication data, gradually reducing the scanning period and increasing the selection of other channel communication options; the precise matching algorithm is as follows: ; in Total number of channels, For channel The scanning frequency, Indicates the i-th communication channel. This represents the dedicated communication channel scanning period for this channel, determined based on real-time signal quality. Indicates time; the system is at The system continuously scans the target communication channel simultaneously, including both the channel header and the message. When a poor channel signal quality is detected, the scanning time for that channel is gradually reduced, and the released scanning resources are allocated to channels with better signal quality.
8. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 1, characterized in that, The extraction of target parameter information from valid messages employs a precise extraction algorithm based on offset mapping: ; in, For the extracted target parameter information, For packet processing functions, For message data, Let be the byte offset of the j-th target parameter in the message data segment. For parameter length, The parameter data types include integer, floating-point, and byte arrays; the target parameter information extracted through the pre-configured parameter mapping relationship is used to generate the protocol response data.
9. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 1, characterized in that, The protocol processing includes: acquiring a preset known protocol library for matching; the frame structure detection adopts a dual detection mechanism of feature awareness and state awareness, and the frame structure detection algorithm is as follows: ; in, The results are for frame structure detection. For frame header and frame tail feature character recognition, For fixed-length frame feature recognition, Text is for text pattern feature recognition; Feature perception performs feature matching based on a pre-defined library of known protocols. When the protocol matching similarity reaches a certain level... At that time, state awareness is activated, and frame protocol parsing is performed.
10. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 9, characterized in that, If a match cannot be found using the known protocol library, the dedicated transformer acquisition terminal actively reports the communication channel to the remote master station. The remote master station then performs auxiliary protocol remote analysis and constructs a new protocol library. Once successfully constructed, the new protocol library is sent to the dedicated transformer terminal's protocol library. The new protocol library uses the protocol code and protocol version as unique identifiers to construct new protocol units. The constructed new protocol library is used for subsequent protocol processing.
11. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 1, characterized in that, The method further includes: reading actively reported data parameters, the actively reported data parameters including reporting type, protocol type, channel type and data to be reported; obtaining the mapping relationship between the corresponding protocol fields and database data from the protocol library according to the protocol type; encapsulating the data to be reported into a protocol message data request according to the mapping relationship; and using the protocol message data request as a message to be processed and executing subsequent protocol processing steps.
12. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 11, characterized in that, The proactive reporting adopts a unified interface algorithm, and the reporting types include proactive data reporting, event-triggered reporting, and supplementary reporting. The channel type is selected using a dynamic matching method, based on the communication duration deviation and buffer saturation level, channel keep-alive status, and protocol communication cycle collected periodically by the status monitoring object, and the channel selection strategy is dynamically adjusted for proactive reporting services of different priorities. The proactive reporting frame is constructed according to the following formula: ; in For the content to be reported, Indicates the reporting type. Indicates the protocol type. Indicates the reporting channel. For database data.
13. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 1, characterized in that, The protocol processing interface data called by the protocol processing includes: channel type, protocol type, protocol version, request message frame structure, communication channel configuration, timeout time and retransmission count; after executing the protocol processing, the response returns the processing status, response frame and error code, and the response frame is used as protocol response data for framing.
14. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 1, characterized in that, Framing the protocol response data includes: determining the length of the communication data based on the protocol type and channel characteristics, performing framing processing, and preparing data for the next frame of communication. The prepared data is used in subsequent message reception.
15. The multi-channel communication management method for a dedicated transformer data acquisition terminal according to claim 1, characterized in that, The method further includes: recording the processing time of the protocol processing through the status monitoring object, updating the historical average processing statistics time of the corresponding protocol type message, and fine-tuning the timeout threshold of the corresponding type message and the scanning period of the corresponding channel based on the historical average processing statistics time. The fine-tuned timeout threshold and scanning period are used in subsequent message timeout management and channel matching.
16. A multi-channel communication management system for a dedicated transformer data acquisition terminal, used to implement the multi-channel communication management method for a dedicated transformer data acquisition terminal as described in any one of claims 1 to 14, characterized in that, include: Status monitoring objects are used to bind to each communication channel as channel characteristics, periodically collect communication duration deviation and buffer saturation level of the bound channels, and generate channel status monitoring data. The multi-channel management module is used to receive data communication messages from all channels and extract message information; The communication message management module is used to construct message interface class data based on the message information, perform message framing and message timeout management, and output the framed communication message. The communication channel matching management module is used to perform channel matching on the framed communication messages, select the sub-thread processing channel, output the matched messages to be processed, and create the protocol objects to be processed. The communication protocol processing module is used to process the protocol object to be processed, generate protocol response data, and delete the processed communication messages. The response framing management module is used to framing the protocol response data according to the communication protocol and communication channel type, and output the response protocol message.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the multi-channel communication management method for the dedicated transformer acquisition terminal according to any one of claims 1 to 14.
