High-timeliness intelligent acquisition method based on serial port multi-device acquisition

By adopting a serial-based multi-device acquisition method in the field of intelligent cabinet data acquisition and monitoring, the problem of low timeliness of multi-device data acquisition is solved, and intelligent acquisition is achieved with high timeliness, avoiding the acquisition window period and resource waste, and ensuring the accuracy and completeness of the data.

CN119829378APending Publication Date: 2025-04-15BEIJING ZHONGYI YUETAI SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411914677.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the field of intelligent cabinet data acquisition and monitoring, there is a problem of low timeliness when collecting data from multiple devices on the same serial port, especially the delayed reporting of key alarm information. When the existing technology improves the timeliness of high real-time data acquisition, there is a risk of data loss or abnormality.

Method used

The multi-device acquisition method based on the serial port is adopted to achieve high-time intelligent acquisition through configuring equipment and measurement points, setting command sending and receiving parameters, dividing measurement points and configuration acquisition ratios, uniformly distributed arrangement of instructions, command sending and receiving and data acquisition, monitoring and fault processing, etc.

Benefits of technology

It effectively avoids the occurrence of the acquisition window period, improves the timeliness and controllability of the acquisition, maximizes the avoidance of resource waste, improves the overall acquisition response speed, and ensures the accuracy and completeness of the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829378A_ABST
    Figure CN119829378A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data acquisition and processing, and discloses a high-timeliness intelligent acquisition method based on serial port multi-device acquisition. The method comprises the following specific use steps of S1, configuring equipment and measuring points; S2, setting instruction receiving and transmitting parameters; S3, dividing the measuring points and configuring an acquisition ratio; S4, storing configuration information; according to the invention, by introducing a uniformly distributed acquisition mode, the data acquisition efficiency is greatly improved, and in the same acquisition polling time, the mode can ensure that instructions are uniformly distributed in an acquisition period, so that the occurrence of an acquisition window period is effectively avoided, the acquisition timeliness is remarkably improved, and meanwhile, the data acquisition efficiency is improved. The acquisition mode has very high controllability and can be flexibly adjusted according to actual requirements, and resource waste is avoided to the maximum extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of data acquisition and processing, and specifically relates to a high-timeliness intelligent acquisition method based on serial port multi-device acquisition. Background Art

[0002] In the field of intelligent cabinet data collection and monitoring, in the face of the low timeliness problem when collecting data from multiple devices through the same serial port, especially the delayed reporting of key alarm information, intelligent collection technology has emerged. This technology can realize timely reporting of important measurement points according to user needs, and adopt a non-instant collection strategy for non-critical measurement points, thereby effectively solving the problem of timeliness and priority management in multi-device data collection. The existing technology usually divides equipment measurement points into two categories: high real-time and low real-time requirements. By reducing the number of collections of low real-time measurement points and increasing the collection frequency of high real-time measurement points in the same collection cycle, the timeliness of high real-time data collection is improved. However, this method has two major defects: first, when collecting low real-time measurement points, if the data of high real-time measurement points changes during this period, it cannot be collected and reported in time, resulting in a collection window period; second, if the amount of data required by the user is large, frequent data collection may reduce the system collection efficiency and performance, and in severe cases may even cause data loss or abnormality, affecting the accuracy and reliability of data monitoring. Summary of the invention

[0003] The purpose of the present invention is to provide a high-timeliness intelligent acquisition method based on serial port multi-device acquisition to solve the problems raised in the above background technology.

[0004] In order to achieve the above object, the present invention provides the following technical solution: a high-timeliness intelligent acquisition method based on serial port multi-device acquisition, the specific use steps of the method are as follows:

[0005] S1: Configure equipment and measuring points: User-required equipment measuring point configuration and TCP communication initialization:

[0006] S2: Set the command sending and receiving parameters: configure the key collection parameters as required, and send them to the monitoring host through TCP communication to ensure the correct execution of the task;

[0007] S3: Divide the measurement points and configure the collection ratio: The measurement point classification and collection ratio configuration are sent to the monitoring host;

[0008] S4: Save configuration information: The monitoring host receives the S1-S3 configuration and creates a SQLite table for storage, which is convenient for subsequent query and update;

[0009] S5: Command assembly and storage: The monitoring host assembles the measurement point commands according to the protocol and stores them in the Map container for subsequent collection tasks;

