A data acquisition and control method and system

By using intelligent agent recognition and negotiation protocols, fully automated data acquisition from laboratory testing equipment has been achieved, solving the problems of reliance on manual configuration and poor scalability in existing technologies, and improving acquisition efficiency and data reliability.

CN123145282APending Publication Date: 2026-11-20CHINA DATACOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611474541.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-21
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing laboratory testing equipment data acquisition solutions rely on manual configuration of communication parameters, have poor scalability, cannot automatically discover devices, negotiate protocols, and select acquisition strategies, lack adaptive and autonomous decision-making capabilities, cannot meet the needs of multi-level data flow, and the data acquisition module is deeply bound to the LIMS system, making it difficult to deploy and reuse independently.

Method used

The agent-based data acquisition and control method identifies target detection devices through scanning interfaces, determines connection negotiation strategies, conducts protocol negotiations, determines communication parameters and acquisition modes, intelligently parses data, generates standardized data objects, and determines data routing flow based on data type and business attributes, thereby achieving fully automatic data acquisition.

Benefits of technology

It has enabled fully automated data acquisition of testing equipment, reduced the cost of manual configuration and system integration and maintenance, and improved the timeliness of data acquisition, the reliability of data flow and traceability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123145282A_ABST
    Figure CN123145282A_ABST
Patent Text Reader

Abstract

The application relates to a data acquisition and control method and system, and belongs to the technical field of data processing. The method comprises the following steps: identifying a target detection device based on a scanning interface, and determining a connection negotiation strategy based on the type of the target detection device; when protocol negotiation succeeds according to the connection negotiation strategy, determining communication parameters and an acquisition mode, starting data acquisition, and obtaining target acquisition data; intelligently analyzing the target acquisition data to generate a standardized data object; determining a data routing flow direction according to the data type and business attribute of the standardized data object, and persistently feeding back acquisition results and storage positions to a LIMS system according to the data routing flow direction. The method realizes full-automatic data acquisition of a detection device, reduces the cost of manual configuration and system integration and maintenance, and improves the acquisition timeliness, data flow reliability and traceability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data processing technology, and in particular relates to a data acquisition and control method and system. Background Technology

[0002] In related technologies, existing laboratory testing equipment data acquisition mostly relies on workstation attachments or direct connection acquisition. The former depends on the workstation outputting report files such as TXT, CSV, and XLS, which are then scanned and parsed by LIMS (Library Information Management System). The latter receives real-time data from electronic balances, pH meters, etc., via serial ports or USB. These solutions suffer from several drawbacks: device access requires manual configuration of communication parameters or file paths, and reconfiguration is necessary after device replacement; acquisition and parsing rules are hard-coded, resulting in poor scalability; the system passively waits for data and cannot automatically discover devices, negotiate protocols, or select acquisition strategies. Therefore, how to better achieve data acquisition and control of testing equipment has become an urgent problem to be solved. Summary of the Invention

[0003] In view of the shortcomings of the prior art, the purpose of the invention is to provide a data acquisition and control method and system.

[0004] In a first aspect, the present invention proposes a data acquisition and control method, the method being executed by an intelligent agent, the method comprising: S1, identifying a target detection device based on a scanning interface, and determining a connection negotiation strategy based on the type of the target detection device; S2, if protocol negotiation is successful according to the connection negotiation strategy, determining communication parameters and acquisition mode, and initiating data acquisition to obtain target acquisition data; S3, intelligently parsing the target acquisition data to generate standardized data objects; S4, determining the data routing direction according to the data type and business attributes of the standardized data objects, and persistently feeding back the acquisition results and storage location to the LIMS system according to the data routing direction.

[0005] A second aspect of the present invention proposes a data acquisition and control system, the system being executed based on an intelligent agent, the system comprising: a determination module, configured to identify a target detection device based on a scanning interface and determine a connection negotiation strategy based on the type of the target detection device; an acquisition module, configured to determine communication parameters and an acquisition mode, and initiate data acquisition to obtain target acquisition data if protocol negotiation is successful according to the connection negotiation strategy; a generation module, configured to intelligently parse the target acquisition data to generate standardized data objects; and a feedback module, configured to determine the data routing direction based on the data type and business attributes of the standardized data objects, and persistently feed back the acquisition results and storage location to the LIMS system according to the data routing direction.

[0006] A third aspect of the present invention provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described in any one aspect of the present invention.

[0007] A fourth aspect of the present invention provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method described in any one of the first aspects of the present invention.

[0008] The beneficial effects of this invention are as follows: The data acquisition and control method and system described in this invention identifies target detection devices based on scanning interfaces and determines a connection negotiation strategy based on the type of the target detection device. If protocol negotiation is successful according to the connection negotiation strategy, communication parameters and acquisition mode are determined, and data acquisition is initiated to obtain target acquisition data. The target acquisition data is intelligently parsed to generate standardized data objects. Based on the data type and business attributes of the standardized data objects, the data routing direction is determined, and the acquisition results and storage location are persistently fed back to the LIMS system according to the data routing direction. This method achieves fully automated data acquisition from detection devices, reduces manual configuration and system integration and maintenance costs, and improves acquisition timeliness, data flow reliability, and traceability. Attached Figure Description

[0009] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts. It is obvious that the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings.

[0010] Figure 1 This is a flowchart of a data acquisition and control method according to an embodiment of the present invention; Figure 2 This is a flowchart of a data acquisition and control method according to a specific embodiment of the present invention; Figure 3 This is a schematic diagram of a data acquisition and control system according to an embodiment of the present invention; Figure 4 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0011] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0012] Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts disclosed in this invention.

[0013] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The terms "installed," "connected," and "linked" should be interpreted broadly; for example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0014] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of methods and systems consistent with some aspects of the invention as detailed in the appended claims.

