Autonomous access system and method for site heterogeneous equipment
By combining hardware adaptation modules, protocol identification modules, and data parsing modules, the problem of complex data access for various heterogeneous devices is solved, enabling fast and accurate data transmission and risk assessment.
Patent Information
- Application Number
- CN202511109839.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-11-07
AI Technical Summary
Existing technologies involve complex and cumbersome data access methods for various heterogeneous devices, making it difficult to achieve flexible access and data exchange for multiple types of detection or monitoring devices, thus affecting the efficiency of on-site risk assessment in site pollution investigations.
A site-specific autonomous access system for heterogeneous devices is provided, comprising a hardware adaptation module, a protocol identification module, and a data parsing module. It acquires detection data through a physical interface, automatically identifies the protocol type, and parses the data to ensure data integrity and accuracy.
It enables rapid adaptation and access for various heterogeneous devices, improves the accuracy and reliability of data transmission, reduces the complexity of device access, and enhances data processing efficiency and on-site risk assessment efficiency.
Smart Images

Figure CN120915853A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of site peripheral environment investigation, and particularly relates to a site heterogeneous device autonomous access system and method. BACKGROUND
[0002] In the risk evaluation and judgment of the peripheral environment investigation of mining, ore dressing, smelting and other sites, the detection results of multiple heterogeneous devices need to be flexibly accessed to the intelligent investigation terminal.
[0003] However, different types of detection or monitoring devices have different hardware communication methods, different communication protocols and different internal data fields, and there is currently a lack of unified hardware and software adaptation interface, making it difficult to carry out joint operation and data exchange of multiple heterogeneous devices on site. The existing registration-based access method is technically complex and inconvenient to use, and is not suitable for use in site pollution investigation risk evaluation.
[0004] Therefore, the data transmission method of multiple access devices in the related art has the technical problem of complex and cumbersome data access method. SUMMARY
[0005] The present application provides a site heterogeneous device autonomous access system and method to solve the defects of the data transmission method of multiple access devices in the prior art, which has a complex and cumbersome data access method, and realizes real-time exchange of detection result data of various detection / monitoring devices in the site peripheral investigation process.
[0006] The present application provides a site heterogeneous device autonomous access system, comprising: a hardware adaptation module, a protocol identification module and a data analysis module; the hardware adaptation module is used to obtain the on-site detection data of the target communication data structure transmitted by the access device through the physical interface, wherein the access device is a plurality of heterogeneous devices in the site peripheral environment investigation site; the protocol identification module is used to listen to the on-site detection data and determine whether the on-site detection data carries an online intention message; when the on-site detection data carries an online intention message, the protocol identification module is used to identify the protocol of the on-site detection data and obtain the protocol type corresponding to the on-site detection data; the protocol type is used to analyze the on-site detection data and obtain the data reception result corresponding to the on-site detection data; the data analysis module is used to perform data verification based on the verification identifier in the data reception result and obtain the data verification result corresponding to the on-site detection data; when the data verification result matches the verification code, the data domain in the data reception result is analyzed to obtain the data analysis result corresponding to the on-site detection data, wherein the data analysis result includes: basic field information, extended field information and valid load information; and the data analysis result is used for risk assessment of the site peripheral environment investigation site.
[0007] The application provides a site heterogeneous device autonomous access system, wherein the target communication data structure comprises a protocol header, a data field and a protocol tail; the target communication data structure is a preset communication protocol data structure or a custom communication protocol data structure; the communication data in the data field of the preset communication protocol data structure is transmitted in the form of a 16-bit byte or a JSON object; and the custom communication protocol data structure comprises a start symbol, a command code, a check algorithm, a data field, a check code and an end symbol.
[0008] The application provides a site heterogeneous device autonomous access system, wherein the hardware adaptation module comprises a wireless communication module, a wired communication module and a power management module; the wireless communication module is integrated with a WiFi communication unit and a Bluetooth communication unit; the WiFi communication unit is used for wirelessly connecting the access device with WiFi wireless function; the Bluetooth communication unit is used for wirelessly connecting the access device with a Bluetooth interface; the wired communication module comprises an RS485 standard serial communication interface and an RS422 standard serial communication interface, is compatible with a Modbus RTU industrial protocol and is used for wired data transmission of the industrial-grade sensing device; and the power management module is used for supplying power to the access device based on the power supply type of the access device, wherein the power supply type comprises DC power supply and USB power supply.
[0009] The application provides a site heterogeneous device autonomous access system, wherein after the protocol identification module identifies the protocol type corresponding to the field detection data, the protocol identification module is further used for creating a session body corresponding to the access device, wherein the session body comprises a protocol type and a temporary identifier, and the session body is used for analyzing the field detection data based on the protocol type; the protocol identification module is further used for sending a heartbeat packet to the access device at a fixed time interval, wherein the heartbeat packet is used for detecting the data transmission state of the access device; the protocol identification module is further used for determining an online detection result corresponding to the heartbeat packet, and deleting the session body corresponding to the access device when the online detection result indicates that the access device is offline.
[0010] According to the field heterogeneous device autonomous access system provided by the application, the protocol identification module is specifically used for: when the received on-site detection data is pure text data and the first line contains an HTTP keyword, determining that the protocol type corresponding to the on-site detection data is an HTTP protocol; when the received on-site detection data is hexadecimal data, the first byte has 01 in the first two bits and a fixed message type value in the third to fourth bits, and a 0xFF delimiter exists, determining that the protocol type corresponding to the on-site detection data is a CoAP protocol; when the first byte of the received on-site detection data is a control code between 0x10 and 0xF0, the control code conforms to a preset message type, and a subsequent MQTT Topic Name structure exists, determining that the protocol type corresponding to the on-site detection data is an MQTT protocol.
[0011] According to the field heterogeneous device autonomous access system provided by the application, the protocol identification module is specifically used for: when the received on-site detection data is pure text data and the first line contains an HTTP keyword, determining that the protocol type corresponding to the on-site detection data is an HTTP protocol; when the received on-site detection data is hexadecimal data, the first byte has 01 in the first two bits and a fixed message type value in the third to fourth bits, and a 0xFF delimiter exists, determining that the protocol type corresponding to the on-site detection data is a CoAP protocol; when the first byte of the received on-site detection data is a control code between 0x10 and 0xF0, the control code conforms to a preset message type, and a subsequent MQTT Topic Name structure exists, determining that the protocol type corresponding to the on-site detection data is an MQTT protocol.
[0012] According to the field heterogeneous device autonomous access system provided by the application, the protocol identification module is specifically used for: when the received on-site detection data is pure text data and the first line contains an HTTP keyword, determining that the protocol type corresponding to the on-site detection data is an HTTP protocol; when the received on-site detection data is hexadecimal data, the first byte has 01 in the first two bits and a fixed message type value in the third to fourth bits, and a 0xFF delimiter exists, determining that the protocol type corresponding to the on-site detection data is a CoAP protocol; when the first byte of the received on-site detection data is a control code between 0x10 and 0xF0, the control code conforms to a preset message type, and a subsequent MQTT Topic Name structure exists, determining that the protocol type corresponding to the on-site detection data is an MQTT protocol.
[0013] According to the field heterogeneous device autonomous access system provided by the application, the system further comprises a data storage module; the data storage module is used for determining the data type corresponding to the data analysis result; and the data analysis result is stored in a corresponding data table based on the data type, wherein the data table at least comprises one of the following: a basic information table, an extended field information table, a heavy metal data table, a pH table, an organic matter table, a conductivity table, a meteorological data table, a picture data table, a video data table and a data association table.
[0014] The application further provides a site heterogeneous device autonomous access method, comprising the following steps: obtaining on-site detection data of a target communication data structure transmitted by an access device through a physical interface, wherein the access device is a plurality of heterogeneous devices for investigating a site surrounding environment; performing announcement listening on the on-site detection data to determine whether an online intention message is carried in the on-site detection data; when the on-site detection data carries the online intention message, performing protocol identification on the on-site detection data to obtain a protocol type corresponding to the on-site detection data; performing analysis on the on-site detection data based on the protocol type to obtain a data receiving result corresponding to the on-site detection data; performing data verification based on a verification identifier in the data receiving result to obtain a data verification result corresponding to the on-site detection data; when the data verification result matches a verification code, performing analysis on a data field in the data receiving result to obtain a data analysis result corresponding to the on-site detection data, wherein the data analysis result comprises basic field information, extended field information and effective load information; and the data analysis result is used for risk assessment on the site surrounding environment investigation site.
[0015] The application further provides an electronic device comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the site heterogeneous device autonomous access method according to any one of the above when executing the program.
[0016] The application further provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the site heterogeneous device autonomous access method according to any one of the above.
[0017] The application further provides a computer program product comprising a computer program, wherein the computer program is executed by a processor to implement the site heterogeneous device autonomous access method according to any one of the above.
[0018] The site heterogeneous device autonomous access system and method provided by the application, first, the hardware adaptation module obtains the on-site detection data through the physical interface, so that the system can be compatible with the hardware connection of different devices, realizing the data access of the physical layer; second, the protocol identification module listens to the data and automatically identifies the online intention and protocol type of the device, ensuring that the data is correctly received in the heterogeneous environment, thereby supporting diversified communication protocols; then, the data is parsed based on the protocol type and a data receiving result is generated, improving the accuracy and reliability of data transmission; then, the data parsing module uses the check identifier to check the data, ensuring the data integrity and preventing error or damaged data from entering the system; finally, when the check matches, the structured information (including basic fields, extended fields and effective load information) is obtained by parsing the data domain, providing effective and classified data output for subsequent processing. The system improves the versatility, fault tolerance and data processing efficiency in the site heterogeneous device environment. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the application or prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description one by one. Obviously, the drawings in the following description are some embodiments of the application, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.
[0020] Figure 1 is a module schematic diagram of the site heterogeneous device autonomous access system provided by the application.
[0021] Figure 2 is an architecture schematic diagram of the site heterogeneous device autonomous access system provided by the application.
[0022] Figure 3 is a timing diagram of the device access system provided by the application.
[0023] Figure 4 is a schematic diagram of the structure organization of the autonomous communication data provided by the application.
[0024] Figure 5 is a flow schematic diagram of the site heterogeneous device autonomous access method provided by the application.
[0025] Figure 6 is a schematic diagram of the physical structure of the electronic device provided by the application. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the present application will be described clearly and completely below in combination with the drawings in the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0027] The traditional site surrounding environment investigation process mainly relies on "field personnel sampling - laboratory analysis - data analysis and processing". Different knowledge background technical personnel use various types of detection and monitoring equipment to operate at each link. Only samples are collected in the field, and no detection is performed. The results are obtained by analyzing a plurality of types of equipment in the laboratory in the later period. However, the laboratory analysis period is long, and the data obtained by the institution or the researcher is usually in units of months. Further integration of data of different detection and monitoring equipment is required subsequently. The contents of processing include but are not limited to document types, data sequence, name, format, unit, analysis method, etc. This results in a long site monitoring investigation period, poor data timeliness, and serious restriction on the efficiency of site soil pollution risk assessment.
[0028] Portable detection equipment has the advantages of low cost, time and labor saving, and is widely used in actual site, farmland soil, and water body monitoring investigation. When monitoring and investigating the pollution around the site, a plurality of types of samples such as farmland soil, river sediment, surface water, underground water, and crop fruits need to be collected and detected in the field (main heavy metal index values such as Ph, Cd, Hg, Cu, organic matter, EC, etc. of soil water and other samples are obtained), and a plurality of types of information such as the position of the sample point, landscape pictures, operation videos and audios are obtained to meet the investigation requirements of site pollution "source-path-sink" analysis and pollution risk assessment. A single type of equipment cannot meet the business requirements, and a plurality of types of detection or monitoring equipment need to be used together to achieve the acquisition of a plurality of samples, a plurality of indexes, and a plurality of types of data.
[0029] Different types of detection or monitoring equipment of different manufacturers are used together in the field operation process of site surrounding environment investigation. The commonly used interfaces of soil, water, and solid waste field rapid detection instruments include RS485 bus interface, Bluetooth interface, WiFi interface, USB, etc. The communication protocols include Modbus RTU, HTTP, MQTT, CoAP, etc. At present, there is no uniform technical standard for data communication and transmission. The data communication and transmission formats of each instrument manufacturer are different, and the communication data of the detection instrument and the intelligent investigation terminal are difficult to realize.
[0030] In order to realize the field joint operation and data exchange of a plurality of types of heterogeneous equipment, a device and a system suitable for the access of a plurality of types of heterogeneous equipment need to be established to form a heterogeneous equipment adapter to realize the data access of various types of detection or monitoring equipment.
[0031] In related technologies, after registering information such as instrument model, interface type, communication method, and data description format, an XML description file for data communication transmission of the testing instrument is constructed. After the intelligent survey terminal parses this file, a connection is established between the testing equipment and the intelligent survey terminal, enabling data transmission access. However, in practical applications, the registration method for testing equipment increases the complexity of connecting multiple types of equipment to the intelligent terminal. How to further simplify the connection and communication methods between testing equipment and the intelligent terminal, achieve rapid and efficient access for multiple heterogeneous testing or monitoring devices, and improve the flexibility of equipment manufacturers' access are practical problems that need to be solved in the current on-site assessment of pollution risks through joint operations of multiple types of instruments in monitoring and surveying around the site.
[0032] In the on-site risk assessment and evaluation of the surrounding environment of mining, mineral processing, and smelting sites, it is necessary to flexibly access the detection results of various heterogeneous devices to the intelligent survey terminal. However, the hardware communication methods, communication protocols, and internal data fields of various detection or monitoring devices are different. At present, there is a lack of unified software and hardware adaptation interfaces, making it difficult to carry out joint on-site operations and data exchange of various heterogeneous devices. The existing registration-based access method is technically complicated and inconvenient to use, and is not suitable for use in on-site risk assessment of site pollution investigation.
[0033] To address the technical need for flexible access to data from the joint operation of multiple types of testing instruments in site perimeter monitoring and surveys, this invention proposes an autonomous access system and method for heterogeneous site equipment. It develops a data transmission and parsing module for heterogeneous communication methods and protocols, enabling heterogeneous testing or monitoring equipment to quickly adapt and access the intelligent survey terminal. This allows for real-time aggregation of testing / monitoring results data from various testing / monitoring equipment during site perimeter surveys, providing support for on-site online environmental risk assessment and evaluation.
[0034] Figure 1 This is a schematic diagram of the modules of the site heterogeneous equipment autonomous access system provided by the present invention, as shown below. Figure 1 As shown, it includes: a hardware adaptation module 101, a protocol identification module 102, and a data parsing module 103; The hardware adapter module 101 is used to acquire on-site detection data of the target communication data structure transmitted by the access device through a physical interface, wherein the access device is a variety of heterogeneous devices at the site surrounding environment survey site; Protocol identification module 102 is used to listen to the notification of on-site detection data and determine whether the on-site detection data carries an online intent message; When the on-site detection data carries an online intent message, the on-site detection data is identified by protocol recognition to obtain the corresponding protocol type. The on-site detection data is parsed based on the protocol type to obtain the corresponding data reception results. The data analysis module 103 is configured to perform data verification based on the check identifier in the data receiving result, and obtain a data verification result corresponding to the field detection data. When the data verification result matches the check code, the data field in the data receiving result is parsed to obtain a data analysis result corresponding to the field detection data, wherein the data analysis result includes basic field information, extended field information and effective load information; and the data analysis result is used for risk assessment of the field surrounding environment investigation site.
[0035] The site heterogeneous device autonomous access system provided by the application is based on a plurality of types of heterogeneous devices and their unique systems in the field surrounding environment investigation site, and can be applied to risk evaluation and judgment of the surrounding environment investigation site of mining, ore dressing, smelting and the like.
[0036] Reference Figure 2 , Figure 2 is a schematic diagram of the architecture of the site heterogeneous device autonomous access system provided by the application.
[0037] The application provides a site heterogeneous device autonomous access system, which realizes multi-type heterogeneous device access adaptation, includes a hardware adaptation device and a software adaptation system, and the overall process involves a three-layer structure of a hardware adaptation layer, a data service layer and a software adaptation layer, wherein the hardware adaptation layer corresponds to the hardware adaptation device, the hardware adaptation device includes a hardware adaptation module, and includes WiFi, Bluetooth, RS485 and RS422 physical interfaces on the hardware, supports device physical interface access, and uniformly manages power supply; the data service layer provides soil, water body and atmosphere data services for detection or monitoring equipment; the software adaptation layer corresponds to the software adaptation system, and includes a protocol identification module, a data analysis module and a data storage module; on the protocol, HTTP, CoAP, MQTT, Modbus RTU and custom protocols are compatible, communication protocol identification of the accessed field detection or monitoring equipment is realized, the internal data field of the protocol is parsed according to the parsing rule of the data field, and finally data storage is completed. In the process of protocol identification and data analysis, the detection equipment communication data structure constructed needs to be followed.
[0038] The hardware adaptation module, for adapting to the access of the field detection or monitoring equipment, includes a plurality of communication interfaces, and supports wired and wireless communication modes. Specifically, it includes a wireless communication module, a wired communication module and a power management module, which together realize the access of the detection or monitoring equipment communication module, support subsequent protocol identification, protocol analysis and data storage.
[0039] Among them, the wireless communication module integrates a WiFi and Bluetooth dual-mode communication unit, the WiFi communication interface supports 2.4GHz and 5GHz networks, and is used for fast access of detection or monitoring equipment with WiFi wireless function; the Bluetooth communication interface is used for accessing detection or monitoring equipment with a Bluetooth interface, is suitable for short-distance, low-power data exchange scenes, and is mainly used for data acquisition of handheld and portable devices.
[0040] The wired communication module is used for medium and long distance communication equipment that needs stable connection, is used for data transmission of industrial-grade sensing equipment such as heavy metal detection instruments and water quality monitoring devices, and includes RS485 and RS422 standard serial communication interfaces, and is compatible with Modbus RTU industrial protocol.
[0041] The power management module supports DC power supply, USB power supply and the like, has overvoltage protection, short circuit protection and power state monitoring functions, and ensures stable operation of the equipment in a complex environment.
[0042] The protocol identification module has device announcement listening, protocol identification and protocol analysis functions.
[0043] The data analysis module needs to analyze the transmitted data, mainly including data verification, specific detection or monitoring data analysis.
[0044] Through the embodiment of the application, firstly, the hardware adaptation module obtains the field detection data through the physical interface, so that the system can be compatible with the hardware connection of different devices, realizes the data access of the physical layer; secondly, the protocol identification module listens to the data and automatically identifies the online intention and protocol type of the device, ensures that the data is correctly received in a heterogeneous environment, thereby supporting diversified communication protocols; then, the data is analyzed based on the protocol type to generate a data receiving result, improving the accuracy and reliability of data transmission; then, the data analysis module verifies the data by using a verification mark, ensures the data integrity, and prevents error or damaged data from entering the system; finally, when the verification matches, the data domain is analyzed to obtain structured information (including basic fields, extended fields and effective load information), providing effective and classified data output for subsequent processing. The system improves the generality, fault tolerance and data processing efficiency in a heterogeneous device environment.
[0045] According to the self-access system for heterogeneous devices in a site provided by the application, after the protocol identification of the field detection data, the protocol identification module is also used for: Creating a session body corresponding to the access device, wherein the session body includes: the protocol type and the temporary identifier, and the session body is used for analyzing the field detection data based on the protocol type; Sending a heartbeat packet to the access device at a time, wherein the heartbeat packet is used for detecting the data transmission state of the access device; Determine the online detection result corresponding to the heartbeat packet, and delete the session body corresponding to the access device when the online detection result is that the access device is offline.
[0046] In the embodiments of the present application, device announcement listening is performed by a protocol identification module, for example, initial data and connection events from WiFi, Bluetooth, RS485, and RS422 physical channels are uniformly listened to. The device announcement listening module is used to monitor the online intention message carried in the field detection data actively sent by the device (i.e., the access device), that is, after the device is accessed, a specific format information is automatically sent, indicating that "I have come online and can be ready to receive data". The system supports different forms of online announcement under multiple protocols. After receiving the message, the system analyzes the message.
[0047] In some embodiments, whether there is an online intention message is determined according to a preset specific code or keyword carried in the field detection data.
[0048] If the field detection data does not carry communication data, it is determined as an "online intention" message. The system creates a session body for the device, in which the temporary ID of the device and the communication protocol type are bound, and returns an acknowledgement information corresponding to the protocol to the device. After receiving the acknowledgement information, the device starts to transmit data messages. During the data transmission process, the system sends heartbeat packets to monitor the online state of the device.
[0049] If the field detection data carries communication data, the device is directly replied that the message has been received, and according to the session body established with the device before, the corresponding protocol analysis function is called to analyze the data. During the transmission process of the data message, the system sends heartbeat packets at regular intervals, and when the heartbeat packet detects that the device is not online, the system destroys the session body corresponding to the device.
[0050] Reference Figure 3 , Figure 3 is a timing diagram of the device access system provided by the present application. It includes: a device (i.e., the device in the figure) and a site heterogeneous device autonomous access system (i.e., the system in the figure) provided by the present application.
[0051] The device sends an online intention message, and the process is as follows: The device sends an online intention message through WiFi, and the system performs protocol identification analysis based on the online intention message. The system determines that it is an "online intention" message, creates a session body, binds the temporary ID and the communication protocol type (WiFi), and returns an acknowledgement message corresponding to the WiFi protocol to the device.
[0052] The device starts to transmit data messages to the system.
[0053] During the data transmission process, the system sends heartbeat packets to the device at regular intervals.
[0054] The device sends a data-carrying message, and the flow is as follows: The device sends a data-carrying message through WiFi, and the system performs protocol identification and analysis based on the data-carrying message. The system replies to the device with a data-received confirmation message. The system identifies the communication protocol according to the session body, calls the WiFi protocol analysis function, and analyzes the data. During data transmission, the system sends a heartbeat packet to the device at regular intervals; when the heartbeat packet detects that the device is not online, the session body corresponding to the device is destroyed.
[0055] According to the embodiment of the present application, a session body of an access device containing a protocol type and a temporary identifier is created, and on-site detection data is analyzed based on the protocol type, so that appropriate analysis methods can be adopted for data of different protocol types, ensuring the accuracy and effectiveness of data analysis, and enabling the system to correctly process on-site detection data from various heterogeneous devices.
[0056] The heartbeat packet is sent to the access device at regular intervals to detect its data transmission state, so that whether the access device is in a normal online working state can be grasped in real time, and device abnormalities such as network interruption and device failure can be found in time.
[0057] According to the site heterogeneous device autonomous access system provided by the present application, the protocol identification module is specifically used for: When the received on-site detection data is pure text data and the first line contains an HTTP keyword, it is determined that the protocol type corresponding to the on-site detection data is an HTTP protocol. When the received on-site detection data is hexadecimal data, the first byte has 01 in the first two bits and a fixed message type value in the third to fourth bits, and there is a 0xFF delimiter, it is determined that the protocol type corresponding to the on-site detection data is a CoAP protocol. When the first byte of the received on-site detection data is a control code between 0x10 and 0xF0, the control code conforms to a preset message type, and there is a subsequent MQTT Topic Name structure, it is determined that the protocol type corresponding to the on-site detection data is an MQTT protocol.
[0058] In the embodiment of the present application, the protocol identification module identifies and analyzes messages from various detection or monitoring devices, the system supports HTTP, CoAP, MQTT, Modbus RTU, and custom protocols, and performs corresponding identification and analysis according to the fixed organization format of the protocol. If there is no specific data returned, the corresponding protocol confirmation signal is returned. If there is specific data, the confirmation signal is returned and transferred to the data analysis module for processing. The message structure characteristics and protocol identification key features of each protocol are shown in Table 1.
[0059] Referring to Table 1, Table 1 is each protocol message structure and identification feature provided by the present application.
[0060] Table 1
[0061] HyperText Transfer Protocol (HTTP) identification analysis: if the received message is pure text and the first line is a common HTTP method (GET, POST, PUT, etc.) and contains Host, Content-Type, etc. keywords, it is determined to be an HTTP protocol. The request body (Body) is extracted, and if there is no data, a confirmation message is returned, and if there is data, the received information is returned and the part is transferred to the data analysis part.
[0062] Constrained Application Protocol (CoAP) identification analysis: if it is a hexadecimal message, the first byte has 01 in the first two bits, and 3~4 is a fixed message type value, it conforms to the CoAP protocol structure; further check whether there is a 0xFF delimiter to locate the Payload, then determine it as CoAP protocol. Identifier 0xFF, followed by data content, extract the data part, if there is no data, return a confirmation message, if there is data, return the received information and transfer the part to the data analysis part.
[0063] Message Queuing Telemetry Transport (MQTT) identification analysis: if the first byte is a control code between 0x10~0xF0 and conforms to the specified message type (for example, 0x30 = PUBLISH), and there is an MQTT Topic Name structure after it, it is determined to be an MQTT protocol. Read the Topic Name (specified topic name), and the subsequent content is the specific data published, if there is no data, return a confirmation message, if there is data, return the received information and transfer the part to the data analysis part.
[0064] Modbus Remote Terminal Unit (Modbus RTU) identification and analysis: if it is a hexadecimal message, first detect whether the function code meets the requirements, then intercept the data according to the length of the data field, and perform rule checking (such as CRC checking), and the end contains the same check field data that meets the rule, then it is determined as the Modbus RTU protocol. The analysis first checks the frame structure (address, function code, data field length, data field, and checking rule), then parses the data field according to the function code, if it is 0x03 (read holding register), it means reading the holding register data value, and finally decoding the register value (merge according to byte order, and convert to actual physical quantity), and the data is transmitted to the data analysis module.
[0065] Through the embodiment of the present application, the protocol identification module can determine the protocol type corresponding to the data in a short time by quickly checking the features of the first line, the first byte and other key positions of the field detection data. This fast identification mechanism reduces the data residence time in the system and improves the response speed of the system.
[0066] According to the site heterogeneous device autonomous access system provided by the present application, the protocol identification module is also used for: When the received field detection data does not match the existing protocol format, determining that the protocol type corresponding to the field detection data is a custom protocol; Based on the start symbol, the end symbol and the command code in the field detection data, determining whether there is communication data in the field detection data.
[0067] In the embodiment of the present application, when the protocol identification module does not identify the matching existing protocol format (for example, the above-mentioned 4 types of protocols), the analysis is performed according to the custom protocol rule, whether the data is contained is determined by identifying the start symbol, the end symbol and the command code part, if there is no data, a confirmation message is returned, if there is data, the received information is returned and the part is transferred to the data analysis part.
[0068] By extracting the start symbol, the end symbol and the command code and other key features in the field detection data, the system can accurately locate the boundary and structure of the data frame, even if the protocol format is unknown, the effective data can also be parsed through feature matching.
[0069] The identification function of the start symbol and the end symbol can avoid data truncation or misplacement, and the identification of the command code can distinguish different function data packets (such as control instructions, state feedback, etc.), ensuring the integrity and semantic correctness of data analysis.
[0070] Through the embodiment of the present application, when the field detection data does not match the existing protocol format (such as HTTP, CoAP, MQTT, etc.), the system determines it as a custom protocol. This design breaks through the limitation of the traditional protocol identification module that only supports standard protocols, so that the system can be compatible with non-standard or private communication protocols of manufacturers, thereby adapting to more diversified heterogeneous device access requirements.
[0071] According to the site heterogeneous device autonomous access system provided by the present application, the data analysis module is specifically used for: Based on the check identifier in the data receiving result, the target check algorithm is obtained by matching in a plurality of check algorithms, wherein the plurality of check algorithms include: parity check algorithm, cyclic redundancy check algorithm and longitudinal redundancy check algorithm; According to the target check algorithm, the data receiving result is subjected to data check to obtain the data check result corresponding to the field detection data; The data analysis module is further used for: When the data check result does not match the check code, the data receiving result is discarded, and the data error information is returned to the access device.
[0072] In the embodiment of the present application, the data analysis module analyzes the transmitted data (i.e. the data receiving result), mainly including data check, specific detection or monitoring data analysis.
[0073] In the data check process, first, the check identifier in the message is matched with the check algorithm type, then the calculation formula of the corresponding check algorithm is calculated, and finally the calculation result is compared with the check code. If they are consistent, it means that the data is complete, and the next step is to enter the specific data analysis link; if they are inconsistent, it means that the data is tampered in the transmission process, and the next step is to discard the data and return the data error information to the device. The specific check algorithm is shown in Table 2, which is the check algorithm corresponding table provided by the present application.
[0074] Table 2
[0075] After data check, if it is hexadecimal data, the various index data in the data field is analyzed in ASCII code; if it is JSON object data, the value is directly obtained through the key of the key-value pair (the identification information is shown in Table 4 and Table 5 below).
[0076] Each piece of data takes its own identifier as the start and the next identifier as the end. For example: BAC indicates the start of the basic field information; EXT indicates the start of the extension field information, and the end of the basic information field information; PAY indicates the start of the payload information, and the end of the extension field information. The lower layer data field analysis process of the three types of information is the same as the above method.
[0077] In the embodiment of the present application, the system is built-in with three mainstream check algorithms, including parity check, cyclic redundancy check (CRC) and longitudinal redundancy check (LRC), which cover the check requirements from simple to complex.
[0078] For example: parity check: suitable for low bandwidth and low power consumption devices, which can quickly detect data errors through single-bit check; CRC check: widely used in industrial protocols (such as Modbus and CAN bus), which can detect multi-bit burst errors; LRC check: commonly used in character type protocols (such as ASCII format), which verifies the data integrity through longitudinal summation.
[0079] By analyzing the check identifier (such as the check type field in the protocol header) in the data receiving result, the system automatically matches the target check algorithm without pre-configuring a fixed algorithm. This design enables the system to be compatible with the diversified check mechanisms adopted by devices from different manufacturers, thereby reducing the access threshold of the devices.
[0080] Through the embodiment of the present application, the data analysis module realizes intelligent check algorithm matching, accurate data check and error handling mechanism in the site heterogeneous device autonomous access system, which significantly improves the reliability of data transmission, system adaptability and resource utilization efficiency.
[0081] According to the site heterogeneous device autonomous access system provided by the present application, the system further comprises a data storage module. The data storage module is used to determine the data type corresponding to the data analysis result. The data analysis result is stored in the corresponding data table based on the data type, wherein the data table at least includes one of the following: basic information table, extended field information table, heavy metal data table, pH table, organic matter table, conductivity table, weather data table, picture data table, video data table and data correlation table.
[0082] In the embodiment of the present application, the data storage module stores the data analyzed by the data analysis module in the corresponding data table and object server. The data storage module includes but is not limited to the basic field information table, the extended field information table, the heavy metal data table, the pH table, the organic matter table, the conductivity table, the weather data table, the picture data table, the video data table and the data correlation table.
[0083] The basic field information table stores the basic information of the device, including a field device unique identifier, a readable name, a type code, a manufacturer identification, and a firmware version. The extended field information table stores the extended information of the device, including a time stamp, a detection personnel, a latitude and longitude coordinate, and the like, and is associated with the basic information table through the device unique identifier to provide time and personnel background information of the detection data. The heavy metal data table records the specific monitored heavy metals, including sample number, sample type, chromium, arsenic, nickel, copper, zinc, cadmium, lead, mercury, and the like. The pH table records sample number, sample type, and pH detection value. The organic matter table records sample number, sample type, and organic matter value. The conductivity table records sample number, sample type, and conductivity value. The weather data table includes sample number, sample type, temperature, humidity, wind speed, wind direction, and air pressure, and the like. The picture and video information table includes file name, size, storage path, label, and the like. The above tables are associated with the basic information table through the device unique identifier, and the latitude and longitude position information is fused. The data association table includes the association relationship between the data, the data in each table is integrated, and a complete data link is formed.
[0084] According to the site heterogeneous device autonomous access system provided by the application, the hardware adaptation module comprises a wireless communication module, a wired communication module and a power management module. The wireless communication module integrates a WiFi communication unit and a Bluetooth communication unit, the WiFi communication unit is used for wirelessly communicating and connecting with an access device with WiFi wireless function, and the Bluetooth communication unit is used for wirelessly communicating and connecting with an access device with a Bluetooth interface. The wired communication module comprises an RS485 standard serial communication interface and an RS422 standard serial communication interface, is compatible with a ModbusRTU industrial protocol, and is used for wired data transmission of an industrial grade sensing device. The power management module is used for supplying power to the access device based on the power supply type of the access device, and the power supply type comprises DC power supply and USB power supply. In some embodiments, when an access device with WiFi wireless function needs to be connected, the WiFi communication unit first starts a listening mode and scans the WiFi signal in the surrounding environment. The access device searches and tries to connect to the WiFi network of the specified SSID broadcasted by the hardware adaptation module according to the self-configuration. Once the access device initiates a connection request, the WiFi communication unit verifies the authentication information such as password provided by the access device. If the authentication is passed, a wireless communication connection is established, and a unique IP address is allocated to the access device (if IP network communication mode is adopted) so as to subsequently perform data transmission.
[0085] For the access device with Bluetooth interface, the Bluetooth communication unit enters the discoverable mode after initialization. The access device starts the Bluetooth search function, finds the Bluetooth device name of the hardware adaptation module, and initiates a pairing request. The Bluetooth communication unit of the hardware adaptation module responds to the pairing request and verifies according to the preset pairing key. After successful pairing, a Bluetooth wireless communication connection is established. For example, some portable sensor devices can be connected with the hardware adaptation module through Bluetooth to upload the collected data in real time.
[0086] The wired communication module includes an RS485 standard serial communication interface and an RS422 standard serial communication interface. During initialization, hardware detection is performed on the two interfaces to check whether the pin connection of the interface is correct, whether the signal level is normal, etc.
[0087] The wired communication module of the hardware adaptation module supports the ModbusRTU industrial protocol, which is a widely used serial communication protocol in the industrial field. When connected with an industrial sensor device, a physical connection is first established between the hardware adaptation module and the device through the RS485 or RS422 interface. Then, the hardware adaptation module acts as a master device and sends a request frame to a slave device (i.e., an industrial sensor device) according to the rules of the ModbusRTU protocol, requesting to read the register data of the device or write control instructions to the device. After receiving the request frame, the slave device parses it according to the protocol rules and returns a corresponding response frame. The hardware adaptation module parses the response frame to obtain the required data or confirm the execution of the instructions.
[0088] During the site periphery investigation process, the number of heterogeneous detection and monitoring devices of various manufacturers is large, the types are complex, there is no unified communication data structure to rely on, and in addition to different hardware communication methods, their communication protocols are heterogeneous, the internal data fields of the protocols are different, and unified access and processing cannot be achieved.
[0089] In the embodiments of the present application, a self-contained communication data organization structure is developed for the types of devices, communication types, protocol types, data types, and data contents involved in the site periphery investigation business, to meet the rapid deconstruction of various communication protocols (such as HTTP, MQTT, CoAP, ModbusRTU, and custom protocols), standardize the composition, ordering, and parsing steps of the data field, realize the standardized parsing process of the protocol data field, and improve the data integration efficiency and processing speed of the site periphery investigation business.
[0090] Based on the site surrounding environment field investigation and evaluation, often need water and soil gas multiple field detection equipment joint operation fusion multiple factor detection result carries on the field analysis, soil solid waste water body and so on detection equipment its data transmission hardware interface often different, may be RS485, RS422, Bluetooth, WiFi and so on multiple hardware interface, its compliance physical layer interface connection mode, data transmission protocol is also different, need to develop hardware converter matching multiple hardware interface and physical layer protocol for multiple instrument equipment to intelligent terminal data access provides hardware environment.
[0091] Therefore, in the embodiment of the application, based on the hardware adaptation module, the wireless communication module, the wired communication module and the power management module are used to complete the hardware connection and unified power supply of multiple interfaces, thereby providing hardware support for subsequent data access.
[0092] The registration mode is used for the access of the heterogeneous devices, which improves the complexity of multiple device access and increases the time cost and labor cost of access.
[0093] In the embodiment of the application, in order to reduce the access cost of multiple devices and realize the rapid access of multiple devices, a self-access mode is developed. The mode automatically identifies the communication protocol of the device through a protocol identification module based on the rules specified in the self-access communication data structure, and identifies and analyzes the data field through a data analysis module, thereby realizing the rapid access of multiple heterogeneous devices in the site surrounding investigation business, reducing the access cost and data acquisition period of the device, and accelerating the integration and processing speed of subsequent data.
[0094] According to the self-access system for heterogeneous devices in a site provided by the application, the target communication data structure comprises a protocol header, a data field and a protocol tail; The target communication data structure is a preset communication protocol data structure or a self-defined communication protocol data structure; The communication data in the data field of the preset communication protocol data structure uses 16 hexadecimal byte transmission or JSON object transmission; The self-defined communication protocol data structure comprises a start symbol, a command code, a check algorithm, a data field, a check code and an end symbol.
[0095] In some embodiments, the protocol header contains some basic identification information, such as the protocol version number and the device type identification. These information is encoded in a specific byte format, which is used for the receiving party to identify the version of the communication protocol and the type of the sending device, so as to correctly analyze and process the data.
[0096] The protocol tail usually contains some end identifiers, such as checksum, etc. The checksum is used to verify whether the data is error during transmission, and the receiving party can calculate the checksum according to the preset algorithm, and compare it with the checksum in the protocol tail. If they are consistent, it is considered that the data transmission is correct.
[0097] When the 16-bit byte transmission mode is selected, the communication data in the data field is encoded and transmitted in the form of 16-bit bytes. This mode is suitable for some scenarios with relatively high requirements for data transmission efficiency and relatively simple data format.
[0098] For some scenarios that need to transmit complex data structures and hope to improve data readability and scalability, the JSON object transmission mode can be selected. Before sending data, the data is encapsulated into a JSON format object, and then converted into a byte stream for transmission. After receiving the data, the receiving party restores the byte stream to a JSON object and performs corresponding processing.
[0099] In some embodiments, the detection equipment communication data structure is used to agree on the autonomous data access of the detection equipment, including two types of mainstream communication protocols (i.e. preset communication protocol data) and custom communication protocols.
[0100] The mainstream communication protocol mainly stipulates the communication data structure of the data field, and can use 16-bit byte transmission and JSON object transmission. The custom communication protocol stipulates the communication data structure of the start symbol, command code, verification algorithm, data field, verification code, and end symbol. Compared with other protocols, the custom communication protocol adds five parts of start symbol, command code, verification algorithm, verification code, and end symbol, each of which is implemented by 16-bit bytes, and the identifier uses the first character abbreviation of the English name. The overall organization structure of the autonomous communication data structure includes a protocol header, a data field, and a protocol tail.
[0101] Reference Figure 4 , Figure 4 is the autonomous communication data structure organization structure provided by the application, which includes a protocol header, a data field, and a protocol tail.
[0102] Among them, the start symbol, command code, verification algorithm, verification code, and end symbol are unique parts of the custom communication protocol, and no identifier is set, which are specifically: Start symbol: 0xAA, indicating the start of the data frame; Command code: 0x01 represents response data, and 0x02 represents a heartbeat packet; Check algorithm: 0x01 represents odd check, 0x02 represents even check, 0x03 represents CRC-8, 0x04 represents CRC-16, 0x05 represents CRC-32, 0x06 represents LRC-8, 0x07 represents LRC-16, 0x08 represents LRC-32; Check code: data is generated according to the check algorithm, and the data field is checked; End symbol: 0xFF, indicating the end of the data frame.
[0103] Data field: variable length, including three categories, and the fixed identifier corresponds to the meaning: BAC represents basic information, EXT represents extension field information, and PAY represents payload.
[0104] When 16-bit data transmission is parsed, conversion is performed according to the ASCII code table, and each type of identifier occupies 3 bytes.
[0105] When the JSON object is transmitted and parsed, the key value pair key value is directly obtained.
[0106] Specifically, as shown in Table 3, Table 3 provides a field format definition and example table.
[0107] Table 3
[0108] The three types of identifiers in the data field and their meanings are: BAC represents basic field information, EXT represents extension field information, and PAY represents payload information. The identifiers are transmitted using hexadecimal values according to the ASCII code table.
[0109] The number of data bytes in the basic information and extension field information in the three types of data identifiers is not specified, and is identified by the identifier. In the detection type in the payload, each type of detection or monitoring value is stored using 4 bytes according to the IEEE754 standard.
[0110] The basic information includes device unique identifier, readable name, type code, manufacturer identifier, firmware version, etc., wherein the device unique identifier is a mandatory field, and the device is generated according to a specific rule, for example: device MAC address combined with manufacturer name abbreviation letter.
[0111] The extension field information includes timestamp, detection personnel, coordinate value, etc.
[0112] The payload includes sample type and detection type.
[0113] Among them, the sample type includes: 0x01 represents solid waste sample, 0x02 represents surface water sample, 0x03 represents underground water sample, 0x04 represents soil sample, 0x05 represents sediment sample, 0x06 represents crop fruit sample, etc.
[0114] The detection types include heavy metals, pH, organic matter, conductivity, environmental parameters, etc.
[0115] Each type of field has a fixed identifier, and is arranged in the above order. When parsing, the identifier and data are converted according to the ASCII code table. Table 4 is provided by the present application, which is the data field identifier and meaning.
[0116] Table 4
[0117] In data transmission, each type of data is marked with a specific identifier to indicate the starting position of the data.
[0118] The basic field information, extended field information, and payload information must have corresponding identifiers in data transmission. The small class information under the large class information can be increased or decreased according to the actual situation of the device. Among them, the device unique identifier in the basic information category is set to be mandatory.
[0119] If a data class has no data class, the data of this class will be skipped in data stream parsing, and the next identifier will be identified. For example, in the detection type, only heavy metal elements are included, and the identifier is HM. Only the heavy metal element part is parsed, and the other parts are not identified, and the corresponding parsing algorithm is not triggered.
[0120] The detection or monitoring data type is classified in detail as follows: Heavy metals include chromium, arsenic, nickel, copper, zinc, cadmium, lead, mercury, etc. pH includes pH value. Organic matter includes organic matter value. Conductivity includes EC conductivity value. Environmental parameters include weather, vision, etc.
[0121] Each of the above data types is provided with a fixed identifier. In data transmission, each type of data is composed of a type identifier and its corresponding data. If the detection or monitoring data only contains one detection type, it is identified in the order of the corresponding identifier of the sample. If it contains multiple detection types, the data is arranged according to the heavy metal, pH, organic matter, conductivity, and environmental parameter data. Among them, the heavy metal elements are sorted in ascending order of atomic number.
[0122] If hexadecimal transmission is used, the identifier parsing needs to be converted according to the ASCII code table. The detection or monitoring data value is parsed using the IEEE754 standard, and finally converted to floating-point data.
[0123] If JSON object transmission is used, the detection or monitoring data value is uniformly used as floating-point data.
[0124] The visual data includes video data and image data, the data network storage address is transmitted using a JSON object, and the video and image are stored in the form of an object. The units of various types of data in the meteorological data are agreed to be: temperature (℃ / ℉), humidity (%), wind speed (m / s), and air pressure (hPa); and the unit of heavy metal element detection is mg / kg. The specific units are shown in Table 5. Table 5
[0125] The application constructs a site heterogeneous device autonomous access system, based on an autonomous communication data structure, listens to the online intention of a device, automatically identifies a protocol and a data structure, realizes wired and wireless communication of heterogeneous devices such as WiFi, Bluetooth, RS422, and RS485, data transmission of HTTP, MQTT, CoAP, Modbus RTU, and a custom protocol, and can be used for detection and monitoring of multiple types of samples such as soil, atmospheric deposition, sediment, surface water, underground water, and crop fruits. Multiple collection scene applications, multiple protocol adaptations, and multiple interface compatibilities are realized, and finally multiple types of data access, processing, and integration are realized. The difficulty of development and transformation of the detection or monitoring device end is reduced, the access cost of the heterogeneous device is reduced, the investigation efficiency of the site periphery is improved, and faster multi-source detection and monitoring data collection and business response are realized.
[0126] The application effectively solves the problems of low device data acquisition efficiency, complicated data classification, and complex processing flow caused by relying on manual operation in traditional services, realizes timely and accurate acquisition of multiple types of device data by researchers, and rapid acquisition of detection or monitoring results by government personnel. In addition to being applied to site periphery investigation scenes, it can be applied to agricultural land soil investigation, site remediation management, and other business scenes. According to different business scenes, the corresponding communication data structure is adjusted to meet the rapid access of multiple types of heterogeneous devices in multiple business scenes, reduce the access cost of device manufacturers, improve the access willingness of device manufacturers, shorten the time period of data collection and integration processing of researchers, improve data quality, effectively control the cost of human resource investment, realize multiple cost reduction and efficiency improvement.
[0127] The site heterogeneous device autonomous access method provided by the application is described below. The site heterogeneous device autonomous access method described below can be correspondingly referred to the site heterogeneous device autonomous access system described above.
[0128] Reference Figure 5 , Figure 5 is a flowchart of the site heterogeneous device autonomous access method provided by the application.
[0129] In step 501, the on-site detection data of the target communication data structure transmitted by the access device is acquired through a physical interface.
[0130] The access device is a plurality of heterogeneous devices for investigating the site surrounding environment.
[0131] In step 502, the on-line intention message in the site detection data is determined.
[0132] In step 503, the protocol type corresponding to the site detection data is obtained by performing protocol identification on the site detection data when the site detection data carries the on-line intention message.
[0133] In step 504, the data receiving result corresponding to the site detection data is obtained by performing analysis on the site detection data based on the protocol type.
[0134] In step 505, the data checking result corresponding to the site detection data is obtained by performing data checking based on the checking identifier in the data receiving result.
[0135] In step 506, the data field in the data receiving result is analyzed to obtain the data analysis result corresponding to the site detection data when the data checking result matches the checking code, wherein the data analysis result includes the basic field information, the extended field information and the effective load information.
[0136] The data analysis result is used for risk assessment of the site surrounding environment investigation site.
[0137] Specifically, the above-mentioned site heterogeneous device autonomous access method provided by the present application can realize all method steps realized by the above-mentioned site heterogeneous device autonomous access system embodiment, and can achieve the same technical effect, and the same parts and beneficial effects in this embodiment as the method embodiment will not be described in detail.
[0138] Figure 6 is the entity structure schematic diagram of the electronic device provided by the present application, such as Figure 6As shown, the electronic device can include a processor 610, a communications interface 620, a memory 630, and a communications bus 640, wherein the processor 610, the communications interface 620, and the memory 630 complete mutual communication through the communications bus 640. The processor 610 can invoke a logic instruction in the memory 630 to execute a field heterogeneous device autonomous access method, which includes: obtaining on-site detection data of a target communication data structure transmitted by an access device through a physical interface, wherein the access device is a plurality of heterogeneous devices for investigating a field of a surrounding environment; performing notification listening on the on-site detection data to determine whether an online intention message is carried in the on-site detection data; when the on-site detection data carries the online intention message, performing protocol identification on the on-site detection data to obtain a protocol type corresponding to the on-site detection data; based on the protocol type, performing analysis on the on-site detection data to obtain a data reception result corresponding to the on-site detection data; based on a check identifier in the data reception result, performing data check to obtain a data check result corresponding to the on-site detection data; when the data check result matches a check code, performing analysis on a data field in the data analysis result to obtain a data analysis result corresponding to the on-site detection data, wherein the data analysis result includes: basic field information, extension field information, and effective load information; and the data analysis result is used for risk assessment on the field of the surrounding environment for investigation.
[0139] In addition, the logic instruction in the memory 630 described above can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0140] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program being stored in a non-transitory computer-readable storage medium, and the computer program being executable by a processor to enable a computer to perform the site heterogeneous device autonomous access method provided by any of the above methods, the method comprising: obtaining, by a physical interface, on-site detection data of a target communication data structure transmitted by an access device, wherein the access device is a plurality of heterogeneous devices for investigating a site surrounding environment; performing announcement listening on the on-site detection data to determine whether an online intention message is carried in the on-site detection data; when the on-site detection data carries the online intention message, performing protocol identification on the on-site detection data to obtain a protocol type corresponding to the on-site detection data; performing analysis on the on-site detection data based on the protocol type to obtain a data reception result corresponding to the on-site detection data; performing data verification based on a verification identifier in the data reception result to obtain a data verification result corresponding to the on-site detection data; when the data verification result matches a verification code, performing analysis on a data field in the data reception result to obtain a data analysis result corresponding to the on-site detection data, wherein the data analysis result comprises: basic field information, extended field information, and effective load information; and the data analysis result is used for risk assessment on the site surrounding environment investigation site.
[0141] In yet another aspect, the present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the site heterogeneous device autonomous access method provided by any of the above methods, the method comprising: obtaining, by a physical interface, on-site detection data of a target communication data structure transmitted by an access device, wherein the access device is a plurality of heterogeneous devices for investigating a site surrounding environment; performing announcement listening on the on-site detection data to determine whether an online intention message is carried in the on-site detection data; when the on-site detection data carries the online intention message, performing protocol identification on the on-site detection data to obtain a protocol type corresponding to the on-site detection data; performing analysis on the on-site detection data based on the protocol type to obtain a data reception result corresponding to the on-site detection data; performing data verification based on a verification identifier in the data reception result to obtain a data verification result corresponding to the on-site detection data; when the data verification result matches a verification code, performing analysis on a data field in the data reception result to obtain a data analysis result corresponding to the on-site detection data, wherein the data analysis result comprises: basic field information, extended field information, and effective load information; and the data analysis result is used for risk assessment on the site surrounding environment investigation site.
[0142] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0143] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0144] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A site-specific autonomous access system for heterogeneous equipment, characterized in that, include: Hardware adaptation module, protocol recognition module, and data parsing module; The hardware adaptation module is used to acquire on-site detection data of the target communication data structure transmitted by the access device through a physical interface, wherein the access device is a variety of heterogeneous devices at the site surrounding environment survey site; The protocol identification module is used to listen to the notification of the on-site detection data and determine whether the on-site detection data carries an online intent message. When the on-site detection data carries an online intent message, the on-site detection data is subjected to protocol identification to obtain the protocol type corresponding to the on-site detection data; The field detection data is parsed based on the protocol type to obtain the data reception result corresponding to the field detection data; The data parsing module is used to perform data verification based on the verification identifier in the data receiving result, and obtain the data verification result corresponding to the field detection data. When the data verification result matches the verification code, the data fields in the data receiving result are parsed to obtain the data parsing result corresponding to the on-site detection data. The data parsing result includes: basic field information, extended field information, and effective load information. The data parsing result is used to conduct a risk assessment of the on-site environmental survey.
2. The site heterogeneous equipment autonomous access system according to claim 1, characterized in that, The target communication data structure includes: a protocol header, a data field, and a protocol trailer; The target communication data structure is a preset communication protocol data structure or a custom communication protocol data structure; The communication data in the data field of the preset communication protocol data structure is transmitted using hexadecimal bytes or JSON objects. The custom communication protocol data structure includes: a start symbol, a command code, a verification algorithm, a data field, a checksum, and an end symbol.
3. The site heterogeneous equipment autonomous access system according to claim 1, characterized in that, The hardware adaptation module includes: a wireless communication module, a wired communication module, and a power management module; The wireless communication module integrates a WiFi communication unit and a Bluetooth communication unit. The WiFi communication unit is used to establish a wireless communication connection with an access device that has WiFi wireless functionality; the Bluetooth communication unit is used to establish a wireless communication connection with an access device that has a Bluetooth interface. The wired communication module includes an RS485 standard serial communication interface and an RS422 standard serial communication interface, and is compatible with the Modbus RTU industrial protocol, used for wired data transmission to industrial-grade sensing devices. The power management module is used to supply power to the access device based on the power supply type of the access device, which includes DC power supply and USB power supply.
4. The site heterogeneous equipment autonomous access system according to claim 1, characterized in that, After performing protocol identification on the on-site detection data to obtain the protocol type corresponding to the on-site detection data, the protocol identification module is further configured to: Create a session body corresponding to the access device, wherein the session body includes: protocol type and temporary identifier, and the session body is used to parse the field detection data based on the protocol type; A heartbeat packet is periodically sent to the access device, wherein the heartbeat packet is used to detect the data transmission status of the access device; Determine the online detection result corresponding to the heartbeat packet. If the online detection result indicates that the access device is offline, delete the session body corresponding to the access device.
5. The site heterogeneous equipment autonomous access system according to claim 1, characterized in that, The protocol identification module is specifically used for: If the received on-site detection data is plain text data and the first line contains the keyword "HTTP", then the protocol type corresponding to the on-site detection data is determined to be the HTTP protocol. When the received field detection data is hexadecimal data, the first two bits of the first byte are 01, the 3rd and 4th bits are fixed message type values, and a 0xFF separator is present, the protocol type corresponding to the field detection data is determined to be CoAP protocol. If the first byte of the received field detection data is a control code between 0x10 and 0xF0, the control code conforms to the preset message type, and an MQTT Topic Name structure is subsequently present, then the protocol type corresponding to the field detection data is determined to be the MQTT protocol.
6. The site heterogeneous equipment autonomous access system according to claim 5, characterized in that, The protocol identification module is further used for: When the received field detection data does not match any existing protocol format, the protocol type corresponding to the field detection data is determined to be a custom protocol. Based on the start symbol, end symbol, and command code in the field detection data, determine whether there is communication data in the field detection data.
7. The site heterogeneous equipment autonomous access system according to claim 1, characterized in that, The data parsing module is specifically used for: Based on the verification identifier in the data reception result, a target verification algorithm is obtained by matching it with multiple verification algorithms. The multiple verification algorithms include: parity check algorithm, cyclic redundancy check algorithm and longitudinal redundancy check algorithm. According to the target verification algorithm, the data receiving result is verified to obtain the data verification result corresponding to the field detection data; The data parsing module is also used for: If the data verification result does not match the verification code, the data reception result is discarded and a data error message is returned to the access device.
8. The site heterogeneous equipment autonomous access system according to claim 1, characterized in that, The system also includes: a data storage module; The data storage module is used to determine the data type corresponding to the data parsing result; Based on the data type, the data parsing results are stored in the corresponding data table, wherein the data table includes at least one of the following: basic information table, extended field information table, heavy metal data table, pH table, organic matter table, conductivity table, meteorological data table, image data table, video data table, and data association table.
9. A method for autonomous access of heterogeneous equipment in a site, characterized in that, include: Obtain on-site detection data of the target communication data structure transmitted by the access device through the physical interface; The on-site detection data is monitored to determine whether the on-site detection data carries an online intent message. The access device is a variety of heterogeneous devices at the site's surrounding environment survey site. When the on-site detection data carries an online intent message, the on-site detection data is subjected to protocol identification to obtain the protocol type corresponding to the on-site detection data; The field detection data is parsed based on the protocol type to obtain the data reception result corresponding to the field detection data; Data verification is performed based on the verification identifier in the data reception result to obtain the data verification result corresponding to the on-site detection data. When the data verification result matches the verification code, the data fields in the data receiving result are parsed to obtain the data parsing result corresponding to the on-site detection data. The data parsing result includes: basic field information, extended field information, and effective load information. The data parsing result is used to conduct a risk assessment of the on-site environmental survey.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the site heterogeneous equipment autonomous access method as described in claim 9.