[0010] S6: Evenly distributed instructions: instructions are distributed according to the collection ratio, the order is determined according to n / k, and the instructions are stored in the Map container to ensure efficient and orderly collection;

[0011] S7: Command transmission and data collection: The monitoring host receives and transmits commands according to the configuration, monitors the communication, handles exceptions, and reconnects in case of failure;

[0012] S8: Monitoring and troubleshooting: The monitoring host continuously monitors and collects data. If a fault occurs, it will reconnect and record to ensure efficient and stable collection.

[0013] Preferably, configuring the devices and measuring points in S1 refers to carefully sorting out all the devices and corresponding measuring points that need to be monitored according to user needs to ensure that the monitoring scope is comprehensive and without omissions. Subsequently, using the TCP communication protocol, the detailed configuration information of these devices and measuring points is sent to the monitoring host for efficient storage and initialization, laying a solid foundation for the smooth implementation of subsequent monitoring tasks.

[0014] Preferably, the specific steps of setting the instruction sending and receiving parameters in S2 are as follows:

[0015] Step 1: Configure key parameters

[0016] According to actual needs, carefully configure the acquisition cycle, frame sending interval, number of failed retransmissions, number of communication abnormality judgments, fault reconnection interval, and timeout judgment key parameters. The settings of these parameters will directly affect the efficiency and accuracy of data collection, so they need to be accurately adjusted according to the specific application scenario;

[0017] Step 2: Integrate parameter information

[0018] Integrate the configured parameter information to form a complete parameter configuration file or data packet, ensure that the parameter information is accurate and meets the data format requirements of the TCP communication protocol, so that it can be successfully sent to the monitoring host later;

[0019] Step 3: Send parameters via TCP communication

[0020] Use the TCP communication protocol to send the integrated parameter information to the monitoring host. During the sending process, it is necessary to ensure that the communication link is stable and reliable to avoid data loss or transmission errors. After receiving the parameters, the monitoring host will parse and store them.

[0021] Preferably, the specific steps of dividing the measuring points and configuring the collection ratio in S3 are as follows:

[0022] Step 1: Measurement point classification

[0023] First, according to actual needs, all measurement points are clearly divided into two categories: measurement points with high real-time requirements and measurement points with low real-time requirements;

[0024] Step 2: Configure the collection ratio

[0025] Next, according to actual needs, configure the collection ratio for the measurement points with high real-time requirements and the measurement points with low real-time requirements;

[0026] Step 3: Send to the monitoring host via TCP communication

[0027] Finally, the configured measurement point classification and collection ratio information are sent to the monitoring host through the TCP communication protocol.

[0028] Preferably, saving the configuration information in S4 means that when all the configuration data sent from S1 to S3 are received, the monitoring host will immediately receive and process them. The data includes but is not limited to the configuration of the equipment measuring points and the key information of the instruction receiving and sending parameters. In order to ensure the accuracy and traceability of these configuration information, the monitoring host will automatically create a SQLite database table based on the received configuration information. In this database table, all the configuration information will be recorded and saved in detail. Such a design not only facilitates the subsequent query and update of the configuration information, but also ensures the stability and reliability of the entire data acquisition and monitoring system.

[0029] Preferably, the instruction assembly and storage in S5 means that after the monitoring host receives the configuration information of all measuring points, it will assemble instructions for all measuring points according to the specific positions of the measuring points in the communication protocol, and the assembled instructions will be stored in a map container, which uses the measuring point identifier as the key and the corresponding instruction as the value.

[0030] Preferably, the specific steps of evenly distributing the instructions in S6 are as follows:

[0031] Step 1: Evenly spread instructions

[0032] According to the collection ratio, all assembled instructions are evenly distributed to ensure that the instructions are evenly distributed during the collection cycle to avoid the concentration and idleness of collection tasks;

[0033] Step 2: Determine the collection order

[0034] According to the ratio of the number of instructions n assembled at the measurement points with low real-time requirements to the number of collection times k per polling at the measurement points with high real-time requirements, a reasonable instruction collection sequence is calculated to ensure that the measurement points with high real-time requirements can be collected first;

[0035] Step 3: Store instructions and execute

[0036] The arranged instructions are stored in the corresponding map container in order, and an index is provided for the collection task. When the collection task is executed, data is collected in the order of the instructions in the map container to ensure that the collection task can be carried out efficiently and orderly.