[0015] In the process of building laboratory information systems, automatic data acquisition from testing equipment is a key link in realizing the intelligence of the Laboratory Information Management System (LIMS). Depending on the type of equipment and interface method, the mainstream acquisition methods are currently divided into workstation accessory acquisition mode and direct connection acquisition mode. The workstation accessory acquisition mode includes the following: Some high-end testing equipment (such as battery testing cabinets, spectrometers, chromatographs, etc.) come with built-in workstation software. After testing, the workstation software generates a standard format test report file, including but not limited to TXT, CSV, XLS, XLSX, PDF, XML, etc., and outputs the file to a preset file path. The LIMS system acquires the file in the following ways: periodically scanning a specified folder path; setting the file path as a shared folder on the local area network (SMB / FTP protocol); and pushing the report to a file server via a file synchronization tool. After acquiring the file, the LIMS system matches the corresponding parser according to pre-configured acquisition rules, such as filename templates and file format types, parses the test report to extract the test result data, and writes it back to the result table in the LIMS database.

[0016] In the direct-connection acquisition mode, some testing devices (such as electronic balances, pH meters, titrators, etc.) do not have independent workstations but instead output test data directly via serial ports (RS232 / RS485) or USB interfaces. Taking an electronic balance as an example, after the weighing value stabilizes, the balance transmits the weighing result in real time to a computer or dedicated acquisition module via serial port in ASCII or binary format. The LIMS system listens to the serial port data stream, receives and parses the data, and then writes it back to the database. In recent years, the widespread adoption of serial-to-WiFi modules (such as the USR-W600) has enabled traditional serial devices to wirelessly access the network, supporting multiple working modes such as STA, AP, and AP+STA, as well as transparent transmission, AT commands, and HTTPD Client, providing a new technical path for networked data acquisition.

[0017] However, the existing data acquisition solutions for laboratory testing equipment have the following problems: Device access is highly dependent on manual configuration; that is, communication parameters (serial port baud rate, data bits, stop bits, parity bits) or file paths must be manually determined when each device is connected, making automatic discovery and negotiation impossible; reconfiguration is required after device replacement or upgrade, resulting in high maintenance costs; new parsers or adapters need to be developed when adding new device types, leading to poor scalability; the acquisition method is tightly coupled with business logic, meaning that file acquisition and serial port acquisition are two independent solutions, lacking a unified abstraction layer; parsing rules, data conversion logic, and routing strategies are hard-coded in the code, making modification difficult; the data acquisition module and LIMS... The business systems are deeply intertwined, making independent deployment and reuse difficult; they lack adaptive and autonomous decision-making capabilities, meaning the system passively waits for data (file arrival or data on the serial port), lacking proactive discovery and detection capabilities; they cannot automatically select the optimal acquisition strategy based on device type and data characteristics; they lack fault tolerance and self-recovery mechanisms, requiring manual intervention for communication anomalies (such as serial port disconnection or file format changes); the data flow path is rigid, meaning raw data can only be stored along a fixed path after acquisition, unable to be dynamically routed based on data characteristics; it is difficult to meet the multi-level data flow requirements of raw data → time-series database → key indicator conversion → business database; and it lacks real-time verification of data quality and anomaly early warning capabilities.

[0018] To this end, the present invention proposes a data acquisition and control method, system and related equipment. Specifically, the data acquisition and control method, system and related equipment of the present invention are described below with reference to the accompanying drawings.

[0019] Figure 1 This is a flowchart of a data acquisition and control method according to an embodiment of the present invention. It should be noted that the data acquisition and control method of this embodiment can be applied to the data acquisition and control system of this embodiment. This data acquisition and control system can be configured on an electronic device or in a server. This application does not limit the scope of the application.

[0020] like Figure 1 As shown, the data acquisition and control methods include: S110 identifies the target detection device based on the scanning interface and determines the connection negotiation strategy based on the type of the target detection device.

[0021] In an embodiment of the present invention, after the acquisition module is started, the intelligent agent scans all available interfaces, that is, it identifies the target detection device based on the scanned interfaces.

[0022] The intelligent agent supports two recognition modes: timed scanning and event-triggered scanning.

[0023] The scanning interfaces include a network shared folder list interface, a serial port list interface, a USB port list interface, and a network device interface.

[0024] In embodiments of the present invention, the type of target detection device can be determined based on the type of scanning interface, and then a connection negotiation strategy can be determined based on the type of target detection device. Specific implementation details can be found in subsequent embodiments.

[0025] Specifically, based on the network shared folder list interface, the type of target detection device identified is workstation type; based on the serial port list interface and / or USB port list interface, the type of target detection device identified is direct connection type; and based on the network device interface, the type of target detection device identified is network type.

[0026] S120: If the protocol negotiation is successful according to the connection negotiation strategy, the communication parameters and acquisition mode are determined, and data acquisition is started to obtain the target acquisition data.

[0027] In embodiments of the present invention, when a connection negotiation strategy is determined, protocol negotiation can be performed based on the connection negotiation strategy. Protocol negotiation is used to confirm whether the data acquisition configuration is available and whether communication is smooth. If the protocol negotiation is successful, communication parameters and the data acquisition mode are determined, and data acquisition is initiated to obtain the target data. Specific implementation details can be found in subsequent embodiments.

[0028] S130 intelligently analyzes the target data and generates standardized data objects.

[0029] In embodiments of the present invention, upon obtaining target acquisition data, the format and encoding characteristics of the target acquisition data are determined; the target acquisition data is parsed and preprocessed according to the format and encoding characteristics to obtain structured data; target fields are extracted according to field mapping relationships and standardized transformation is performed; after verifying the rationality of the structured data and standardized fields, they are encapsulated into a standardized data object. Specific implementation methods can be found in subsequent embodiments.

[0030] S140 determines the data routing direction based on the data type and business attributes of the standardized data object, and persistently feeds back the collection results and storage location to the LIMS system according to the data routing direction.

[0031] In embodiments of the present invention, the data type identifier and business attribute fields in a standardized data object can be extracted; based on a preset routing rule table, the data type identifier and business attribute fields can be matched with the preset routing rule table to determine the target storage system and flow path; the standardized data object can be persistently stored according to the target storage system and flow path; a feedback data packet can be generated, which includes the collection results and storage location; and the feedback data packet can be sent to the LIMS system through a preset communication method. Specific implementation details can be found in subsequent embodiments.

