Method and system for multi-lane parallel scan communication of a converter
Patent Information
- Application Number
- CN202511972739.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2045-12-25
AI Technical Summary
[0004]本申请提供了转换器的多通道并行扫描通信方法及系统,用于针对解决现有技术中传统HART通信多通道扫描时隙分配固定,响应适配性差,导致数据读取效率低和响应准确性不足的技术问题
[0011]调取转换器的多个HART通信通道建立并行扫描任务;对所述动态扫描时隙进行自适应分配,生成通道扫描时序表;基于所述通道扫描时序表对所述多个HART通信通道进行中断驱动,生成数据读取指令进行监听响应,生成监听响应结果;基于所述监听响应结果进行判定,根据判定结果进行查询读取,确定组合数据返回至转换器。达到了实现HART通信通道动态时隙自适应分配与中断驱动扫描,提升了多通道数据读取效率和响应准确性的技术效果。
Smart Images

Figure CN121690212B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parallel scanning technology in communication, and more specifically to a multi-channel parallel scanning communication method and system for converters. Background Technology
[0002] In the field of industrial automation control, the HART communication protocol is widely used in data interaction scenarios between converters and various smart instruments due to its compatibility with both digital communication and analog signal transmission. Current traditional HART communication scanning methods mostly employ serial scanning or simple parallel scanning architectures with fixed time slot allocation, which have significant technical limitations: Firstly, fixed time slots cannot adapt to the different response performance differences of instruments connected to different HART communication channels, resulting in idle resources on fast-responding channels and frequent timeouts on slow-responding channels, leading to low overall scanning efficiency. Secondly, the lack of dynamic analysis of historical instrument response performance and adaptive time slot adjustment mechanisms, coupled with insufficient flexibility in the scanning drive method, easily leads to problems such as data reading delays and poor response accuracy. Furthermore, the lack of targeted data processing for general and specific query scenarios makes it difficult to meet the multi-channel, high-precision, and high-efficiency data communication needs in industrial scenarios.
[0003] In existing technologies, traditional HART communication has a fixed multi-channel scanning time slot allocation, resulting in poor response adaptability, which leads to low data reading efficiency and insufficient response accuracy. Summary of the Invention
[0004] This application provides a multi-channel parallel scanning communication method and system for converters, which addresses the technical problems of fixed multi-channel scanning time slot allocation, poor response adaptability, low data reading efficiency, and insufficient response accuracy in traditional HART communication.
[0005] In view of the above problems, this application provides a multi-channel parallel scanning communication method and system for converters.
[0006] A first aspect of this application provides a multi-channel parallel scanning communication method for a converter, the method comprising:
[0007] A parallel scanning task is established by retrieving multiple HART communication channels of the converter, and a dynamic scanning time slot is configured based on the parallel scanning task. The dynamic scanning time slot is adaptively allocated according to the historical response performance information of the instruments of the multiple HART communication channels, and a channel scanning timing table is generated. The multiple HART communication channels are interrupt-driven based on the channel scanning timing table, a data read instruction is generated for listening response, and a listening response result is generated. Based on the listening response result, a judgment is made, and a query is performed according to the judgment result to determine the combined data to be returned to the converter.
[0008] A second aspect of this application provides a multi-channel parallel scanning communication system for a converter, the system comprising:
[0009] The system includes a parallel scan task establishment module, which retrieves multiple HART communication channels of the converter to establish parallel scan tasks and configures dynamic scan time slots based on these tasks; an adaptive allocation module, which adaptively allocates the dynamic scan time slots according to the historical response performance information of the instruments on the multiple HART communication channels and generates a channel scan timing table; a monitoring response result generation module, which interrupts the multiple HART communication channels based on the channel scan timing table, generates data read commands for monitoring responses, and generates monitoring response results; and a query and read module, which makes a judgment based on the monitoring response results, performs a query and read based on the judgment results, and determines the combined data to be returned to the converter.
[0010] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0011] A parallel scanning task is established by invoking multiple HART communication channels of the converter; the dynamic scanning time slots are adaptively allocated to generate a channel scanning timing table; based on the channel scanning timing table, interrupt-driven operation is performed on the multiple HART communication channels to generate data read commands for monitoring responses, and monitoring response results are generated; based on the monitoring response results, a judgment is made, and based on the judgment results, a query is performed to read the data, and the combined data is returned to the converter. This achieves the technical effect of realizing dynamic time slot adaptive allocation and interrupt-driven scanning of HART communication channels, improving the efficiency and accuracy of multi-channel data reading and response. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0013] Figure 1 This is a schematic flowchart of a multi-channel parallel scanning communication method for a converter provided in an embodiment of this application.
[0014] Figure 2 This is a schematic diagram of the multi-channel parallel scanning communication system structure of the converter provided in the embodiments of this application.
[0015] Figure labeling: Parallel scan task creation module 10, adaptive allocation module 20, listening response result generation module 30, query and read module 40. Detailed Implementation
[0016] This application provides a multi-channel parallel scanning communication method and system for converters, which addresses the technical problems in the prior art where the multi-channel scanning time slot allocation in traditional HART communication is fixed, the response adaptability is poor, resulting in low data reading efficiency and insufficient response accuracy.
[0017] The technical solutions of 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 them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0018] Example 1, as Figure 1 As shown, this application provides a multi-channel parallel scanning communication method for a converter, the method comprising:
[0019] Step S100: Retrieve multiple HART communication channels of the converter to establish a parallel scan task, and configure dynamic scan time slots based on the parallel scan task.
[0020] Specifically, the converter, as the core device for communication control, data processing, and networking, uses its HART communication channels as the physical interface and logical path for connecting and acquiring field instruments. First, the configuration parameters of multiple HART communication channels of the converter are read from non-volatile memory, and N valid HART communication channels, not exceeding the converter's maximum number of channels, are selected. Then, the communication interface initialization parameters corresponding to these N HART communication channels are introduced, and combined with the previously read configuration parameters, parallel control is implemented for each channel, thus constructing a parallel scanning task. Next, time slots are allocated through these N valid HART communication channels, determining N time slot control structures corresponding one-to-one with each channel. Finally, a reasonable channel scheduling order is set through scheduling analysis of the N HART communication channels, and the N time slot control structures are arranged in an orderly manner according to this scheduling order to complete the configuration of dynamic scanning time slots.
[0021] Step S200: Adaptively allocate the dynamic scan time slots according to the instrument historical response performance information of the multiple HART communication channels to generate a channel scan timing table.
[0022] Specifically, the process begins by actively identifying and identifying multiple HART communication channels, acquiring and recording multiple active data read signals. After setting key performance indicators for communication, these indicators are correlated with the timestamps of each channel to construct historical performance records. These historical performance records are then added to a circular data buffer for data response analysis, generating historical response performance information for the instrument. Subsequently, the capacity of the circular data buffer is analyzed according to the scan cycle. A fixed-capacity first-in-first-out queue is extracted as a sliding window, and the first performance record is pushed into the queue based on the scan cycle. If the queue is saturated, it is sorted in descending order of storage time, and the oldest record is discarded to update the queue. Based on the updated queue, valid historical performance records for M scan cycles are defined to form an analysis dataset. Next, the analysis dataset is used to perform performance evaluation and calculate a comprehensive performance score. The multiple HART communication channels are then sorted in descending order according to this score, and the suggested time slot lengths for each channel are analyzed based on the sorting results. Finally, the multiple suggested time slot lengths are precisely matched with the dynamic scan time slots to construct a channel scan timing table, enabling adaptive allocation of dynamic scan time slots based on the instrument's historical response performance.
[0023] Step S300: Based on the channel scan timing table, interrupt drive is performed on the multiple HART communication channels to generate a data read command for listening response and generate a listening response result.
[0024] Specifically, firstly, the generated channel scan timing table is parsed to clarify the start time parameters and length parameters of multiple time slots for each HART communication channel. Then, a hardware timer is configured based on these parameters to implement timing control over multiple HART communication channels, accurately capturing the scan interrupt signal of each channel. Upon capturing a channel scan interrupt signal, an interrupt service is immediately executed, generating a corresponding data read instruction, which is sent to each HART communication channel. Simultaneously, a response monitoring timer is started for timeout monitoring. The response monitoring timer monitors the feedback from each HART communication channel in real time, generating response data frames containing valid response data and timeout no-response data frames indicating no feedback received. Finally, these two types of data frames are associated and stored with their corresponding HART communication channels, and integrated to form a complete monitoring response result.
[0025] Step S400: Based on the monitoring response result, a judgment is made, and the combined data is returned to the converter according to the judgment result.
[0026] Specifically, the monitoring response result is judged. If the result only contains a response data frame, it is considered a valid response. First, a valid data pool is constructed and multiple channel data slots are set according to multiple HART communication channels. Then, the target communication channel is extracted and combined with the channel data slots for response analysis to determine the device information of the HART instrument and make a valid identification. After updating the channel data slots, it is stored in the cache queue to generate the first judgment result. If the result only contains a timeout no-response data frame, it is considered no response. An interrupt command is triggered to jump to the dynamic scanning interval of the next communication channel for iterative scanning until a valid response is obtained, generating the second judgment result. Subsequently, based on the first and second judgment results, query analysis is performed to determine whether a general query or a specific query is required. The query process is as follows: For general queries, the converter device identifier is read, the valid data pool is traversed, and the channel data content sequence is obtained by sequentially reading the markers. The device identifier and the sequence are then assembled to generate a general combined data response frame. For specific queries, the target instrument device address information is read to locate the target channel data slot in the valid data pool. After verification, a parameter reading instruction is generated and the parallel scanning task is interrupted. The instruction is sent through the target HART communication channel, and the response is monitored to generate parameter response data. This data is then encapsulated with the converter device identifier and the target HART communication channel to generate a specific query combined data response frame. Finally, the two types of combined data response frames are integrated into the combined data and fed back to the converter backend to complete the query reading and data return.
[0027] In one possible implementation, step S100 further includes:
[0028] Step S110: Based on the non-volatile memory, read the configuration parameters of the multiple HART communication channels to determine N HART communication channels, where N is a positive integer not greater than the maximum number of channels of the converter.
[0029] Step S120: Introduce the communication interface initialization parameters for the N HART communication channels.
[0030] Step S130: Based on the configuration parameters and the initialization parameters of the communication interface, perform parallel control on the N HART communication channels to construct a parallel scanning task.
[0031] Step S140: Traverse the N HART communication channels to allocate time slots and determine the N time slot control structures.
[0032] Step S150: Perform scheduling analysis based on the N HART communication channels, set the channel scheduling order, arrange the N time slot control structures in sequence according to the channel scheduling order, and configure the dynamic scanning time slot.
[0033] Specifically, as the core device for communication control, data processing, and networking, the converter's HART communication channel serves as the physical interface and logical path for connecting and acquiring data from field instruments. First, relying on the stable storage characteristics of non-volatile memory, the configuration parameters of the multiple HART communication channels supported by the converter, including key parameters such as channel enable status, communication rate, address encoding, and data transmission protocol type, are read and verified one by one. Channels that meet the communication requirements and are in an effective working state are selected. Finally, N HART communication channels that can participate in parallel scanning are determined, where N is a positive integer and does not exceed the maximum number of channels supported by the converter's hardware design. The range of channels for parallel scanning is defined to ensure the orderly execution of subsequent communication tasks.
[0034] After determining N HART communication channels that can participate in parallel scanning (N being a positive integer not greater than the maximum number of channels in the converter), to ensure that each channel can stably participate in the parallel scanning task according to the preset communication specifications, it is necessary to introduce specific communication interface initialization parameters for these N HART communication channels. These parameters cover key aspects such as interface baud rate, data bit length, parity check, stop bit configuration, and communication protocol adaptation parameters. Their purpose is to provide a standardized interface configuration basis for subsequent collaborative implementation of channel parallel control and construction of parallel scanning tasks based on configuration parameters and initialization parameters. This ensures that each HART communication channel has a unified communication interaction benchmark in parallel working mode, avoiding communication failures or data transmission anomalies caused by interface parameter mismatches.
[0035] The converter's communication control core module first performs parameter fusion verification on the configuration parameters read from non-volatile memory, including channel enable status, communication rate, address encoding, and transmission protocol type, and the introduced communication interface initialization parameters, including baud rate, data bit length, parity method, stop bit configuration, and protocol adaptation parameters. After eliminating parameter conflicts, a unified channel control configuration set is generated. Subsequently, time-division multiplexing technology is used to divide the hardware resource occupation time periods of each HART communication channel, and a bus arbitration mechanism is used to coordinate the communication priorities of N channels to avoid resource contention. At the same time, the channel synchronization control logic is started, and the communication timing reference of each channel is synchronized through a hardware timer to ensure that all channels maintain consistency in the timing logic of data transmission and reception. Finally, based on the above parameter configuration, resource scheduling, and timing synchronization mechanism, a parallel scanning task supporting simultaneous scanning communication of N HART communication channels is constructed, realizing independent and collaborative scanning data interaction of each channel, and providing a stable task execution carrier for subsequent time slot allocation and orderly scanning.
[0036] After constructing the parallel scanning task, each of the N valid HART communication channels is processed one by one according to the preset traversal rules. Key factors such as the communication bandwidth requirements, data transmission volume, and historical communication latency characteristics of each channel are analyzed. Combined with the converter hardware resource carrying capacity and parallel communication timing constraints, independent and non-overlapping scan time slots are allocated to each HART communication channel. At the same time, core control information such as the start identifier, duration parameter, channel association ID, and data transmission priority corresponding to each time slot is defined. This information is structured and encapsulated to form N time slot control structures that correspond one-to-one with the N HART communication channels. Each structure completely records the time slot configuration rules of a single channel, providing standardized control unit support for the subsequent channel scheduling order and the final configuration of dynamic scan time slots.
[0037] After determining the N time-slot control structures, a scheduling analysis is conducted based on key factors such as the communication priority requirements, historical data transmission efficiency, and hardware resource usage of the N HART communication channels. Taking into account the real-time communication load and data interaction urgency of each channel, a reasonable channel scheduling order is set, prioritizing the scanning priority of high-priority, high-transmission-efficiency channels. Subsequently, according to this scheduling order, the N time-slot control structures previously allocated to each channel are arranged in an orderly manner, ensuring that the scanning periods corresponding to each time-slot control structure do not overlap on the time axis and are seamlessly connected. The scanning start time, duration, and timing rules for each HART communication channel are clarified, ultimately completing the configuration of dynamic scanning time slots. This ensures that subsequent multi-channel parallel scanning communication can be carried out in an orderly and efficient manner according to the preset timing, avoiding communication conflicts between channels.
[0038] In one possible implementation, step S200 further includes:
[0039] Step S210: Active communication identification is performed based on the multiple HART communication channels to obtain multiple active data reading signals.
[0040] Step S220: Record communication based on the multiple active data reading signals and set key communication performance indicators.
[0041] Step S230: Associate the key communication performance indicators with the timestamps of the multiple HART communication channels to construct historical performance records.
[0042] Step S240: Based on the historical performance records, add them to the circular data buffer for data response analysis to generate the instrument's historical response performance information.
[0043] Specifically, the converter's communication control core module drives multiple established HART communication channels as physical interfaces and logical paths for connecting and acquiring field instruments. It initiates periodic or triggered active communication requests to their respective field instruments. By sending query commands that conform to the HART communication protocol specification, it verifies the connectivity and availability of the communication link between the channel and the instrument. During the communication process, it triggers data reading operations multiple times, recording the timing of each request, the signal transmission path, and the feedback status, thereby obtaining multiple sets of active data reading signals containing key information such as signal strength, transmission timing, and request response status.
[0044] After acquiring multiple active data read signals from multiple HART communication channels, the entire communication process data for each group of signals is recorded in detail, including core information such as signal initiation time, transmission delay duration, data frame integrity, status markers indicating whether a response was successful or not, and stability parameters of the signal transmission link. Simultaneously, considering the efficiency and reliability requirements of multi-channel parallel scanning communication, targeted key communication performance indicators are set, specifically covering response delay (the time interval from sending a read command to receiving a response), data transmission accuracy (the ratio of effectively received data frames to the total number of transmitted data frames), link stability coefficient (the percentage of consecutive successful communications), and response success rate (the ratio of the number of communications that successfully obtained a response to the total number of communications). This provides clear evaluation dimensions and data statistical basis for subsequently associating performance indicators with timestamps and constructing historical performance records.
[0045] After setting key communication performance indicators, the timestamp information corresponding to each HART communication channel during multiple active data readings is extracted, including the initiation time of the active data reading command, the reception time of the field instrument response signal, and the start and end times of data frame transmission. Subsequently, an association mapping relationship is established according to the channel dimension, binding the values of each key communication performance indicator of each HART communication channel with the corresponding timestamp one by one to ensure that the performance data corresponds accurately with the communication time sequence. On this basis, the associated data of each channel is structured and organized according to the time sequence of communication to form a standardized historical performance record containing information such as channel identifier, timestamp sequence, various performance indicator parameters, and communication status remarks.
[0046] After constructing historical performance records containing channel identifiers, timestamp sequences, and various key communication performance parameters, these historical performance records are added to a circular data buffer one by one in chronological order. Utilizing the first-in-first-out (FIFO) and circular overwrite storage characteristics of the circular buffer, ordered storage and efficient management of multiple sets of historical performance data are achieved. Subsequently, based on the historical performance records stored in the buffer, data response analysis is conducted for each HART communication channel. The analysis focuses on statistically analyzing the fluctuation range of response latency, the changing trend of data transmission accuracy, the fluctuation of link stability coefficient, and the distribution characteristics of response success rate over different time periods. Simultaneously, abnormal response events during the communication process, such as sudden high latency and frequent packet loss, are identified and their relevant timing information is recorded. By summarizing and quantifying these analysis results, historical response performance information of the instrument is finally generated, comprehensively reflecting the historical communication performance, response stability, and data transmission reliability of each HART communication channel.
[0047] In one possible implementation, step S200 further includes:
[0048] Step S250: Traverse the circular data buffer according to the scan cycle to perform effective data analysis, extracting valid historical performance records for M scan cycles, where M is a positive integer greater than 0. Based on the valid historical performance records of the M scan cycles, perform data analysis identification to generate an analysis dataset. Based on the analysis dataset, perform performance evaluation and calculate a comprehensive performance score. Sort the multiple HART communication channels in descending order according to the comprehensive performance score to generate a sorting result. Based on the sorting result, perform length analysis on the dynamic scan time slots to generate multiple suggested time slot lengths. Match the multiple suggested time slot lengths with the dynamic scan time slots to construct the channel scan timing table.
[0049] Specifically, firstly, the storage capacity of the circular data buffer is analyzed based on a preset scan cycle. A fixed-capacity first-in-first-out queue is extracted and used as a sliding window. Then, performance records of each HART communication channel are continuously collected through the sliding window according to the scan cycle, constructing a first performance record push queue. Next, it is determined whether the first performance record push queue has reached saturation. If it is saturated, the records are sorted in descending order of storage time. The earliest stored record in the first position after sorting is matched with the queue, and the record corresponding to the matching result is eliminated to update the queue, generating a second performance record push queue. Finally, the data in the second performance record push queue is validated, and performance records that meet communication specifications and have no missing or abnormal data are selected. Finally, valid historical performance records for M scan cycles are defined, where M is a positive integer greater than 0.
[0050] After extracting valid historical performance records for M scan cycles, all valid historical performance records are first classified and aggregated according to the HART communication channel dimension, and each record is labeled with a unique channel identifier to clarify its communication channel. Then, the time-series information such as the scan cycle number and timestamp interval corresponding to each record is associated. At the same time, for the key communication performance indicators contained in the records, such as response latency, data transmission accuracy, link stability coefficient, and response success rate, field standardization and attribute labeling are performed to clarify the data type, unit of measurement, and value range of each indicator. Next, duplicate data and data with abnormal format are removed from the records, and missing key attribute information is supplemented to ensure data integrity and consistency. Finally, all valid historical performance records after classification, labeling, standardization, and cleaning are organized and integrated according to a unified data structure to generate a structured analysis dataset containing channel identifiers, time-series information, and various standardized performance indicator parameters.
[0051] After generating a structured analysis dataset, based on the key performance indicators of each HART communication channel within the dataset, such as response latency, data transmission accuracy, link stability coefficient, and response success rate over M scan cycles, a corresponding weight coefficient is first assigned to each indicator. Then, a weighted summation and equal-quantification evaluation algorithm is used to multiply the specific values of each performance indicator in each record by their corresponding weights and sum them up to calculate the comprehensive performance score of each HART communication channel over M scan cycles. At the same time, combined with the statistical distribution characteristics of the data, the scores are standardized and mapped to a preset range to eliminate the influence of differences in the dimensions of different indicators. Finally, a comprehensive performance score that can objectively reflect the overall communication performance of each HART communication channel is obtained.
[0052] After obtaining the comprehensive performance score for each HART communication channel through performance evaluation, the comprehensive performance score is used as the core sorting criterion to sort all HART communication channels participating in parallel scanning in descending order. The channel with the highest comprehensive performance score is placed at the top of the sort, and the channels with scores decreasing sequentially are arranged in order to ensure that the higher the score, the higher the sorting position. If multiple channels have the same comprehensive performance score during the sorting process, a secondary sort can be performed by combining auxiliary indicators such as channel communication priority and historical response stability. Finally, a clear and specific channel sorting result that combines primary and secondary importance and priority is generated.
[0053] After obtaining the ranking results of multiple HART communication channels in descending order of comprehensive performance score, and combining the comprehensive performance of the channels corresponding to their ranking positions, including core dimensions such as response latency, data transmission accuracy, and link stability, a targeted length analysis of the dynamic scan time slots is conducted. For channels with higher rankings and better comprehensive performance, considering their high communication efficiency and more urgent data interaction needs, the data transmission volume and response time patterns in their historical communication are analyzed, and longer suggested time slot lengths are allocated to ensure the integrity and timeliness of data transmission. For channels with lower rankings and relatively weaker comprehensive performance, the suggested time slot lengths are reasonably shortened based on their communication frequency, data volume requirements, and historical time slot occupancy efficiency to avoid resource waste. At the same time, the overall hardware resource carrying capacity of the converter and the timing coordination of multi-channel parallel communication are taken into account to ensure that the sum of the suggested time slot lengths of each channel does not exceed the total duration of a single scan cycle. Finally, multiple suggested time slot lengths corresponding one-to-one with each HART communication channel are generated.
[0054] After generating multiple suggested time slot lengths corresponding one-to-one with each HART communication channel, the overall timing framework of the dynamic scanning time slots previously configured based on the parallel scanning task is retrieved first. This framework includes the total duration, time slot allocation rules, and channel timing constraints. Then, the suggested time slot length of each channel is precisely matched with the timing resources of the dynamic scanning time slots. Combined with the channel scheduling and sorting results, the suggested time slot lengths are allocated to each channel according to their sorting order, ensuring that the suggested time slot lengths of high-priority channels are satisfied first, while ensuring that the time slots of all channels are non-overlapping and seamlessly connected on the time axis. During the matching process, it is necessary to verify whether the sum of the suggested time slot lengths meets the total duration limit of the dynamic scanning time slots. If there is a conflict, fine-tuning is performed based on the channel comprehensive performance score and communication requirements. Finally, the scan time slot start time, duration, timing connection node, and channel association identifier of each HART communication channel are determined. After structuring and integrating this information, a channel scanning timing table is constructed that can guide multiple channels to efficiently scan in parallel according to the preset timing.
[0055] In one possible implementation, step S250 further includes:
[0056] Step S251: Perform capacity analysis on the circular data buffer based on the scan cycle, and extract a fixed-capacity first-in-first-out queue.
[0057] Step S252: Use the fixed-capacity first-in-first-out queue as a sliding window.
[0058] Step S253: Record performance according to the scanning cycle and the sliding window, and push the first performance record into the queue.
[0059] Step S254: Determine whether the first performance record push queue is saturated. If the first performance record push queue is saturated, sort them in descending order according to the record storage time.
[0060] Step S255: Match the storage time of the first-order record with the performance record push queue, generate a data matching result, eliminate the data matching result, update the first performance record push queue, and generate a second performance record push queue.
[0061] Step S256: Based on the second performance record being pushed into the queue, perform effective data analysis and define the effective historical performance records for the M scan cycles.
[0062] Specifically, before extracting valid historical performance records for M scan cycles, the preset scan cycle duration and data statistical granularity are first determined. Based on this scan cycle, a comprehensive capacity analysis is performed on the circular data buffer storing historical performance records. The analysis focuses on verifying the current total storage capacity, used storage space, remaining available space, and key parameters such as data write rate and update frequency of the buffer to ensure that the extracted data can completely cover the performance information of multiple consecutive scan cycles. In combination with the historical performance data storage requirements of M scan cycles, a first-in-first-out queue that meets the fixed capacity standard is accurately extracted from the circular data buffer. The capacity setting of this queue needs to match the amount of performance records generated within the scan cycle, ensuring that it can accommodate sufficient historical data to support subsequent effective analysis, while avoiding data redundancy or reduced reading efficiency due to excessive capacity. This lays the foundation for subsequent selection of target data in the form of a sliding window.
[0063] After extracting a fixed-capacity first-in-first-out (FIFO) queue that meets the statistical requirements of the scan cycle from the circular data buffer, this queue is directly set as a sliding window. Utilizing the core characteristic of the sliding window—its ability to dynamically extract continuous time-series data along the time axis—it becomes a key tool for filtering valid historical performance records over M scan cycles. The fixed capacity of this sliding window precisely matches the preset scan cycle and the data storage requirements of M cycles, ensuring that each slide completely covers the historical performance records within the corresponding cycle. At the same time, relying on the FIFO storage rule, it ensures that the data within the window always maintains temporal continuity, providing a stable and accurate data filtering carrier for subsequently capturing performance records according to the scan cycle and constructing the first performance record to be pushed into the queue.
[0064] After determining the fixed-capacity first-in-first-out queue as a sliding window, the historical performance records stored in the circular data buffer are periodically captured and filtered using a preset scan period as the time reference. Each time a scan period is triggered, the sliding window slides forward along the time axis of the circular data buffer, accurately capturing the historical performance records corresponding to each HART communication channel in the current period, including key communication performance indicators, associated timestamps, and other core information. These performance data that meet the period requirements are then pushed into the preset queue one by one according to the time order in which the records were generated. This process continues until the queue reaches the preset initial capacity, ultimately constructing a first performance record that can completely cover the performance data of the current and multiple historical scan periods and pushing it into the queue.
[0065] After capturing performance records through a sliding window and building the first performance record into the queue, the system monitors in real time whether the current amount of data stored in the queue matches the preset saturation capacity to determine whether the first performance record has reached saturation. If the queue is found to be full of the preset number of performance records and has reached the saturation standard, the data sorting mechanism is activated. Based on the storage time of each performance record, all performance records in the queue are sorted in descending order, so that the earliest stored performance record is at the first position in the queue, and subsequent records with later storage times are arranged in order. This provides a clear temporal sorting basis for subsequent data eviction and queue updates based on the first record.
[0066] After the first performance record, which is already saturated, is pushed into the queue and sorted in descending order by its storage time, the storage time of the record in the first position after sorting is extracted as the core matching benchmark. This time information is then compared with the storage times of all records in the first performance record queue one by one to locate the target record that is completely consistent with the storage time of the first-position record, generating a data matching result. Subsequently, the earliest storage record corresponding to the data matching result is removed from the first performance record queue, while the latest performance record that meets the requirements of the current scan cycle is added to the queue from the circular data buffer, completing the dynamic update of the first performance record queue. Finally, a second performance record queue is generated that always maintains a fixed capacity and only contains performance data from the most recent cycle. This ensures that the data in the queue can continuously reflect the performance of the recent M scan cycles, providing timely and reliable data support for the subsequent determination of valid historical performance records.
[0067] After generating and pushing the second performance record, which maintains a fixed capacity and contains relatively recent period performance data, into the queue, a comprehensive data validity analysis is conducted on all performance records in the queue. First, the completeness of each record is verified, and abnormal records with missing data fields or non-standard formats are removed. Then, based on the preset reasonable thresholds of key communication performance indicators, records with indicators such as response latency, data transmission accuracy, and link stability coefficient within the normal range are selected, while extreme abnormal data exceeding the thresholds are excluded. At the same time, according to the scanning cycle time sequence rules, it is verified whether the timestamp of each record meets the time interval requirement of M consecutive scanning cycles to ensure the time sequence validity of the records. Through the above multi-dimensional validity verification and screening, the valid historical performance records within M scanning cycles are finally accurately identified from the second performance record queue, providing high-quality and highly reliable basic data for subsequent data analysis identification and comprehensive performance evaluation.
[0068] In one possible implementation, step S300 further includes:
[0069] Step S310: Based on the channel scanning timing table, perform time slot parsing and define multiple time slot start time parameters and multiple time slot length parameters.
[0070] Step S320: Configure a hardware timer based on the multiple time slot start time parameters and the multiple time slot length parameters, and use the hardware timer to perform timing control on the multiple HART communication channels and capture channel scan interrupt signals.
[0071] Step S330: Execute interrupt service in response to the channel scan interrupt signal, generate a data read instruction, send the data read instruction to multiple HART communication channels, and start a response listening timer.
[0072] Step S340: Timeout monitoring is performed on the multiple HART communication channels through the response monitoring timer to generate multiple data frames, including response data frames and timeout no response data frames.
[0073] Step S350: Associate and store the response data frame, the timeout no response data frame, and the multiple HART communication channels to construct the monitoring response result.
[0074] Specifically, a structured parsing algorithm is used to traverse the channel scan timing table. The time slot configuration entries corresponding to each HART communication channel are located through the table entry index. The absolute timestamp of each channel scan start is accurately read from the timing interval marked in the entry using the time parameter extraction interface. This timestamp is then uniformly converted into a millisecond-level format adapted to the hardware timer and defined as multiple time slot start time parameters. At the same time, the duration period of the time slot in each entry is parsed through the duration calculation function. Combined with the minimum transmission unit specified by the HART communication protocol, quantization conversion is completed to obtain an integer time slot length parameter in milliseconds, which is defined as multiple time slot length parameters. During the parsing process, an association mapping table of "channel identifier - start time parameter - length parameter" is established through the channel ID mapping unit. Duplicate or abnormally formatted parameter data is removed. Finally, a standardized set of parameters that can be directly used for hardware configuration is output.
[0075] The parsed multiple time slot start time parameters and multiple time slot length parameters are organized into standardized configuration data according to the correspondence of "channel identifier-start time-length". This data is written into the parameter register of the hardware timer through the timer configuration interface to complete the timer initialization configuration. After configuration, the hardware timer starts timing according to the time slot start time parameter corresponding to each HART communication channel. When the preset start time is reached, a scan trigger signal is sent to the corresponding HART communication channel to realize the timed scan control of multiple channels. At the same time, the scan duration of each channel is controlled according to the time slot length parameter. During the scan, the hardware timer monitors the channel scan status in real time. When the channel scan action is triggered, the corresponding channel scan interrupt signal is accurately captured by the interrupt capture unit, and the interrupt signal is bound to the channel identifier. Then it is transmitted to the interrupt controller to provide a precise trigger basis for the subsequent execution of the interrupt service routine.
[0076] When the interrupt controller receives a channel scan interrupt signal bound to each HART communication channel, it immediately triggers the interrupt response mechanism and executes a preset interrupt service routine. This routine generates standardized data read instructions based on the HART communication protocol specification and channel data read requirements, including core fields such as channel address, read parameters, and communication rate. The data read instructions are accurately sent to the corresponding multiple HART communication channels through the channel communication interface to ensure the accuracy and timeliness of instruction transmission. At the same time, a response monitoring timer is started, a preset timeout threshold is set, and the response status of each channel is monitored to provide a time reference for subsequent timeout judgment and data frame generation.
[0077] After the response monitoring timer starts, it monitors the response status of multiple HART communication channels in real time according to a preset timeout threshold. The timer synchronously accumulates the time from receiving a data read command to receiving a response from each channel. If valid data is received from a HART communication channel within the timeout threshold, the data is parsed and encapsulated according to the HART communication protocol specification to generate a response data frame containing information such as channel identifier, response data, and receiving timestamp. If no feedback is received from a HART communication channel after the timer's accumulated time reaches the timeout threshold, a timeout no-response data frame marked with channel ID, timeout status identifier, and timing information is automatically generated, ultimately forming a set of multiple data frames containing response data frames or timeout no-response data frames corresponding to all HART communication channels.
[0078] An associated storage structure with the HART communication channel identifier as the core index is established. The generated response data frames and timeout no response data frames are bound to the corresponding channel identifiers, and the timeslot information, response timestamps and data frame status identifiers of each data frame are synchronously associated. Then, these "channel identifier-data frame-association information" binding data are written to a preset storage area through the data storage interface, and the data is structured in channel order. Duplicate or invalid association records are removed, and finally a complete listening response result containing the response status, data content and timing details of all HART communication channels is constructed.
[0079] In one possible implementation, step S400 further includes:
[0080] Step S410: When the monitoring response result contains only the response data frame, it is considered that a response exists. The target communication channel is determined to extract the device information of the HART instrument and store it in the cache queue, generating the first determination result.
[0081] Step S420: When the monitoring response result only contains the timeout no response data frame, it is considered that there is no response. Then, an interrupt command is triggered to jump to the dynamic scanning gap of the next communication channel for iteration until a response exists, and a second determination result is generated.
[0082] Step S430: Based on the first determination result and the second determination result, perform query analysis to determine multiple query types.
[0083] Step S440: According to the multiple query types, traverse the monitoring response results and dynamically combine them with the converter device information to construct a combined data response frame.
[0084] Step S450: Add the combined data response frame to the combined data and feed it back to the converter backend.
[0085] Specifically, firstly, a pre-defined valid data pool is constructed. This pool is then matched one-to-one with the identification information of multiple HART communication channels, and a dedicated channel data slot is assigned to each channel for categorized data storage. The data frame type of the monitored response results is verified. When the result confirms that it contains only response data frames, a valid response is determined for the corresponding HART communication channel. The target communication channel is then precisely located, and the response data frame is deeply analyzed using its matched channel data slot to extract core device information from the HART instrument, including device address, model specifications, parameter configuration, and operating status. A valid identifier is added to the extracted device information to ensure data reliability. The content of the channel data slot corresponding to the target communication channel is updated synchronously. The identified device information is then stored in a cache queue according to a pre-defined data format, ultimately generating a first determination result marked with "valid response exists, target channel information, and cache record identifier."
[0086] The data frame composition of the monitoring response results is verified. When the confirmation result contains only a timeout no-response data frame, it is determined that the current HART communication channel has no valid response. Then, a preset interrupt jump instruction is triggered. This instruction is based on the preset channel scheduling order in the channel scanning timing table and accurately locates the dynamic scanning gap corresponding to the next communication channel. The scanning control focus is switched to the next communication channel through the interrupt controller, and a new round of parallel scanning is started using the previously configured time slot parameters. This iterative process continues until a response data frame appears in the monitoring response result of a certain communication channel, and it is determined that there is a valid response. Finally, a second judgment result marked "no response iteration completed, target response channel identifier, iteration count record" is generated to ensure that no valid communication channels are missed during the scanning process.
[0087] The system calls the judgment result parsing interface to extract the valid response identifier, target channel ID, cache record index, and HART instrument device information association marker from the first judgment result. It also collects core data fields such as the list of non-responding channels, iteration jump count, and final response channel identifier from the second judgment result. These two types of data are then integrated into a standardized judgment dataset according to the structure of "status identifier - channel information - associated record." Subsequently, a preset query rule base is loaded, containing trigger conditions for general and specific queries. For example, a general query corresponds to "multiple channel valid responses, no specific address pointing," while a specific query corresponds to "single target channel locked, including instrument address association requirements." The rule matching engine is then activated to traverse and compare the judgment dataset. Finally, a field matching algorithm is used for verification. If the dataset contains cached records for multiple valid response channels without specific address constraints, the general query judgment logic is triggered and marked as "general query". If the dataset contains a clear target channel ID or instrument device address information and meets the rule conditions of "single response channel" or "specific parameter reading requirement", the specific query judgment logic is activated and marked as "specific query". Finally, the matching results are deduplicated and classified by the query type classifier to generate a structured query type configuration table containing query type identifier, trigger basis, and associated channel information. At the same time, a mapping relationship between query type and judgment result data is established, and a query type instruction set that can be directly used for subsequent data combination is output, providing a clear execution basis for accurately constructing combined data response frames.
[0088] First, the converter device information, including core fields such as the device identifier, is read and associated with multiple query types. If the query type is a general query, the data validity pool reading interface is called to extract valid data from all channel data slots and generate a channel data content sequence according to channel order. The converter device identifier and the data content sequence are assembled and encapsulated according to a preset communication protocol format, and timing marks and data check codes are added to generate a general combined data response frame. If the query type is a specific query, the target instrument device address information is parsed first, and the data validity pool is accurately located based on the address to lock the corresponding target channel data slot. The integrity and validity of the data in the target channel data slot are verified by a data validity verification algorithm. If the verification is successful, a targeted parameter reading instruction is generated, the current parallel scanning task is paused, the instruction is sent through the target HART communication channel, and the response is listened for. After obtaining the parameter response data, it is structured and encapsulated with the converter device identifier and the target HART communication channel identifier, and a specific query identifier and address matching mark are added to generate a specific query combined data response frame, ensuring that the combined data response frames corresponding to different query types meet the data interaction specifications and usage requirements.
[0089] First, the combined data storage container is initialized. Following the priority order of query type (specific queries take precedence over general queries), the previously constructed general combined data response frames and specific query combined data response frames are added to this container sequentially. A data integration algorithm is used to remove duplicate fields within the frames and to complement them, ensuring the integrity and consistency of the combined data. Then, the data transmission interface of the converter's backend is called to perform protocol adaptation processing on the integrated combined data, matching the backend communication protocol format requirements and adding data verification codes, transmission timestamps, and frame sequence identifiers to improve the reliability of data transmission. Finally, the combined data is fed back to the converter's backend via a high-speed data bus, simultaneously generating a transmission completion confirmation signal and updating the data transmission status log to ensure the backend can accurately receive and parse the combined data, providing complete data source support for subsequent equipment control, parameter adjustment, and other operations.
[0090] In one possible implementation, step S410 further includes:
[0091] Step S411: Construct a valid data pool, match the valid data pool according to the multiple HART communication channels, and set multiple channel data slots according to the matching results.
[0092] Step S412: When the monitoring response result contains only the response data frame, extract the target communication channel and combine it with the multiple channel data slots to perform response analysis and determine the device information of the HART instrument.
[0093] Step S413: Effectively identify the device information of the HART instrument, update the multiple channel data slots, store them in the cache queue, and generate the first determination result.
[0094] Specifically, a fixed-capacity data validity pool is constructed using a memory partitioning management mechanism. This data validity pool supports data isolation storage based on channel identifiers. Unique identifiers for multiple HART communication channels, such as channel ID and communication address, are extracted through a channel information parsing interface. An identifier matching algorithm is then used to perform a one-to-one mapping between the unique identifier of each HART communication channel and the storage partition of the data validity pool. Based on the matching results, an independent channel data slot is allocated to each HART communication channel. Each channel data slot has a preset data storage area, data status identifier, timestamp record field, and checksum storage area. The data storage area stores the response data and HART instrument information for the corresponding channel. The status identifier marks data validity, the timestamp record field records the data update time, and the checksum storage area stores data integrity verification information, ensuring that the data for each HART communication channel can be stored independently, accurately distinguished, and traceable.
[0095] The data frame verification interface is invoked to perform type verification on the listening response result. After confirming that the result contains only response data frames and no timeout or no-response data frames, the channel identifier extraction engine is started to parse the unique identifier of the target communication channel, such as the channel ID and hardware address code, from the protocol field of the frame header of the response data frame. Then, through the channel data slot mapping interface, multiple configured channel data slots are traversed based on the unique identifier, and the dedicated data slot bound to the target communication channel is quickly located using the identifier hash matching algorithm. According to the field format specification of the HART communication protocol, the response data frame is imported into the corresponding channel data slot, and the core fields such as device address, model specification, operating parameters, and communication status are split in turn. The integrity of each field data is verified by the CRC check algorithm, and redundant padding data and fields with abnormal format are removed. At the same time, combined with the preset instrument equipment information parsing rules in the channel data slot, the split field data is format converted and semantically mapped to extract key equipment information such as the device address, model number, real-time operating parameters, and communication link status of the HART instrument. Finally, the data integration module assembles the information of each field into a standardized equipment information dataset to ensure the accuracy and usability of the data.
[0096] The data identification tool is invoked to add a unique and valid identifier to the identified HART instrument equipment information, including core data such as equipment address, model, and operating parameters. This identifier includes a data integrity check code, an extraction timestamp, and a target communication channel ID associated field, ensuring data traceability and reliability. Subsequently, through the channel data slot update interface, the equipment information with the valid identifier is written to its corresponding channel data slot, overwriting the original old data in the slot and synchronously updating the data status identifier to "valid". At the same time, according to the converter's preset cache storage format, the valid identifier equipment information is encapsulated by field structure and stored in a cache queue. The queue is sorted by data storage timestamp to support subsequent fast retrieval. Finally, key information such as "valid response status flag, target communication channel ID, cache queue storage index, and equipment information summary" are integrated to generate a standardized first judgment result.
[0097] In one possible implementation, step S440 further includes:
[0098] Step S441: When the multiple query types are general queries, read the converter device identifier, traverse the data valid pool to read the tags in sequence, and obtain the channel data content sequence.
[0099] Step S442: Assemble and calculate the converter device identifier and the channel data content sequence to generate a general combined data response frame.
[0100] Step S443: When the multiple query types are specific queries, read the target instrument device address information to locate the valid data pool and determine the target channel data slot.
[0101] Step S444: When verifying that the target channel data slot is valid, generate a parameter read command, interrupt the parallel scanning task, send the parameter read command through the target HART communication channel to listen for the response, and generate parameter response data.
[0102] Step S445: Encapsulate the parameter response data with the converter device identifier and the target HART communication channel to generate a specific query combination data response frame.
[0103] Specifically, when query analysis determines that multiple query types are general queries, a unique converter device identifier is extracted through the converter device information reading interface. This identifier includes core identification fields such as device model, communication protocol version, and hardware code. Then, the data valid pool traversal engine is started, and each channel data slot is accessed sequentially according to the preset arrangement order of multiple channel data slots. HART instrument device information marked as "valid" is filtered out by the data status identifier. During the reading process, a channel ID association mark and reading order number are added to each valid data. Finally, all valid data that meet the conditions are integrated into a structured channel data content sequence according to the reading order, ensuring the integrity, orderliness, and correlation of the data in the sequence with the corresponding channel.
[0104] The data assembly calculation engine is invoked. First, the converter device identifier, including core fields such as device model, communication protocol version, and hardware code, is used as the basic information of the frame header of the general combined data response frame. It is standardized and encapsulated according to the field order and format specified by the HART communication protocol, and a frame header identifier and protocol version mark are added. Then, the channel data content sequence, including the HART instrument device information of each valid channel and the corresponding channel ID and reading sequence number, is concatenated according to the structure of "frame header-channel data block-check segment". Each channel data block retains core fields such as device address, model, and operating parameters, and the format of each data block is ensured to be uniform through a field alignment algorithm. Next, CRC-16 check calculation is started to perform integrity verification on the assembled overall data, generate a check code and add it to the frame tail check segment. At the same time, auxiliary fields such as total data length, number of valid channels, and data generation timestamp are added. The frame structure is optimized through a data compression algorithm to improve transmission efficiency. Finally, a general combined data response frame that conforms to the communication interaction standard, is complete, and can be directly transmitted is generated.
[0105] When query analysis determines that multiple query types are specific queries, the system first extracts the target instrument device address information hidden in the query request through the query command parsing interface. This information includes core positioning fields such as the instrument's unique communication address and device number. Then, the data validity pool positioning engine is activated. Based on the target instrument device address information, an address matching index is constructed. The system traverses multiple channel data slots in the data validity pool that have been configured according to HART communication channels. Through an address hash mapping algorithm, the system accurately compares the channel data slots with the HART instrument device addresses stored in each channel data slot. The system then filters out channel data slots with completely matching addresses and identifies them as the target channel data slots corresponding to the target instrument. This ensures that the relevant data of the target instrument can be directly obtained or retrieved from this data slot, providing accurate data storage and positioning support for parameter reading and response frame construction for specific queries.
[0106] The data validity verification tool is invoked to perform multi-dimensional verification on the identified target channel data slots. This involves checking if the data status flag is "valid," if the data integrity check code matches, and if the extraction timestamp is within the valid timeframe. Once the validity of the HART instrument device information stored in the target channel data slot is confirmed, the parameter reading instruction generation engine is activated. Based on specific query requirements and the HART communication protocol specifications, a parameter reading instruction containing core fields such as the target instrument device address, the type of parameter to be read, and the data transmission format is constructed. Simultaneously, a scan interrupt mechanism is triggered, sending an interrupt signal through the interrupt controller to suspend the currently executing multi-channel operation. Parallel scanning tasks are performed to avoid data transmission conflicts. Subsequently, the generated parameter reading instructions are encapsulated according to the protocol format and sent to the corresponding HART instrument through the communication interface of the target HART communication channel. A dedicated listening timer is started to set a response timeout threshold. Feedback signals from the target HART communication channel are continuously monitored. If parameter data returned by the instrument is received within the timeout threshold, the data is parsed and CRC checked to remove redundant information and abnormal fields, generating structured parameter response data. If no feedback is received after the timeout threshold, a retry mechanism is triggered or a no-response prompt is generated to ensure that the parameter reading process for a specific query is complete and the data is valid.
[0107] The converter device identifier is retrieved through the device information interface, and the unique identifier of the target HART communication channel, such as the channel ID and communication address, is extracted. Then, the data encapsulation engine is started, and the parameter response data, including the target instrument's specific query parameters, data checksum, and response timestamp, is used as the core data segment. The converter device identifier is used as the frame header identifier segment, and the target HART communication channel identifier is used as the channel association segment. The data is arranged in a structured manner according to the field order specified by the HART communication protocol. During the encapsulation process, a specific query type marker, a target instrument device address confirmation field, and a data validity identifier are added. A field alignment algorithm is used to ensure that the format of each data segment is consistent. Then, the CRC-16 check algorithm is called to perform integrity verification on the overall encapsulated data, generate a checksum, and add it to the frame tail check segment. Finally, auxiliary fields such as data length and encapsulation timestamp are added, and the overall encapsulated data is optimized for protocol adaptation. This generates a specific query combination data response frame that conforms to the specific query interaction standard, has a complete data structure, and can be directly transmitted, ensuring that the converter backend can accurately identify and parse the specific parameter information of the target instrument.
[0108] Example 2, based on the same inventive concept as the multi-channel parallel scanning communication method of the converter in the foregoing examples, such as... Figure 2 As shown, this application provides a multi-channel parallel scanning communication system for a converter. The system and method embodiments in this application are based on the same inventive concept. The system includes:
[0109] The parallel scan task establishment module 10 is used to call up multiple HART communication channels of the converter to establish a parallel scan task and configure dynamic scan time slots based on the parallel scan task.
[0110] The adaptive allocation module 20 is used to adaptively allocate the dynamic scan time slots based on the instrument's historical response performance information of the multiple HART communication channels, and generate a channel scan timing table.
[0111] The monitoring response result generation module 30 is used to interrupt drive the multiple HART communication channels based on the channel scanning timing table, generate data reading instructions to monitor the response, and generate monitoring response results.
[0112] The query and read module 40 is used to make a judgment based on the monitoring response result, perform a query and read according to the judgment result, and determine the combined data to be returned to the converter.
[0113] Furthermore, the system is also used to implement the following functions:
[0114] The configuration parameters of the multiple HART communication channels are read using non-volatile memory to determine N HART communication channels, where N is a positive integer not greater than the maximum number of channels of the converter. Communication interface initialization parameters for the N HART communication channels are introduced. Based on the configuration parameters and the communication interface initialization parameters, the N HART communication channels are controlled in parallel to construct a parallel scanning task. Time slots are allocated across the N HART communication channels to determine N time slot control structures. Scheduling analysis is performed based on the N HART communication channels to set the channel scheduling order. The N time slot control structures are then arranged sequentially according to the channel scheduling order to configure the dynamic scanning time slots.
[0115] Furthermore, the system is also used to implement the following functions:
[0116] Active communication identification is performed based on the multiple HART communication channels to obtain multiple active data read signals; communication records are made based on the multiple active data read signals, and key communication performance indicators are set; the key communication performance indicators are associated with the timestamps of the multiple HART communication channels to construct historical performance records; the historical performance records are added to a circular data buffer for data response analysis to generate the instrument's historical response performance information.
[0117] Furthermore, the system is also used to implement the following functions:
[0118] The circular data buffer is traversed according to the scan cycle to perform effective data analysis, extracting M valid historical performance records for scan cycles, where M is a positive integer greater than 0; data analysis and identification are performed based on the M valid historical performance records to generate an analysis dataset; performance evaluation is performed based on the analysis dataset to calculate a comprehensive performance score; the multiple HART communication channels are sorted in descending order according to the comprehensive performance score to generate a sorting result; the length of the dynamic scan time slots is analyzed based on the sorting result to generate multiple suggested time slot lengths; the multiple suggested time slot lengths are matched with the dynamic scan time slots to construct the channel scan timing table.
[0119] Furthermore, the system is also used to implement the following functions:
[0120] Based on the scan cycle, capacity analysis is performed on the circular data buffer to extract a fixed-capacity FIFO queue; the fixed-capacity FIFO queue is used as a sliding window; performance records are recorded according to the scan cycle and the sliding window to construct a first performance record push queue; it is determined whether the first performance record push queue is saturated. If the first performance record push queue is saturated, it is sorted in descending order according to the record storage time; the storage time of the first-order record is matched with the performance record push queue to generate a data matching result, the data matching result is eliminated, the first performance record push queue is updated, and a second performance record push queue is generated; based on the second performance record push queue, effective data analysis is performed to define the effective historical performance records for the M scan cycles.
[0121] Furthermore, the system is also used to implement the following functions:
[0122] Based on the channel scan timing table, time slot parsing is performed, defining multiple time slot start time parameters and multiple time slot length parameters. A hardware timer is configured based on these parameters to control the timing of the multiple HART communication channels, capturing channel scan interrupt signals. In response to the interrupt signal, an interrupt service is executed, generating a data read instruction, which is sent to the multiple HART communication channels, and a response listening timer is started. The response listening timer monitors the multiple HART communication channels for timeouts, generating multiple data frames, including response data frames and timeout no-response data frames. The response data frames and timeout no-response frames are associated and stored with the multiple HART communication channels to construct the listening response result.
[0123] Furthermore, the system is also used to implement the following functions:
[0124] When the monitoring response result contains only the response data frame, it is considered that a response exists. The target communication channel is determined to extract the device information of the HART instrument and store it in the cache queue, generating a first determination result. When the monitoring response result contains only the timeout no response data frame, it is considered that no response exists. An interrupt instruction is triggered to jump to the dynamic scanning gap of the next communication channel for iteration until a response exists, generating a second determination result. Based on the first determination result and the second determination result, query analysis is performed to determine multiple query types. The monitoring response results are traversed according to the multiple query types and dynamically combined with the converter device information to construct a combined data response frame. The combined data response frame is added to the combined data and fed back to the converter backend.
[0125] Furthermore, the system is also used to implement the following functions:
[0126] A valid data pool is constructed, and the valid data pool is matched according to the multiple HART communication channels. Multiple channel data slots are set according to the matching results. When the monitoring response result contains only the response data frame, the target communication channel is extracted and the response is analyzed in combination with the multiple channel data slots to determine the device information of the HART instrument. The device information of the HART instrument is effectively identified, the multiple channel data slots are updated, and stored in the cache queue to generate the first determination result.
[0127] Furthermore, the system is also used to implement the following functions:
[0128] When the multiple query types are general queries, the converter device identifier is read, and the data valid pool is traversed to read the markers sequentially to obtain the channel data content sequence. The converter device identifier and the channel data content sequence are assembled and calculated to generate a general combined data response frame. When the multiple query types are specific queries, the target instrument device address information is read to locate the data valid pool and determine the target channel data slot. When the target channel data slot is verified to be valid, a parameter read instruction is generated, the parallel scanning task is interrupted, and the parameter read instruction is sent through the target HART communication channel to listen for the response and generate parameter response data. The parameter response data is encapsulated with the converter device identifier and the target HART communication channel to generate a specific query combined data response frame.
[0129] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this specification. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are possible or may be advantageous.
[0130] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
[0131] This specification and accompanying drawings are merely illustrative examples of this application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Therefore, if such modifications and variations fall within the scope of this application and its equivalents, this application intends to include such modifications and variations.
Claims
1. A multi-channel parallel scanning communication method for a converter, characterized in that, The method includes: Multiple HART communication channels of the converter are invoked to establish a parallel scanning task, and dynamic scanning time slots are configured based on the parallel scanning task; The dynamic scanning time slots are adaptively allocated based on the instrument's historical response performance information from the multiple HART communication channels to generate a channel scanning timing table; Based on the channel scanning timing table, interrupt driving is performed on the multiple HART communication channels to generate data reading instructions for listening response and generate listening response results. Based on the monitoring response result, a judgment is made, and the combined data is retrieved and returned to the converter according to the judgment result. The process of constructing historical response performance information for instruments across multiple HART communication channels includes the following methods: Active communication identification is performed based on the multiple HART communication channels to obtain multiple active data reading signals; Based on the multiple active data reading signals, communication records are made, and key communication performance indicators are set, specifically covering response latency, data transmission accuracy, link stability coefficient, and response success rate. The key communication performance indicators are associated with the timestamps of the multiple HART communication channels to construct historical performance records; Based on the historical performance records, data response analysis is performed by adding them to the circular data buffer to generate the instrument's historical response performance information. The method includes determining the combined data to be returned to the converter based on the monitoring response result, querying and reading according to the determination result, and then performing the following steps: When the monitoring response result contains only a response data frame, it is considered that a response exists. The target communication channel is determined to extract the device information of the HART instrument and store it in the cache queue to generate the first judgment result. If the monitoring response result only contains a timeout no response data frame, it is considered that there is no response. An interrupt command is triggered to jump to the dynamic scanning gap of the next communication channel for iteration until a response is found, and a second determination result is generated. Based on the first and second determination results, query analysis is performed to determine multiple query types; The monitoring response results are dynamically combined with the converter device information according to the multiple query types to construct a combined data response frame. The combined data response frame is added to the combined data and fed back to the converter backend; Wherein, when the monitoring response result contains only the response data frame, it is considered that a response exists. The target communication channel is determined to extract the device information of the HART instrument and store it in the buffer queue to generate a first determination result. The method includes: Construct a valid data pool, match the valid data pool according to the multiple HART communication channels, and set multiple channel data slots according to the matching results; When the monitoring response result contains only the response data frame, the target communication channel is extracted and combined with the multiple channel data slots to perform response analysis and determine the device information of the HART instrument. The device information of the HART instrument is effectively identified, the multiple channel data slots are updated, and stored in the cache queue to generate the first determination result; The method for constructing a combined data response frame by dynamically combining the monitoring response results with converter device information according to the multiple query types includes: When the multiple query types are general queries, the converter device identifier is read, including the device model, communication protocol version, and hardware code. The valid data pool is traversed to read the tags in turn to obtain the channel data content sequence. The converter device identifier and the channel data content sequence are assembled and calculated to generate a general combined data response frame; When the multiple query types are specific queries, the target instrument device address information is read to locate the valid data pool, including the instrument's unique communication address and device number, and to determine the target channel data slot. When the target channel data slot is verified to be valid, a parameter read command is generated, the parallel scanning task is interrupted, the parameter read command is sent through the target HART communication channel to listen for the response, and parameter response data is generated. The parameter response data is encapsulated with the converter device identifier and the target HART communication channel to generate a specific query combination data response frame.
2. The multi-channel parallel scanning communication method for the converter as described in claim 1, characterized in that, The method involves retrieving multiple HART communication channels from the converter to establish a parallel scan task, and configuring dynamic scan time slots based on the parallel scan task. The configuration parameters of the multiple HART communication channels are read based on the non-volatile memory to determine N HART communication channels, where N is a positive integer not greater than the maximum number of channels of the converter; Introduce the communication interface initialization parameters for the N HART communication channels; Based on the configuration parameters and the initialization parameters of the communication interface, the N HART communication channels are controlled in parallel to construct a parallel scanning task. The N HART communication channels are traversed to allocate time slots, and N time slot control structures are determined. Based on the scheduling analysis of the N HART communication channels, the channel scheduling order is set, and the N time slot control structures are arranged sequentially according to the channel scheduling order to configure the dynamic scanning time slots.
3. The multi-channel parallel scanning communication method for the converter as described in claim 1, characterized in that, The dynamic scan time slots are adaptively allocated based on the instrument's historical response performance information from the multiple HART communication channels to generate a channel scan timing table. The method includes: The circular data buffer is traversed according to the scan cycle to perform effective data analysis and extract valid historical performance records for M scan cycles, where M is a positive integer greater than 0. Data analysis and identification are performed based on the effective historical performance records of the M scan cycles to generate an analysis dataset. Based on the analyzed dataset, a performance evaluation is performed, and a comprehensive performance score is calculated. The multiple HART communication channels are sorted in descending order according to the comprehensive performance score to generate a sorting result; Based on the sorting results, the length of the dynamic scanning time slot is analyzed to generate multiple suggested time slot lengths; The suggested time slot lengths are matched with the dynamic scan time slots to construct the channel scan timing table.
4. The multi-channel parallel scanning communication method for the converter as described in claim 3, characterized in that, The circular data buffer is traversed according to the scan cycle to perform effective data analysis and extract valid historical performance records for M scan cycles. The method includes: Based on the scan cycle, perform capacity analysis on the circular data buffer and extract a fixed-capacity first-in-first-out queue; The fixed-capacity first-in-first-out queue is used as a sliding window; Performance records are generated according to the scanning cycle and the sliding window, and the first performance record is pushed into the queue. Determine whether the first performance record push queue is saturated. If the first performance record push queue is saturated, sort them in descending order according to the record storage time. Based on the storage time of the first-order record, the data matching result is generated by matching the performance record pushed into the queue. The data matching result is then eliminated, the first performance record pushed into the queue is updated, and a second performance record is pushed into the queue. Based on the second performance record being pushed into the queue for effective data analysis, the effective historical performance records for the M scan cycles are defined.
5. The multi-channel parallel scanning communication method for the converter as described in claim 1, characterized in that, Based on the channel scan timing table, interrupt driving is performed on the multiple HART communication channels to generate data read commands for listening responses and generate listening response results. The method includes: Based on the channel scanning timing table, time slot parsing is performed, and multiple time slot start time parameters and multiple time slot length parameters are defined; Based on the multiple time slot start time parameters and the multiple time slot length parameters, a hardware timer is configured to perform timing control on the multiple HART communication channels and capture channel scan interrupt signals. In response to the channel scan interrupt signal, an interrupt service is executed, a data read instruction is generated and sent to multiple HART communication channels, and a response listening timer is started; The response monitoring timer monitors the multiple HART communication channels for timeouts and generates multiple data frames, including response data frames and timeout no response data frames. The response data frame, the timeout no response data frame, and the multiple HART communication channels are associated and stored to construct the monitoring response result.
6. A multi-channel parallel scanning communication system for a converter, characterized in that, The system is used to implement the multi-channel parallel scanning communication method of the converter according to any one of claims 1-5, the system comprising: The parallel scan task establishment module is used to call up multiple HART communication channels of the converter to establish a parallel scan task and configure dynamic scan time slots based on the parallel scan task. An adaptive allocation module is used to adaptively allocate the dynamic scan time slots based on the instrument's historical response performance information of the multiple HART communication channels, and generate a channel scan timing table. The monitoring response result generation module is used to drive the multiple HART communication channels to interrupt based on the channel scanning timing table, generate data reading instructions to monitor the response, and generate monitoring response results. The query and read module is used to make a judgment based on the monitoring response result, perform a query and read based on the judgment result, and determine the combined data to be returned to the converter.
Citation Information
Patent Citations
Data transmission method and device, electronic equipment and storage medium
CN118573623A
Multi-channel HART dynamic communication system
CN120567633A