[0037] Preferably, the instruction reception and sending and data collection in S7 refers to the monitoring host taking out instructions from the map container in sequence to perform data reception and sending operations according to the preset sending frame interval and the number of failed retransmission configuration parameters. During the entire process of data collection, the monitoring host continuously monitors the communication status. Once a timeout or communication abnormality is found, the corresponding processing mechanism is immediately activated to resend the instruction; if the fault persists, the monitoring host will try to reconnect to the device according to the configured fault reconnection interval to ensure the continuity and stability of data collection.

[0038] Preferably, the specific steps of monitoring and troubleshooting in S8 are as follows:

[0039] Step 1: Continuously monitor the collection task

[0040] The monitoring host needs to continuously monitor the execution status of all collection tasks and ensure that all devices are in normal collection work through real-time detection;

[0041] Step 2: Reconnect after a fault and record information

[0042] Once a communication anomaly or device failure is detected, the monitoring host needs to respond quickly and try to reconnect to the device according to the preset fault reconnection interval, while recording the fault information in detail for subsequent fault analysis and processing;

[0043] Step 3: Ensure the acquisition process is stable

[0044] Through continuous monitoring and efficient fault handling mechanisms, the monitoring host can ensure that the entire data collection process remains highly timely and stable, thereby improving the overall performance and reliability of the system.

[0045] The beneficial effects of the present invention are as follows:

[0046] The present invention achieves a significant improvement in data collection efficiency by introducing a uniformly distributed collection method. Within the same collection polling time, this method can ensure that instructions are evenly distributed within the collection cycle, thereby effectively avoiding the occurrence of collection windows and significantly improving the timeliness of collection. At the same time, this collection method has high controllability and can be flexibly adjusted according to actual needs, thereby maximizing the avoidance of resource waste. By accurately configuring collection parameters and intelligent optimization algorithms, the overall collection response speed is further improved, ensuring the accuracy and completeness of the data. This innovative collection method not only improves the efficiency and quality of data collection, but also provides more reliable and timely data support for subsequent data analysis and decision-making, and has broad application prospects and important practical value. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flow chart of the processing method of the present invention; DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] like Figure 1 As shown, the embodiment of the present invention provides a high-timeliness intelligent acquisition method based on serial port multi-device acquisition, and the specific use steps of the method are as follows:

[0050] S1: Configure equipment and measuring points: User-required equipment measuring point configuration and TCP communication initialization:

[0051] S2: Set the command sending and receiving parameters: configure the key collection parameters as required, and send them to the monitoring host through TCP communication to ensure the correct execution of the task;

[0052] S3: Divide the measurement points and configure the collection ratio: The measurement point classification and collection ratio configuration are sent to the monitoring host;

[0053] S4: Save configuration information: The monitoring host receives S1-S3 configurations and creates a SQLite table for storage, which is convenient for subsequent query and update;

[0054] S5: Command assembly and storage: The monitoring host assembles the measurement point commands according to the protocol and stores them in the Map container for subsequent collection tasks;

[0055] S6: Evenly distributed instructions: instructions are distributed according to the acquisition ratio, the order is determined according to n / k, and the instructions are stored in the Map container to ensure efficient and orderly acquisition;

[0056] S7: Command transmission and data collection: The monitoring host receives and transmits commands according to the configuration, monitors the communication, handles exceptions, and reconnects in case of failure;

[0057] S8: Monitoring and troubleshooting: The monitoring host continuously monitors and collects data. If a fault occurs, it will reconnect and record to ensure efficient and stable collection.

[0058] Among them, configuring devices and measuring points in S1 means carefully sorting out all the devices and corresponding measuring points that need to be monitored according to user needs to ensure that the monitoring scope is comprehensive and without omissions. Subsequently, using the TCP communication protocol, the detailed configuration information of these devices and measuring points is sent to the monitoring host for efficient storage and initialization, laying a solid foundation for the smooth implementation of subsequent monitoring tasks.

[0059] Configuring devices and measuring points is a key step in the deployment of a monitoring system. It requires a comprehensive review of the devices and their corresponding measuring points to be monitored based on user needs, ensuring that the monitoring scope is comprehensive and complete. Subsequently, the detailed configuration information of these devices and measuring points is accurately sent to the monitoring host using the TCP communication protocol. This process not only achieves efficient storage and initialization of information, but also provides a solid foundation for the smooth implementation of subsequent monitoring tasks, ensuring that the monitoring system can comprehensively and accurately monitor the target devices and measuring points, and improving the overall efficiency and reliability of the system.