[0032] According to the data acquisition and control method of this invention, a target detection device is identified based on a scanning interface, and a connection negotiation strategy is determined based on the type of the target detection device. If protocol negotiation is successful according to the connection negotiation strategy, communication parameters and acquisition mode are determined, and data acquisition is initiated to obtain target acquisition data. The target acquisition data is intelligently parsed to generate standardized data objects. Based on the data type and business attributes of the standardized data objects, the data routing direction is determined, and the acquisition results and storage location are persistently fed back to the LIMS system according to the data routing direction. This method automatically completes device identification, protocol negotiation, data acquisition, intelligent parsing, and routing persistence according to data type and business attributes, and feeds back to the LIMS, realizing fully automated data acquisition of detection devices. This reduces manual configuration and system integration and maintenance costs, and improves acquisition timeliness, data flow reliability, and traceability.

[0033] To enable those skilled in the art to more readily understand the present invention, Figure 2 This is a data acquisition and control method according to a specific embodiment of the present invention, such as... Figure 2 As shown, the data acquisition and control method includes: S210 identifies the target detection device based on the scanning interface and determines the type of the target detection device.

[0034] In embodiments of the present invention, the scanning interface includes a network shared folder list interface, a serial port list interface, a USB port list interface, and a network device interface.

[0035] Specifically, based on the network shared folder list interface, the type of target detection device identified is workstation type; based on the serial port list interface and / or USB port list interface, the type of target detection device identified is direct connection type; and based on the network device interface, the type of target detection device identified is network type.

[0036] In other words, for workstation-type detection devices, the agent scans the configured list of shared network folders, detects newly appearing file directory structures, and identifies the workstation type and file output mode; for directly connected detection devices, the agent enumerates the system serial port list and USB device list, detects newly connected hardware devices, and can identify the device type by sending probe signals; for network-type detection devices, the agent discovers networked acquisition devices such as serial-to-WiFi modules that support TCP / IP communication through mDNS / DNS-SD or UDP broadcasts.

[0037] In embodiments of the present invention, the intelligent agent can register the device information of the identified target detection device in a device management table. The device information includes device ID, type, communication interface, status, etc., and triggers subsequent negotiation and connection. The intelligent agent can also maintain a device fingerprint database, automatically identify the device model and manufacturer by comparing device response characteristics, and pass the identification results to subsequent modules in a unified format device description object.

[0038] S220, determine the connection negotiation strategy based on the type of target detection equipment.

[0039] In embodiments of the present invention, when the target detection device is a workstation, the connection negotiation strategy is determined to be a file sharing protocol detection strategy, which includes automatically detecting file naming rules, format types, and encoding methods. When the target detection device is a direct connection type, the connection negotiation strategy is determined to be a serial port parameter traversal handshake strategy, which includes automatically traversing serial port parameter combinations and sending handshake signals or waiting for device responses. When the target detection device is a network type, the connection negotiation strategy is determined to be a TCP connection test and protocol handshake strategy, which includes determining the TCP Server / Client mode and port number.

[0040] S230: If the protocol negotiation is successful according to the connection negotiation strategy, the communication parameters and acquisition mode are determined.

[0041] In an embodiment of the present invention, when a connection negotiation strategy is determined, protocol negotiation can be performed based on the connection negotiation strategy. If the protocol negotiation is successful, communication parameters and acquisition mode are determined.

[0042] For different data acquisition types, protocol negotiation is used to confirm the availability of acquisition configurations and the smoothness of communication. Specifically, when using workstation acquisition, the SMB communication protocol is generally used, and it is necessary to confirm whether a connection to the specified shared folder can be established according to the protocol requirements; if access is not possible, it cannot be guaranteed that the intelligent agent can obtain the detection files normally. When using serial port acquisition, communication protocols such as RS232 and RS485 are generally used, and the serial port connectivity is confirmed by sending messages with agreed-upon parameters such as data bits, parity, baud rate, start bits, and stop bits. When using network acquisition, the TCP / IP transmission protocol is used, and each device is assigned an IP address within the network segment. The intelligent agent can confirm whether the IP address is reachable within the network by pinging or telneting.

[0043] Specifically, when the connection negotiation strategy adopts a file sharing protocol detection strategy, it determines whether it can connect to the specified shared folder and obtain the file list and directory structure. If so, the protocol negotiation is considered successful. When the protocol negotiation is successful, the communication parameters include at least one of the following: directory structure, file naming rules, file format type, encoding method, file sharing protocol type, shared path, access account, and access permissions. The file sharing protocol type includes SMB or FTP. The file format type can be determined by the file header Magic Number or extension. The negotiation result can be written to persistent configuration for direct use in subsequent connections, shortening startup time.

[0044] When the connection negotiation strategy adopts a serial port parameter traversal handshake strategy, it is determined whether the message can be read and parsed after the serial port parameter traversal handshake test. If so, the protocol negotiation is considered successful. In the case of successful protocol negotiation, the communication parameters include at least one of the following: physical port, serial port parameters, and protocol frame structure. Serial port parameters include baud rate, data bits, parity bits, and stop bits. The frame structure includes at least one of the following: frame header, frame trailer, length field, field separator, and checksum method. The negotiation result may include a communication quality score and supports parameter caching and a fast reconnection mechanism.

[0045] In other words, when the connection negotiation strategy adopts a serial port parameter traversal handshake strategy, the agent automatically traverses common serial port parameter combinations, such as baud rates of 9600 / 19200 / 38400 / 115200bps, 7 / 8 data bits, None / Even / Odd parity, and 1 / 2 stop bits. Combined with extended parameters such as flow control, this can form 72 parameter combinations. The agent sends a handshake signal or waits for a response from the device, determining whether it can read and parse the message after the serial port parameter traversal handshake test. If so, the protocol negotiation is considered successful.

[0046] When the connection negotiation strategy adopts TCP connection testing and protocol handshake strategy, it is determined whether the IP connectivity can be confirmed by ping or telnet. If so, the protocol negotiation is determined to be successful, and a TCP connection is established and the protocol handshake is completed. When the protocol negotiation is determined to be successful, the communication parameters include at least one of IP address, port number, and protocol frame structure. The protocol frame structure includes at least one of frame header, frame trailer, checksum, and field separator.

[0047] S240, start data acquisition and obtain the target acquisition data.

[0048] In embodiments of the present invention, the acquisition mode includes one of workstation mode, direct connection mode, and network mode.

[0049] In the case of workstation mode, the system monitors a specified folder and uses event-driven or timed polling to detect target files. If a target file is detected, it is backed up to a backup directory and then the parsing process is triggered.