[0060] The specific steps of setting the instruction sending and receiving parameters in S2 are as follows:

[0061] Step 1: Configure key parameters

[0062] According to actual needs, carefully configure the acquisition cycle, frame sending interval, number of failed retransmissions, number of communication abnormality judgments, fault reconnection interval, and timeout judgment key parameters. The settings of these parameters will directly affect the efficiency and accuracy of data collection, so they need to be accurately adjusted according to the specific application scenario;

[0063] Step 2: Integrate parameter information

[0064] Integrate the configured parameter information to form a complete parameter configuration file or data packet, ensure that the parameter information is accurate and meets the data format requirements of the TCP communication protocol, so that it can be successfully sent to the monitoring host later;

[0065] Step 3: Send parameters via TCP communication

[0066] The integrated parameter information is sent to the monitoring host using the TCP communication protocol. During the sending process, it is necessary to ensure that the communication link is stable and reliable to avoid data loss or transmission errors. After receiving the parameters, the monitoring host will parse and store them so that it can correctly understand and execute the collection tasks later.

[0067] The benefit of setting the command receiving and sending parameters is that, first of all, key parameters such as the acquisition cycle and the frame interval can be accurately adjusted to optimize the efficiency and accuracy of data acquisition. Secondly, the parameter information is integrated to form a complete configuration file to ensure that the data is accurate and complies with the communication protocol, avoiding data transmission problems caused by format errors. Finally, the parameters are stably sent to the monitoring host through TCP communication, which ensures the reliability and timeliness of parameter configuration, provides a solid foundation for the monitoring host to correctly understand and execute the acquisition tasks, and thus improves the performance and stability of the entire data acquisition system.

[0068] The specific steps of dividing the measuring points and configuring the collection ratio in S3 are as follows:

[0069] Step 1: Measurement point classification

[0070] First, according to actual needs, all measurement points are clearly divided into two categories: high real-time demand measurement points and low real-time demand measurement points. This step is the basis for the subsequent configuration of the collection ratio and is also the key to ensuring data collection efficiency and accuracy.

[0071] Step 2: Configure the collection ratio

[0072] Next, according to actual needs, configure the collection ratio for high real-time demand measurement points and low real-time demand measurement points, such as k:1 (k is the number of collections per polling of high real-time measurement points). This step needs to be reasonably set according to the real-time requirements and resource conditions of the system to ensure the efficiency and accuracy of data collection.

[0073] Step 3: Send to the monitoring host via TCP communication

[0074] Finally, the configured measurement point classification and collection ratio information is sent to the monitoring host through the TCP communication protocol. During the sending process, the accuracy and integrity of the data need to be ensured so that the monitoring host can correctly understand and execute subsequent collection tasks. At the same time, the stability and reliability of the communication link also need to be ensured to avoid data loss or transmission errors.

[0075] Taking the example in step 3 as an example, assume that the number of instructions assembled at the low real-time demand measurement point is n, and the collection ratio is k:1, where k is the number of collection times for each polling of the high real-time demand measurement point. First, compare the sizes of n and k. If n is greater than k, then calculate the value of n / k. If n / k is greater than 1 and less than 2, it means that the number of instructions assembled at the low real-time demand measurement point is more than the number of collection times for each polling of the high real-time demand measurement point, but it is not twice as much. At this time, the order should be to complete the collection of all instructions at the high real-time demand measurement point once for each instruction collection of the low real-time demand measurement point. If n / k is greater than 2 and less than 3, the number of instructions assembled at the low real-time demand measurement point is more than twice the number of collection times for each polling of the high real-time demand measurement point, but it is not three times as much. At this time, the order should be to complete the collection of all instructions at the high real-time demand measurement point once for each instruction collection of the low real-time demand measurement point.

[0076] And so on; if n is less than k, then calculate the value of k / n. If k / n is greater than 1 and less than 2, it means that the number of collections per poll at the high real-time demand test point is more than the number of assembled instructions at the low real-time demand test point, but not twice. At this time, the order should be to complete the collection of all instructions at the high real-time demand test point once for each instruction collection at the low real-time demand test point. If k / n is greater than 2 and less than 3, it means that the number of collections per poll at the high real-time demand test point is more than twice the number of assembled instructions at the low real-time demand test point, but not three times. At this time, the order should be to complete the collection of all instructions at the high real-time demand test point twice for each instruction collection at the low real-time demand test point. And so on. The above is a uniformly distributed arrangement. After the uniformly distributed arrangement is completed, all instructions are stored in the corresponding map container in the order of arrangement.

[0077] Among them, saving the configuration information in S4 means that when all the configuration data sent from S1 to S3 are received, the monitoring host will immediately receive and process them. The data includes but is not limited to the configuration of the equipment measuring points and the key information of the instruction receiving and sending parameters. In order to ensure the accuracy and traceability of these configuration information, the monitoring host will automatically create a SQLite database table based on the received configuration information. In this database table, all the configuration information will be recorded and saved in detail. This design not only facilitates the subsequent query and update of the configuration information, but also ensures the stability and reliability of the entire data acquisition and monitoring system.

[0078] By automatically creating SQLite database tables and recording all configuration information in detail, the accuracy and traceability of the data are ensured. Secondly, this design greatly facilitates the subsequent query and update of configuration information, improving the efficiency of system maintenance. Finally, preserving the integrity of configuration information is crucial to ensuring the stability and reliability of the entire data acquisition and monitoring system. It helps to discover and fix potential problems in a timely manner, thereby ensuring the continuous and efficient operation of the system. This approach provides strong support for the long-term stable operation of the system.

[0079] Among them, the command assembly and storage in S5 refers to the fact that after the monitoring host receives the configuration information of all the measuring points, it will assemble the instructions for all the measuring points according to the specific positions of the measuring points in the communication protocol. This step is the key to ensure that the subsequent data collection tasks can proceed smoothly. The assembled instructions will be stored in a map container, which uses the measuring point identifier as the key and the corresponding instruction as the value, so as to facilitate quick search and use in subsequent collection tasks, thereby improving the efficiency and accuracy of data collection.

[0080] By assembling instructions according to the position of the measuring point in the communication protocol, the smooth progress of the data collection task is ensured. The assembled instructions are stored in the map container in an orderly manner, with the measuring point identifier as the key and the instruction as the value. This design greatly improves the efficiency of finding instructions in subsequent collection tasks. This efficient storage and search method not only speeds up data collection, but also improves the accuracy of data, provides reliable guarantee for real-time monitoring and data analysis, and enhances the overall performance of the system and user experience.

[0081] The specific steps of evenly distributing the instructions in S6 are as follows:

[0082] Step 1: Evenly spread instructions

[0083] According to the collection ratio, all assembled instructions are evenly distributed to ensure that the instructions are evenly distributed during the collection cycle to avoid the concentration and idleness of collection tasks;

[0084] Step 2: Determine the collection order

[0085] According to the ratio of the number of instructions n assembled at the measurement points with low real-time requirements to the number of collection times k per polling at the measurement points with high real-time requirements, a reasonable instruction collection sequence is calculated to ensure that the measurement points with high real-time requirements can be collected first;

[0086] Step 3: Store instructions and execute

[0087] The arranged instructions are stored in the corresponding map container in order, and an index is provided for the collection task. When the collection task is executed, data is collected in the order of the instructions in the map container to ensure that the collection task can be carried out efficiently and orderly.

[0088] Evenly distributing instructions brings many benefits. First, it ensures that instructions are evenly distributed during the collection cycle, avoiding the concentration and idleness of collection tasks, and improving collection efficiency. Secondly, by reasonably calculating the order of instruction collection, the measurement points with high real-time requirements are given priority, ensuring the timeliness and accuracy of data collection. Finally, the arranged instructions are stored in the map container, providing a clear index for the collection task, so that the collection task can be executed efficiently and orderly. This series of steps not only improves the collection performance of the system, but also enhances the stability and reliability of the system, providing strong support for data analysis and decision-making.

[0089] Among them, the command reception and data collection in S7 refers to the monitoring host taking out the commands from the map container in sequence to perform data reception and transmission operations according to the preset configuration parameters such as the sending frame interval and the number of failed retransmissions. During the entire process of data collection, the monitoring host continuously monitors the communication status. Once a timeout or communication anomaly is found, the corresponding processing mechanism is immediately activated to resend the command. If the fault persists, the monitoring host will try to reconnect to the device according to the configured fault reconnection interval to ensure the continuity and stability of data collection. This series of operations is designed to improve the reliability of the system and the accuracy of data collection.