[0050] In other words, the shared folder is usually kept empty. After the detection is complete, the device will output files to the shared folder. When the program finds new files in the folder during the polling process, it will cut and back them up to the backup directory, and then perform file parsing.

[0051] In the case of direct connection mode, the system listens to the serial port and / or USB port, and receives the data stream by real-time reading or timed polling. The system splices and segments the data frames according to the protocol frame structure, and triggers the parsing process when a complete data frame is detected.

[0052] Specifically, in serial communication, the serial protocol agrees with the device on the baud rate, start bit, parity check, COM port, data bits, stop bits, etc. After decoding the message based on these parameters, the message can be converted into a readable JSON format, and the detection result can be obtained and extracted from it based on keywords such as result and weight. When splicing and segmenting data frames, the frame header can be found in the receive buffer based on the frame header, frame trailer, length field, field separator, and check method. The length field is read, and the frame trailer and check are determined. If there is packet merging or splitting, the data is segmented according to the length and frame trailer to obtain a complete data frame.

[0053] In the case of network mode acquisition, the system listens on network ports or TCP connections, receives data streams using TCPServer / Client mode, splices and segments data frames according to the protocol frame structure, and triggers the parsing process when a complete data frame is detected.

[0054] In embodiments of the present invention, the data acquisition method of the target detection device is related to the device hardware configuration. For example, devices with a built-in workstation that can be configured to automatically output detection reports, such as gas chromatography, liquid chromatography, chromatography, and ICP devices, can be configured for workstation data acquisition; devices with built-in common protocol ports such as serial ports and USB ports can be configured for direct connection; and devices with a network port or wireless network can use a serial port to WiFi module to achieve network data acquisition.

[0055] The S250 intelligently analyzes the target data and generates standardized data objects.

[0056] In embodiments of the present invention, the specific implementation includes the following steps: 2501. Determine the format type of the target data to be collected. The format type includes file type or data stream type.

[0057] In embodiments of the present invention, the format type can be determined based on the acquisition mode and the source of the target acquisition data. If the data comes from workstation file monitoring, i.e., obtained from an SMB / FTP shared directory or local folder, it is determined to be a file; if the data comes from a serial port, USB, serial-to-WiFi, or TCP network stream, it is determined to be a data stream. Further, the specific format can be confirmed through file header Magic Number, extension, MIME type, regular expression matching, and keyword analysis, such as CSV, TXT, XLS, XLSX, PDF, XML, JSON, custom binary, serial port ASCII frame, serial port Modbus frame, etc. For files that cannot be determined solely by the extension, the first few bytes can be read and compared against a format library; for data streams, the determination can be made by combining channel type, frame header features, and protocol keywords.

[0058] 2502, Analyzing data structures based on format types.

[0059] For target data collected from files, the system identifies table structure, row and column separators, header rows, data start rows, end rows, multiple worksheets, merged cells, and comment rows.

[0060] For example, the corresponding parser can be invoked to read the file container structure. For instance, for CSV / TXT, the frequency of commas, tabs, semicolons, etc., can be counted to determine row and column separators; for XLS / XLSX, worksheets can be traversed to read cells, merged areas, and comments; for PDF, tables can be extracted using PDFBox, Tabula, etc.; and for XML / JSON, parsing can be done by node or key-value pair. When identifying header rows, the first N rows can be scanned, the proportion of non-empty cells, the text percentage, and the matching degree with preset standard fields can be calculated, and the row with the highest matching degree can be selected as the header. The data starting row is usually the row after the header or after the keyword row; the ending row can be determined by a blank row, a total row, a comment row, or a preset end marker. Multiple worksheets can be analyzed and merged one by one; merged cells can read the merged area and fill in values; comment rows can be identified and temporarily stored based on features such as "#", " / / ", and "remarks".

[0061] Specifically, for target data acquisition data of the data stream type, the frame header and tail, length field, check bit, and field separator are identified to determine whether it is a complete data frame.

[0062] For example, the agent maintains a receive buffer, splicing and segmenting data according to the protocol frame structure. When identifying the frame header and trailer, the agent can search for the agreed-upon frame header in the buffer, read the length field, and determine if the frame trailer or checksum is satisfied. The field separator can be a comma, space, fixed length, or a Modbus register address. If a single reception is incomplete, the buffer is reserved to wait for subsequent bytes; if there is packet fragmentation, the data is segmented according to the length field and the frame trailer. The checksum can be calculated and compared using CRC, checksum, parity check, etc., to determine whether it is a complete data frame.

[0063] 2503, a file- or data stream-based encoding method for preprocessing data structures.

[0064] Specifically, for target data collected from files, at least one of the following is processed: blank lines, description lines, merged cells, and multi-level headers. For example, all blank lines and description lines are deleted; merged cells are expanded to fill line by line; and multi-level headers are merged into single-level standard field names, such as merging "Voltage / Upper Limit" into "Voltage Upper Limit".

[0065] Specifically, for target data acquisition in the form of data streams, message decoding is performed and the data is converted into a readable structured format. For example, for data stream data, message decoding is performed according to ASCII, binary, or Modbus protocols, converting the raw bytes into readable JSON, dictionary, or two-dimensional table structures, while retaining references to the original message for traceability.

[0066] 2504. Based on the correspondence between fields in the target data and preset standard fields, target fields are extracted from the target data and then standardized.

[0067] In embodiments of this invention, the detection capabilities of each device are pre-configured upon the intelligent agent's deployment, and matched against the system's list of detection items and analytical indicators. Each detection item in the system has a code, and each analytical indicator has an analytical code and a reference name. During extraction, mapping can be performed based on header names, keywords, regular expressions, field positions, or templates. For example, "Sample ID" is mapped to the standard field sampleNo, "Weight" is mapped to weight, and "pH" is mapped to pH. Template-based parsing is supported, allowing users to upload a template once, which can then be automatically applied to similar files; machine learning-assisted intelligent format recognition is also supported, adaptively adjusting when the format changes slightly. After extraction, standardized conversions are performed, including unit conversion, numerical type conversion, time format unification, and encoding conversion, such as mV to V, g to mg, and time format unification to ISO8601.

[0068] 2505. Perform rationality checks on the preprocessed data structure and the standardized target fields respectively, and encapsulate them into standardized data objects based on the preset format.

[0069] Reasonableness checks include one or more of the following: numerical range, data type, and integrity checks.

[0070] In embodiments of the present invention, the rationality of the preprocessed data structure and the standardized target fields are verified separately. For the data structure, the integrity of the number of rows and columns, the existence of required columns, the correctness of the frame length, the pass of the CRC check, and the completeness of the field separation can be verified. For the standardized target fields, the numerical range, data type, non-nullability, enumeration values, time order, and business code matching relationship can be verified, such as voltage within a reasonable range, pH between 0 and 14, non-negative capacity, and sample number conforming to the coding rules. Data that fails the verification is marked as abnormal, triggering re-sampling, alarm, or manual intervention. After passing the verification, it is encapsulated into a standardized data object according to a preset schema, such as a JSON object, containing fields such as device ID, sample number, test item code, acquisition time, indicator array, quality mark, and original data reference, thereby shielding the underlying file format and protocol differences.

[0071] S260 determines the data routing direction based on the data type and business attributes of standardized data objects.

[0072] In embodiments of the present invention, data type identifiers and business attribute fields are extracted from standardized data objects. The data type identifiers include target collected data, standardized data objects, and target indicator data. The business attribute fields include detection item codes, sample codes, and detection step conditions. Based on a preset routing rule table, the data type identifiers and business attribute fields are matched with the preset routing rule table to determine the target storage system and flow path. The preset routing rule table includes routing files or data streams to file archive storage (to retain a complete audit trail), routing full-volume structured detection data to the TDengine time-series database (for high-performance writing and querying), and routing target indicator data to a relational database after algorithmic transformation.

[0073] During the routing process, data format conversion, unit conversion, and algorithm calculations can be performed on demand, such as calculating battery capacity based on voltage curves. Routing rules support dynamic loading and hot updates without requiring a restart of the acquisition module; multi-target distribution is supported, allowing a single set of data to be sent to multiple storage systems simultaneously; and routing links have breakpoint resumption and retry mechanisms to ensure no data loss.

[0074] In an embodiment of the present invention, taking the battery testing process as an example, when the battery testing cabinet begins testing a full or half battery, it fills in the sample number, the test item number, and selects the process step file to be executed. The process step file specifies each step, such as resting time, charging time, and discharging time, and specifies the number of cycles. In the final output test report, the intelligent agent needs to extract data parameters such as voltage, current, time, temperature point temperature, and power during constant power charging and constant power discharging every 50 cycles in all process steps according to preset rules, and write them back to the corresponding sample data according to the sample number and test item number.

[0075] S270 persistently feeds back the collected results and storage location to the LIMS system according to the data routing flow.

[0076] In an embodiment of the present invention, when persistently feeding back to the LIMS system according to the data routing flow, a feedback data packet can be generated. The feedback data packet includes the acquisition results and storage location. The acquisition results include the acquisition task ID, device ID, sample number, detection item code, acquisition status, number of data entries, and quality verification results. The storage location includes the target storage type, file path, database type, table name, and record identifier.

[0077] In one embodiment of the present invention, the intelligent agent can monitor the operating status in real time throughout the entire acquisition process, and automatically execute a recovery strategy when an anomaly is detected.

[0078] These anomalies include at least one of the following: network fluctuations causing network connection interruption, inability to access shared file directories, failure to completely transmit or retrieve files or network interface packets, and serial port packet parsing anomalies. For example, if network fluctuations cause network connection interruption, inability to access shared file directories, or failure to completely transmit or retrieve files or network interface packets, attempt to reconnect; if serial port packet parsing anomalies occur, check whether the baud rate and other related configurations are normal, and confirm by comparing with historical packets.

[0079] The recovery strategies include automatic reconnection when communication is interrupted, checking data continuity and collecting missing data after successful reconnection; trying alternative parsing strategies when parsing fails, or marking the data as abnormal and allowing manual intervention before continuing to process subsequent data; and enabling a local cache queue to temporarily store data when storage write fails, and rewriting it after storage is restored. The conditions for successful reconnection include being able to reopen the shared file directory, re-acquire the test file, or reread the message normally; manual intervention methods include manually entering data, or copying and exporting the test report file and manually uploading it to the corresponding test sample data for semi-automatic file parsing and acquisition.

[0080] In one embodiment of the present invention, taking a hybrid acquisition mode in a lithium battery laboratory as an example, a lithium battery R&D laboratory is equipped with 20 battery testing cabinets and 5 electronic balances. The battery testing cabinets come with their own workstation software, which automatically outputs an XLS format test report to a designated folder on the workstation after the test is completed; the electronic balances support RS232 serial port data output.

[0081] During deployment, for the battery testing cabinet, the workstation output folder was set as an SMB shared directory. For the electronic balances, each balance was connected to a USR-W600 serial-to-WiFi module via an RS232 serial cable. The module connected to the lab's WiFi network in STA mode. The intelligent agent was deployed on the LIMS server, simultaneously monitoring the shared folder via the SMB protocol and receiving data transmitted from the USR-W600 via a network TCP connection.

[0082] The workflow is as follows: The intelligent agent scans and discovers the SMB shared folder and the network port corresponding to the USR-W600 module; it negotiates the protocol for the balance data, determining the communication parameters as a baud rate of 9600, 8 data bits, no parity, and 1 stop bit, i.e., 9600 / 8 / N / 1; the battery test cabinet collects data through SMB file listening mode, and the electronic balance collects data through the USR-W600 serial-to-WiFi mode; the intelligent parsing module identifies the XLS format and serial port data format, extracting indicators such as sample number, test time, voltage, current, capacity, and weight; the routing decision module stores the charge / discharge curve data into TDengine, and converts key indicators such as capacity, efficiency, and attenuation rate before storing them in the relational database; finally, it feeds back the collection results and storage location to the LIMS system, triggering subsequent business processes. If a network interruption, incomplete file transmission, or serial port message parsing error occurs, the above-mentioned error handling and self-recovery strategies will be executed.