[0090] Through the preset configuration parameters such as the frame transmission interval and the number of failed retransmissions, the monitoring host can efficiently and orderly perform data transmission and reception operations. At the same time, it continuously monitors the communication status and immediately handles timeouts or communication anomalies to ensure the continuity and stability of data collection. If a failure occurs, the monitoring host can quickly try to reconnect to the device according to the configured failure reconnection interval, further improving the reliability of the system. This series of operations not only improves the accuracy of data collection, but also enhances the overall performance and stability of the system, providing strong support for data analysis and decision-making.

[0091] The specific steps of monitoring and troubleshooting in S8 are as follows:

[0092] Step 1: Continuously monitor the collection task

[0093] The monitoring host needs to continuously monitor the execution status of all collection tasks and ensure that all devices are in normal collection work through real-time detection;

[0094] Step 2: Reconnect after a fault and record information

[0095] Once a communication anomaly or device failure is detected, the monitoring host needs to respond quickly and try to reconnect to the device according to the preset fault reconnection interval, while recording the fault information in detail for subsequent fault analysis and processing;

[0096] Step 3: Ensure the acquisition process is stable

[0097] Through continuous monitoring and efficient fault handling mechanisms, the monitoring host can ensure that the entire data collection process remains highly timely and stable, thereby improving the overall performance and reliability of the system.

[0098] The continuous monitoring and fault handling mechanism brings significant benefits to the data acquisition system. By continuously monitoring the execution status of the acquisition task, it can ensure that all devices are in normal acquisition work, effectively avoiding data loss or errors. Once a communication anomaly or device failure is found, the monitoring host can respond quickly, try to reconnect the device according to the preset fault reconnection interval, and record the fault information at the same time, providing strong support for subsequent fault analysis and processing. This mechanism not only improves the timeliness and stability of data acquisition, but also enhances the overall performance and reliability of the system, providing a solid guarantee for data-driven decision-making.

[0099] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0100] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A high-efficiency intelligent acquisition method based on serial port multi-device acquisition, characterized by: The specific steps of using this method are as follows: S1: Configure equipment and measuring points: User-required equipment measuring point configuration and TCP communication initialization: S2: Set the command sending and receiving parameters: configure the key collection parameters as required, and send them to the monitoring host through TCP communication to ensure the correct execution of the task; S3: Divide the measurement points and configure the collection ratio: The measurement points are classified according to the real-time requirements and the collection ratio is configured and sent to the monitoring host; S4: Save configuration information: The monitoring host receives S1-S3 configurations and creates a sqlite table for storage, which is convenient for subsequent query and update; S5: Command assembly and storage: The monitoring host assembles the measurement point commands according to the protocol and stores them in the Map container for subsequent collection tasks; S6: Uniformly distributed arrangement: Compare the size of the collection ratio k and the number of instructions n to specify the collection order of instructions by the ratio of n / k or k / n, and store them in the Map container to ensure efficient and orderly collection; S7: Command transmission and data collection: The monitoring host receives and transmits commands according to the configuration, monitors the communication, handles exceptions, and reconnects in case of failure; S8: Monitoring and troubleshooting: The monitoring host continuously monitors and collects data. If a fault occurs, it will reconnect and record to ensure efficient and stable collection.

2. According to claim 1, a highly timely intelligent acquisition method based on serial port multi-device acquisition is characterized in that: Configuring devices and measuring points in S1 means carefully sorting out all the devices and corresponding measuring points that need to be monitored according to user needs to ensure that the monitoring scope is comprehensive and without omissions. Subsequently, the detailed configuration information of these devices and measuring points is sent to the monitoring host using the TCP communication protocol for efficient storage and initialization, laying a solid foundation for the smooth implementation of subsequent monitoring tasks.

3. According to claim 1, a highly timely intelligent acquisition method based on serial port multi-device acquisition is characterized in that: The specific steps of setting the instruction sending and receiving parameters in S2 are as follows: Step 1: Configure key parameters According to actual needs, carefully configure the acquisition cycle, frame sending interval, number of failed retransmissions, number of communication abnormality judgments, fault reconnection interval, and timeout judgment key parameters. The settings of these parameters will directly affect the efficiency and accuracy of data collection, so they need to be accurately adjusted according to the specific application scenario; Step 2: Integrate parameter information Integrate the configured parameter information to form a complete parameter configuration file or data packet, ensure that the parameter information is accurate and meets the data format requirements of the TCP communication protocol, so that it can be successfully sent to the monitoring host later; Step 3: Send parameters via TCP communication Use the TCP communication protocol to send the integrated parameter information to the monitoring host. During the sending process, it is necessary to ensure that the communication link is stable and reliable to avoid data loss or transmission errors. After receiving the parameters, the monitoring host will parse and store them.