[0083] In an embodiment of the present invention, a data acquisition system for testing equipment is proposed. The overall architecture of this system can be divided into a physical device layer, a device access layer, an intelligent agent interaction layer, and a business application layer. The physical device layer includes testing equipment such as battery testing cabinets, electronic balances, pH meters, spectrometers, and chromatographs; the device access layer provides workstation-style access and direct connection access, where workstation-style access can be based on SMB / FTP file listening and file format recognition, and direct connection access can be based on serial port, USB, and serial-to-WiFi data stream parsing, thereby unifying heterogeneous physical interfaces into internal data channels; the intelligent agent interaction layer is the core layer, including device discovery, protocol negotiation, intelligent parsing, routing decision, and collaborative bus; the business application layer interfaces with LIMS systems, data platforms, business workflow systems, etc., and supports multiple types of storage backends.

[0084] Based on the above solution, system integration costs are reduced, meaning that when new testing equipment is connected, there is no need to customize the acquisition program for each device. The automatic discovery and protocol self-negotiation capabilities of the intelligent agent shorten the device integration time from 1-2 weeks per device to plug-and-play, reducing integration costs by more than 80%. Data acquisition efficiency is improved, upgrading from manual and semi-automatic timed scanning to event-driven fully automatic real-time acquisition. In workstation file mode, the acquisition process is triggered milliseconds after the test report is generated; in direct connection mode, device output data is received and parsed in real time, improving acquisition timeliness from hours to seconds. System scalability and maintainability are enhanced, meaning that adding new devices does not require modification of the intelligent agent's core code, decoupling system expansion capabilities from the number of devices. When devices are replaced or upgraded, the intelligent agent automatically renegotiates communication parameters without manual intervention. Maintenance work is changed from modifying code to configuration updates, significantly reducing operation and maintenance costs. Data integrity and reliability are guaranteed, meaning that the anomaly self-recovery mechanism ensures that data is not lost in abnormal situations such as network interruptions and device offline. Data queue caching + automatic resume mechanism ensures end-to-end data integrity, meeting the legal validity and traceability requirements of laboratory testing data. Optimizing the storage architecture improves query efficiency by separating raw time-series data from key business metrics data. Each database is optimized according to its own characteristics: the time-series database is specifically optimized for storage compression and downsampling queries, while the relational database provides transactional consistency and complex join queries for relational data. This dual-database architecture reduces data storage costs and improves query efficiency.

[0085] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0086] According to one aspect of the present invention, a data acquisition and control system is also proposed. Figure 3 This is a schematic diagram of a data acquisition and control system according to an embodiment of the present invention; as shown. Figure 3 As shown, it includes: The determination module 310 is used to identify the target detection device based on the scanning interface and determine the connection negotiation strategy based on the type of the target detection device; The module 320 is used to determine the communication parameters and acquisition mode and start data acquisition to obtain the target acquisition data when the protocol negotiation is successful according to the connection negotiation strategy. The generation module 330 is used to intelligently parse the target collected data and generate standardized data objects; The feedback module 340 is used to determine the data routing direction based on the data type and business attributes of the standardized data object, and persistently feed back the collection results and storage location to the LIMS system according to the data routing direction.

[0087] According to an embodiment of the present invention, the data acquisition and control system identifies target detection devices based on scanning interfaces and determines a connection negotiation strategy based on the type of the target detection device. If protocol negotiation is successful according to the connection negotiation strategy, communication parameters and acquisition mode are determined, and data acquisition is initiated to obtain target acquisition data. The target acquisition data is intelligently parsed to generate standardized data objects. Based on the data type and business attributes of the standardized data objects, the data routing direction is determined, and the acquisition results and storage location are persistently fed back to the LIMS system according to the data routing direction. Thus, by automatically completing device identification, protocol negotiation, data acquisition, intelligent parsing, and persistent routing according to data type and business attributes, and feeding back to the LIMS, the system achieves fully automated data acquisition from detection devices, reducing manual configuration and system integration and maintenance costs, and improving acquisition timeliness, data flow reliability, and traceability.

[0088] Optionally, the scanning interface includes a network shared folder list interface, a serial port list interface, a USB port list interface, and a network device interface; wherein, the determining module 310 is specifically used to identify the type of the target detection device as a workstation type based on the network shared folder list interface; to identify the type of the target detection device as a direct connection type based on the serial port list interface and / or the USB port list interface; and to identify the type of the target detection device as a network type based on the network device interface. Optionally, the determining module 310 is specifically configured to, when the target detection device is the workstation type, determine that the connection negotiation strategy is a file sharing protocol detection strategy, wherein the file sharing protocol detection strategy includes automatically detecting file naming rules, format types, and encoding methods; when the target detection device is the direct connection type, determine that the connection negotiation strategy is a serial port parameter traversal handshake strategy, wherein the serial port parameter traversal handshake strategy includes automatically traversing serial port parameter combinations and sending handshake signals or waiting for device responses; when the target detection device is the network type, determine that the connection negotiation strategy is a TCP connection test and protocol handshake strategy, wherein the TCP connection test and protocol handshake strategy includes determining the TCP Server / Client mode and port number.

[0089] Optionally, module 320 is configured to, when the connection negotiation strategy is the file sharing protocol detection strategy, determine whether it is possible to connect to the specified shared folder and obtain the file list and directory structure; if so, determine that the protocol negotiation is successful. When the protocol negotiation is successful, the communication parameters include at least one of directory structure, file naming rules, file format type, encoding method, file sharing protocol type, shared path, access account, and access permissions; the file sharing protocol type includes SMB or FTP. When the connection negotiation strategy is the serial port parameter traversal handshake strategy, module 320 determines whether the message can be read and parsed after the serial port parameter traversal handshake test; if so, determine that the protocol negotiation is successful. If the negotiation is successful, the communication parameters include at least one of the following: physical port, serial port parameters, and protocol frame structure. The serial port parameters include baud rate, data bits, parity bit, and stop bits. The frame structure includes at least one of the following: frame header, frame trailer, length field, field separator, and checksum method. If the connection negotiation strategy is the TCP connection test and protocol handshake strategy, it is determined whether IP connectivity can be confirmed via ping or telnet. If so, the protocol negotiation is considered successful, and a TCP connection is established and the protocol handshake is completed. If the protocol negotiation is successful, the communication parameters include at least one of the following: IP address, port number, and protocol frame structure. The protocol frame structure includes at least one of the following: frame header, frame trailer, parity bit, and field separator.

[0090] Optionally, the acquisition mode includes one of workstation mode, direct connection mode, and network mode; wherein, the acquisition module 320 is specifically used to, when the acquisition mode is workstation mode, monitor a specified folder, detect target files using event-driven or timed polling methods, back up the target files to a backup directory when the target files are detected, and then trigger the parsing process; when the acquisition mode is direct connection mode, monitor a serial port and / or USB port, receive data streams using real-time reading or timed polling methods, perform data frame splicing and segmentation according to the protocol frame structure, and trigger the parsing process when a complete data frame is detected; when the acquisition mode is network mode, monitor a network port or TCP connection, receive data streams using TCP Server / Client mode, perform data frame splicing and segmentation according to the protocol frame structure, and trigger the parsing process when a complete data frame is detected.

[0091] Optionally, the generation module 330 is specifically used to determine the format type corresponding to the target acquired data, wherein the format type includes file type or data stream type; analyze the data structure based on the format type, wherein, for the target acquired data of the file type, it identifies table structure, row and column separators, header row, data start row, end row, multiple worksheets, merged cells, and comment rows; for the target acquired data of the data stream type, it identifies frame header and frame tail, length field, checksum, and field separator, and determines whether it is a complete data frame; and performs data structure analysis based on the encoding method of the file or data stream. The process includes preprocessing, whereby, for the target collected data of the file type, at least one of blank lines, description lines, merged cells, and multi-level headers is processed; for the target collected data of the data stream type, message decoding is performed and converted into a readable structured format; based on the correspondence between fields in the target collected data and preset standard fields, target fields are extracted from the target collected data and the target fields are standardized; the preprocessed data structure and the standardized target fields are respectively validated for reasonableness and encapsulated into the standardized data object based on the preset format.

[0092] Optionally, the feedback module 340 is specifically used to extract the data type identifier and business attribute field from the standardized data object, wherein the data type identifier includes the target collected data, the standardized data object, and the target indicator data, and the business attribute field includes the detection item code, sample code, and detection step conditions; based on a preset routing rule table, the data type identifier and the business attribute field are matched with the preset routing rule table to determine the target storage system and flow path, wherein the preset routing rule table includes routing files or data streams to file archive storage, routing full structured detection data to the TDengine time series database, and routing target indicator data to a relational database after algorithm transformation processing.

[0093] Optionally, the feedback module 340 is specifically used to generate a feedback data packet, which includes acquisition results and storage location. The acquisition results include acquisition task ID, device ID, sample number, detection item code, acquisition status, number of data entries, and quality verification results. The storage location includes target storage type, file path, database type, table name, and record identifier. The feedback data packet is sent to the LIMS system via API call, message queue, database interface table, or file notification.

[0094] Optionally, it also includes an anomaly handling and self-recovery module for real-time monitoring of the operating status and automatic execution of recovery strategies when an anomaly is detected. The anomaly includes at least one of the following: network connection interruption due to network fluctuations, inability to access the shared file directory, failure to completely transmit acquired files or network interface messages, and serial port message parsing anomalies. The recovery strategies include automatic reconnection when communication is interrupted, checking data continuity and supplementing missing data after successful reconnection; attempting alternative parsing strategies when parsing fails, or marking an anomaly for manual intervention before continuing to process subsequent data; and enabling a local cache queue to temporarily store data when storage write fails, rewriting it after storage recovery. Successful reconnection is achieved when at least one of the following conditions is met: being able to reopen the shared file directory, re-acquiring the test file, or rereading the message normally. Manual intervention methods include manually entering data or copying and exporting the test report file and manually uploading it to the corresponding test sample data for semi-automatic file parsing and acquisition.

[0095] According to one aspect of the present invention, an electronic device is provided.

[0096] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 4 As shown, an electronic device may include one or more ( Figure 4Only one is shown in the image. A processor 102 (which may include, but is not limited to, a microprocessor unit (MPU) or a programmable logic device (PLD)) and a memory 104 for storing data are also shown. In one exemplary embodiment, the electronic device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 4 The structure shown is for illustrative purposes only and does not limit the structure of the terminal device described above. For example, the terminal device may also include components that are more... Figure 4 The more or fewer components shown, or having the same Figure 4 Equivalent functions or ratios shown Figure 4 The functions shown have more different configurations.

[0097] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the data acquisition and control method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to terminal devices via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0098] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the switching device. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0099] This invention proposes a non-transitory computer-readable storage medium storing computer instructions, which are used to cause the computer to execute a data acquisition and control method.

[0100] The applicant of this invention has provided a detailed description of the embodiments of the invention in conjunction with the accompanying drawings. However, those skilled in the art should understand that the above embodiments are merely preferred embodiments of the invention. The detailed description is only intended to help readers better understand the spirit of the invention and is not intended to limit the scope of protection of the invention. On the contrary, any improvements or modifications made based on the inventive spirit of the invention should fall within the scope of protection of the invention.

[0101] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0102] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the protection scope of the present invention.

Claims

1. A data acquisition and control method, characterized in that, The method is executed based on an intelligent agent and includes: S1, Identify the target detection device based on the scanning interface, and determine the connection negotiation strategy based on the type of the target detection device; S2, if the protocol negotiation is successful according to the connection negotiation strategy, determine the communication parameters and acquisition mode, and start data acquisition to obtain the target acquisition data; S3, intelligently analyze the target collected data to generate standardized data objects; S4. Based on the data type and business attributes of the standardized data object, determine the data routing direction, and persistently feed back the collection results and storage location to the LIMS system according to the data routing direction.

2. The data acquisition and control method according to claim 1, characterized in that, The scanning interface includes a network shared folder list interface, a serial port list interface, a USB port list interface, and a network device interface; wherein, determining the type of the target detection device includes: Based on the network shared folder list interface, the type of the target detection device identified is a workstation type; Based on the serial port list interface and / or the USB port list interface, the type of the target detection device identified is a direct connection type; Based on the network device interface, the type of the target detection device identified is the network type; The connection negotiation strategy is determined based on the type of the target detection device, including: If the target detection device is the workstation type, then the connection negotiation strategy is determined to be a file sharing protocol detection strategy, wherein the file sharing protocol detection strategy includes automatically detecting file naming rules, format type, and encoding method; If the target detection device is of the direct connection type, then the connection negotiation strategy is determined to be a serial port parameter traversal handshake strategy, wherein the serial port parameter traversal handshake strategy includes automatically traversing serial port parameter combinations, and sending a handshake signal or waiting for a device response. If the target detection device is the network type, then the connection negotiation strategy is determined to be a TCP connection test and protocol handshake strategy, wherein the TCP connection test and protocol handshake strategy includes determining the TCP Server / Client mode and port number.