4. According to claim 1, a highly timely intelligent acquisition method based on serial port multi-device acquisition is characterized in that: The specific steps of dividing the measuring points and configuring the acquisition ratio in S3 are as follows: Step 1: Measurement point classification First, according to actual needs, all measurement points are clearly divided into two categories: measurement points with high real-time requirements and measurement points with low real-time requirements; Step 2: Configure the collection ratio Next, according to actual needs, configure the collection ratio for the measurement points with high real-time requirements and the measurement points with low real-time requirements; Step 3: Send to the monitoring host via TCP communication Finally, the configured measurement point classification and collection ratio information are sent to the monitoring host through the TCP communication protocol.

5. According to claim 1, a highly timely intelligent acquisition method based on serial port multi-device acquisition is characterized in that: Saving the configuration information in S4 means that when the monitoring host receives all the configuration data sent from S1 to S3, it will immediately receive and process it. The data includes but is not limited to the configuration of the equipment measuring points and the key information of the command receiving and sending parameters. In order to ensure the accuracy and traceability of these configuration information, the monitoring host will automatically create a sqlite database table based on the received configuration information. In this database table, all the configuration information will be recorded and saved in detail. This design not only facilitates the subsequent query and update of the configuration information, but also ensures the stability and reliability of the entire data acquisition and monitoring system.

6. The high-timeliness intelligent acquisition method based on serial port multi-device acquisition according to claim 1 is characterized in that: The instruction assembly and storage in S5 means that after receiving the configuration information of all measuring points, the monitoring host will assemble instructions for all measuring points according to the specific positions of the measuring points in the communication protocol. The assembled instructions will be stored in a map container, which uses the measuring point identifier as the key and the corresponding instruction as the value.

7. The high-timeliness intelligent acquisition method based on serial port multi-device acquisition according to claim 1 is characterized in that: The specific steps of evenly distributing the instructions in S6 are as follows: Step 1: Evenly spread out the instructions According to the collection ratio, all assembled instructions are evenly distributed to ensure that the instructions are evenly distributed during the collection cycle to avoid the concentration and idleness of collection tasks; Step 2: Determine the collection order According to the ratio of the number of instructions n assembled at the measurement points with low real-time requirements to the number of collection times k per polling at the measurement points with high real-time requirements, a reasonable instruction collection sequence is calculated to ensure that the measurement points with high real-time requirements can be collected first; Step 3: Store instructions and execute The arranged instructions are stored in the corresponding map container in order, and an index is provided for the collection task. When the collection task is executed, data is collected in the order of the instructions in the map container to ensure that the collection task can be carried out efficiently and orderly.

8. The high-timeliness intelligent acquisition method based on serial port multi-device acquisition according to claim 1 is characterized in that: The command reception and data collection in S7 refers to the monitoring host configuring the parameters according to the preset frame sending interval and the number of failed retransmissions, and taking out the commands from the map container in sequence to perform data reception and transmission operations. During the entire process of data collection, the monitoring host continuously monitors the communication status. Once a timeout or communication abnormality is found, the corresponding processing mechanism is immediately activated to resend the command; if the fault persists, the monitoring host will try to reconnect to the device according to the configured fault reconnection interval to ensure the continuity and stability of data collection.

9. The high-timeliness intelligent acquisition method based on serial port multi-device acquisition according to claim 1, characterized in that: The specific steps of monitoring and troubleshooting in S8 are as follows: Step 1: Continuously monitor the collection task The monitoring host needs to continuously monitor the execution status of all collection tasks and ensure that all devices are in normal collection work through real-time detection; Step 2: Reconnect after a fault and record information Once a communication anomaly or device failure is detected, the monitoring host needs to respond quickly and try to reconnect to the device according to the preset fault reconnection interval, while recording the fault information in detail for subsequent fault analysis and processing; Step 3: Ensure the acquisition process is stable Through continuous monitoring and efficient fault handling mechanisms, the monitoring host can ensure that the entire data collection process remains highly timely and stable, thereby improving the overall performance and reliability of the system.