3. The data acquisition and control method according to claim 2, characterized in that, Successful agreement negotiation includes: When the connection negotiation strategy is the file sharing protocol detection strategy, it is determined whether it is possible to connect to the specified shared folder and obtain the file list and directory structure. If so, it is determined that the protocol negotiation is successful. When the protocol negotiation is determined to be successful, the communication parameters include at least one of the following: directory structure, file naming rules, file format type, encoding method, file sharing protocol type, sharing path, access account, and access permissions. The file sharing protocol type includes SMB or FTP. When the connection negotiation strategy is the serial port parameter traversal handshake strategy, it is determined whether the message can be read and parsed after the serial port parameter traversal handshake test. If so, the protocol negotiation is determined to be successful. When the protocol negotiation is determined to be successful, the communication parameters include at least one of physical port, serial port parameters, and protocol frame structure. The serial port parameters include baud rate, data bits, parity bits, and stop bits. The frame structure includes at least one of frame header, frame trailer, length field, field separator, and check mode. When the connection negotiation strategy is to adopt the TCP connection test and protocol handshake strategy, it is determined whether the IP connectivity can be confirmed by ping or telnet. If so, the protocol negotiation is determined to be successful, and a TCP connection is established and the protocol handshake is completed. When the protocol negotiation is determined to be successful, the communication parameters include at least one of IP address, port number, and protocol frame structure. The protocol frame structure includes at least one of frame header, frame trailer, checksum, and field separator.

4. The data acquisition and control method according to claim 1, characterized in that, The acquisition mode includes one of the following: workstation mode, direct connection mode, and network mode; Initiating data collection includes: When the acquisition mode is the workstation mode, the specified folder is monitored, and the target file is detected using an event-driven or timed polling method. If the target file is detected, the target file is backed up to the backup directory, and then the parsing process is triggered. When the acquisition mode is the direct connection mode, the serial port and / or USB port are monitored, and the data stream is received by real-time reading or timed polling. The data frame is spliced ​​and segmented according to the protocol frame structure, and the parsing process is triggered when a complete data frame is detected. When the acquisition mode is the network mode, the system listens to the network port or TCP connection, receives the data stream using the TCPServer / Client mode, splices and segments the data frames according to the protocol frame structure, and triggers the parsing process when a complete data frame is detected.

5. The data acquisition and control method according to claim 4, characterized in that, The target data is intelligently parsed to generate standardized data objects, including: Determine the format type corresponding to the target collected data, wherein the format type includes file type or data stream type; Based on the format type, the data structure is analyzed. For the target data of the file type, the table structure, row and column separators, header row, data start row, end row, multiple worksheets, merged cells, and comment row are identified. For the target data of the data stream type, the frame header and frame tail, length field, checksum, and field separator are identified to determine whether it is a complete data frame. Based on the encoding method of the file or data stream, the data structure is preprocessed, wherein, for the target acquisition data of the file type, at least one of blank lines, description lines, merged cells, and multi-level headers is processed; for the target acquisition data of the data stream type, message decoding is completed and converted into a readable structured format. Based on the correspondence between the fields in the target data and the preset standard fields, target fields are extracted from the target data and then standardized. The preprocessed data structure and the standardized target field are respectively validated for reasonableness, and then encapsulated into the standardized data object based on a preset format.

6. The data acquisition and control method according to claim 1, characterized in that, Based on the data type and business attributes of the standardized data object, the data routing direction is determined, including: Extract the data type identifier and business attribute field from the standardized data object, wherein the data type identifier includes the target collected data, the standardized data object and the target indicator data, and the business attribute field includes the detection item code, sample code and detection step conditions; Based on a preset routing rule table, the data type identifier and the business attribute field are matched with the preset routing rule table to determine the target storage system and the flow path. The preset routing rule table includes routing files or data streams to file archive storage, routing full structured detection data to the TDengine time series database, and routing target indicator data to a relational database after algorithm transformation.

7. The data acquisition and control method according to claim 1, characterized in that, According to the data routing flow, the collected results and storage location are persistently fed back to the LIMS system, including: Generate a feedback data packet, which includes the acquisition results and storage location. The acquisition results include the acquisition task ID, device ID, sample number, test item code, acquisition status, number of data entries, and quality verification results. The storage location includes the target storage type, file path, database type, table name, and record identifier. The feedback data packet is sent to the LIMS system via API calls, message queues, database interface tables, or file notifications.

8. The data acquisition and control method according to claim 1, characterized in that, It also includes exception handling and self-recovery, wherein the exception handling and self-recovery include: Monitor the operational status in real time and automatically execute recovery strategies when an anomaly is detected; The anomalies include at least one of the following: network fluctuations causing network connection interruption, inability to access shared file directories, failure to completely transmit or obtain files or network port messages, and serial port message parsing anomalies. The recovery strategies include automatic reconnection when communication is interrupted, checking data continuity and collecting missing data after successful reconnection; trying alternative parsing strategies when parsing fails, or marking an anomaly for manual intervention before continuing to process subsequent data; and enabling a local cache queue to temporarily store data when storage write fails, and rewriting it after storage is restored. The conditions for successful reconnection include being able to reopen the shared file directory, re-acquire the test file, or reread the message normally; manual intervention methods include manually entering data, or copying and exporting the test report file and manually uploading it to the corresponding test sample data for semi-automatic file parsing and acquisition.

9. A data acquisition and control system, characterized in that, The system is based on agent execution and includes: The determination module is used to identify the target detection device based on the scanning interface and determine the connection negotiation strategy based on the type of the target detection device; The module is used to determine communication parameters and acquisition mode, and start data acquisition to obtain target acquisition data if the protocol negotiation is successful according to the connection negotiation strategy. The generation module is used to intelligently parse the target collected data and generate standardized data objects; The feedback module is used to determine the data routing direction based on the data type and business attributes of the standardized data object, and persistently feed back the collection results and storage location to the LIMS system according to the data routing direction.

10. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 8.