Multi-protocol equipment data conversion method, device and equipment based on Hongyu system, and medium

By parsing and mapping equipment data information to the standard data fields of the Kuanghong system, the shortcomings of traditional protocol gateways and general IoT platforms in accuracy and real-time performance are solved, efficient collection and reliable transmission of mining equipment data are achieved, and plug-and-play of equipment is supported.

CN120751029APending Publication Date: 2025-10-03HONGHU WANLIAN (JIANGSU) TECH DEV CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202511015370.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Traditional protocol gateways lack the intelligent processing capabilities of data types and range units, resulting in insufficient accuracy in conversion results. General IoT platforms cannot meet the special requirements of mining scenarios for real-time and reliability, making it difficult to achieve reverse conversion of equipment control instructions.

Method used

By obtaining the data frame sent by the first protocol host, parsing and mapping it, the device data information is converted into the standard data field of the second protocol object model that conforms to the Kuanghong system according to the predefined relationship, and encapsulated, real-time monitoring of the device status and accurate issuance of remote control instructions are achieved.

Benefits of technology

It significantly improves the data collection efficiency and system compatibility of mining equipment, realizes plug-and-play of equipment from different manufacturers, and provides reliable technical support for the intelligent construction of mines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120751029A_ABST
    Figure CN120751029A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-protocol device data conversion method, device and equipment based on a red-mine system, and a medium. The method comprises the following steps: acquiring a first protocol data frame sent by a first protocol host; analyzing the protocol data frame to obtain at least one piece of equipment data information contained in the protocol data frame; according to a predefined mapping relation, mapping each piece of equipment data information to a standard data field based on a second protocol object model; and performing data encapsulation on the mapped data according to a second protocol format to generate a second protocol data frame, and sending the second protocol data frame to a second protocol client application in the Hongyu system through a second protocol server. Seamless joint between the industrial field equipment and the intelligent mine system is realized, and the data transmission efficiency and the system compatibility are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial communication technology, and in particular to a multi-protocol device data conversion method, device, equipment and medium based on a mining system. Background Art

[0002] With the rapid advancement of intelligent mining construction and the in-depth application of industrial Internet of Things technology, the protocol differences between traditional electromechanical equipment and new intelligent systems are becoming increasingly prominent.

[0003] In the existing technology, protocol conversion mainly adopts two technical routes: the basic protocol gateway realizes data format conversion through simple register address mapping and supports one-way data collection; the intelligent IoT platform builds a standardized data model interface based on a general protocol parsing framework.

[0004] During the research and development process, the inventors discovered that although traditional protocol gateways can realize basic data conversion, they lack the intelligent processing capabilities of data types and measurement units, resulting in insufficient accuracy of conversion results; and although general IoT platforms support multiple protocol access, they cannot meet the special requirements of mining scenarios for real-time and reliability, and it is difficult to achieve reverse conversion of equipment control instructions. Summary of the Invention

[0005] The embodiments of the present invention provide a multi-protocol device data conversion method, device, equipment and medium based on the Kuanghong system, which can realize seamless data interaction between the first device and the Kuanghong intelligent system.

[0006] According to one aspect of an embodiment of the present invention, a multi-protocol device data conversion method based on a mining system is provided, the method comprising:

[0007] Obtaining a first protocol data frame sent by a first protocol host, wherein the first host is connected to each first slave device in the Kuanghong system and is used to collect device data reported by each first slave device;

[0008] Parsing the first protocol data frame to obtain at least one item of device data information contained in the first protocol data frame;

[0009] According to a predefined mapping relationship, each of the device data information is mapped to a standard data field based on the second protocol object model;

[0010] The mapped data is encapsulated in accordance with the second protocol format to generate a second protocol data frame, and the second protocol data frame is sent to the second protocol client application in the Kuanghong system via the second protocol server.

[0011] According to another aspect of an embodiment of the present invention, a multi-protocol device data conversion device based on a mining system is provided, the device comprising:

[0012] a data acquisition module, configured to acquire a first protocol data frame sent by a first protocol host, wherein the first host is connected to each first slave device in the Kuanghong system, and to collect device data reported by each first slave device;

[0013] a data parsing module, configured to parse the first protocol data frame and obtain at least one item of device data information contained in the first protocol data frame;

[0014] A data mapping module, configured to map the device data information to a standard data field based on a second protocol object model according to a predefined mapping relationship;

[0015] The data encapsulation and transmission module is used to encapsulate the mapped data in accordance with the second protocol format, generate a second protocol data frame, and send the second protocol data frame to the second protocol client application in the Kuanghong system via the second protocol server.

[0016] According to another aspect of an embodiment of the present invention, an electronic device is provided, the electronic device comprising:

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a multi-protocol device data conversion method based on a mining system as described in any embodiment of the present invention.

[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a multi-protocol device data conversion method based on a mining system as described in any embodiment of the present invention when executed.

[0021] The technical solution of the embodiment of the present invention is to establish a physical connection between the first host and the first slave device in the Mine Hong system, regularly collect the first protocol data frames reported by the device, and perform integrity verification and protocol parsing on the data frames, extract device data containing key information such as register addresses, function codes and original values, and then based on the predefined triple mapping relationship, intelligently map the parsed device data information to the standard data field that complies with the second protocol physical model specification, complete data type conversion and range adaptation, and finally securely encapsulate the standardized data according to the second protocol format, add metadata such as timestamp and device ID, generate a structured second protocol data frame, and establish two-way data interaction with the second protocol client application in the Mine Hong system through the second protocol server to realize real-time monitoring of device status and accurate issuance of remote control instructions. This new multi-protocol data conversion method can significantly improve the data collection efficiency and system compatibility of mining equipment, and realize plug-and-play of equipment from different manufacturers through a standardized protocol conversion architecture, providing reliable technical support for the construction of intelligent mines.

[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 This is a flowchart of a multi-protocol device data conversion method based on the Kuanghong system provided according to the first embodiment of the present invention;

[0025] Figure 2 This is a flowchart of another multi-protocol device data conversion method based on the Kuanghong system according to the second embodiment of the present invention;

[0026] Figure 3 Flowchart of another multi-protocol device data conversion method based on the Mine Hong system provided according to the third embodiment of the present invention;

[0027] Figure 4 Flowchart of another multi-protocol device data conversion method based on the Mine Hong system provided according to the fourth embodiment of the present invention;

[0028] Figure 5 This is a schematic diagram of a data link provided according to Embodiment 5 of the present invention;

[0029] Figure 6 This is a schematic diagram of a software architecture provided according to the fifth embodiment of the present invention;

[0030] Figure 7 This is a schematic diagram of a data processing flow provided according to Embodiment 5 of the present invention;

[0031] Figure 8 1 is a schematic diagram of a Modbus protocol application layer message header provided according to Embodiment 5 of the present invention;

[0032] Figure 9 This is a data mapping representation provided according to the fifth embodiment of the present invention;

[0033] Figure 10 This is a schematic diagram of the correspondence between a triple and a device point table provided in accordance with the fifth embodiment of the present invention;

[0034] Figure 11 2 is a schematic diagram of the structure of a multi-protocol device data conversion device based on the Kuanghong system according to the sixth embodiment of the present invention;

[0035] Figure 12 It is a structural diagram of an electronic device that implements a multi-protocol device data conversion method based on a mining system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0037] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] Example 1

[0039] Figure 1 The present invention provides a flowchart of a multi-protocol device data conversion method based on the Mine Hong system in accordance with the first embodiment. This embodiment is applicable to the multi-protocol device data conversion in the Mine Hong system. The method can be executed by a multi-protocol device data conversion device based on the Mine Hong system. The device can be implemented in the form of hardware and / or software and can generally be configured in an edge computing device or a dedicated gateway.

[0040] Correspondingly, such as Figure 1 As shown, the method includes:

[0041] S110. Obtain a first protocol data frame sent by a first protocol host, wherein the first host is connected to each first slave device in the Mine Hong system and is used to collect device data reported by each first slave device.

[0042] Among them, the first protocol can be understood as the basic protocol for communication between the underlying devices and the host in the mining system, which is responsible for the collection and transmission of raw data. Its core feature is to support the master-slave architecture (host polling, slave device response), and defines a set of standardized data frame formats to ensure the interconnection between devices. The first protocol can be Modbus RUT (Modbus Remote Terminal Unit Protocol), Profibus DP (Process Field Bus Decentralized Periphery Protocol) and HART (Highway Addressable Remote Transducer), etc., and the most preferred is the Modbus RUT protocol. The first host can be understood as the core communication control unit in the industrial automation system. It plays the role of the data acquisition center in the protocol conversion solution and has the functions of receiving command signals and executing various commands.

[0043] The first slave device can be understood as the terminal execution unit in an industrial automation system, playing a key role in data acquisition and command execution within the protocol conversion system. The first protocol data frame can be understood as the basic data unit for master-slave communication, organized in a compact binary format. Its standard structure includes the device address, function code, data field, and CRC (Cyclic Redundancy Check) checksum. For example, in the register read request frame "01 0300 01 00 01D5 CA," 01 is the slave address, 03 is the function code, 0001 and 0001 specify the starting address and register number, respectively, and D5 CA is the CRC checksum value.

[0044] In this embodiment, a physical connection is established between the first host and each first slave device in the Mine Hong system, and a polling mechanism is used to periodically send a request frame containing a function code and a register address, and receive a binary data frame returned by the slave device. The data frame contains original data such as the device status and sensor value. The first host can be connected to the slave device through the RS-485 bus, and the communication parameters need to match the standard settings such as the baud rate and check bit. The collected data frame will serve as the basic input for subsequent protocol parsing.

[0045] S120: Parse the first protocol data frame to obtain at least one item of device data information contained in the first protocol data frame.

[0046] In this embodiment, the integrity of the first protocol data frame can be verified first through CRC check, and then the function code can be extracted to determine the operation type (such as 03 read holding register), the register address and data content are parsed, and the original binary data is converted into structured data containing key information such as device address, register address and value, providing standardized input for subsequent mapping conversion. This process strictly follows the first protocol specification to ensure the accuracy and reliability of data parsing.

[0047] S130: Map each device data information to a standard data field based on the second protocol object model according to a predefined mapping relationship.

[0048] Among them, the second protocol physical model can be understood as a device interconnection and data communication protocol standard designed specifically for mining industry scenarios. It mainly solves the reliable communication and intelligent management needs of underground equipment in complex environments. The second protocol physical model can be the MDTP (Mining Device Transfer Protocol) physical model.

[0049] In this embodiment, the target field corresponding to each device data information is first determined by querying a predefined mapping table, including the correspondence between the register address and the second protocol attribute name; then necessary numerical conversion processing is performed, such as data type conversion (16-bit integer to floating point number) and unit conversion (raw value to engineering value); finally, a standardized output is generated to ensure that the data format strictly complies with the second protocol object model specification. The entire process adopts a structured processing flow to ensure the accuracy and consistency of the conversion results.

[0050] S140. Encapsulate the mapped data in accordance with the second protocol format to generate a second protocol data frame, and send the second protocol data frame to the second protocol client application in the Kuanghong system via the second protocol server.

[0051] In this embodiment, necessary protocol header fields, such as timestamp, device identifier, and data length, are added according to the second protocol frame format requirements. The data content is then optimized for binary encoding, using the TLV (Type-Length-Value) format to organize the various object model attributes. Finally, a CRC checksum is added to ensure transmission integrity, generating a second protocol data frame that complies with the mining equipment transmission protocol standard. This data frame is transmitted to the target second protocol client application via the communication channel established by the second protocol server, completing end-to-end data delivery.

[0052] The technical solution of the embodiment of the present invention is to establish a physical connection between the first host and the first slave device in the Mine Hong system, regularly collect the first protocol data frames reported by the device, and perform integrity verification and protocol parsing on the data frames, extract device data containing key information such as register addresses, function codes and original values, and then based on the predefined mapping relationship, intelligently map the parsed device data information to the standard data field that complies with the second protocol physical model specification, complete the data type conversion and range adaptation, and finally securely encapsulate the standardized data according to the second protocol format, add metadata such as timestamp and device ID, generate a structured second protocol data frame, and establish two-way data interaction with the second protocol client application in the Mine Hong system through the second protocol server to realize real-time monitoring of device status and accurate issuance of remote control instructions. This new multi-protocol data conversion method can significantly improve the data collection efficiency and system compatibility of mining equipment, and realize plug-and-play of equipment from different manufacturers through a standardized protocol conversion architecture, providing reliable technical support for the construction of intelligent mines.

[0053] Example 2

[0054] Figure 2 This is a flowchart of another multi-protocol device data conversion method based on the Kuanghong system, provided in Example 2 of the present invention. This example is optimized based on the above examples. Specifically, the operation of "parsing the first protocol data frame to obtain at least one device data information contained in the first protocol data frame" is refined.

[0055] Correspondingly, such as Figure 2 As shown, the method includes:

[0056] S210. Obtain a first protocol data frame sent by a first protocol host, wherein the first host is connected to each first slave device in the Mine Hong system and is used to collect device data reported by each first slave device.

[0057] S220: Locate a data frame position where the device data is located in the first protocol data frame according to a first protocol standard.

[0058] In this embodiment, the data frame integrity is first verified. After confirming the CRC checksum is correct, the starting position of the data field is determined based on the function code type: for a response frame with function code 03 (read holding register), the data field starts at byte 3; for a response frame with function code 04 (read input register), the data field starts at byte 3; for a response frame with function code 10 (write multiple registers), the data field starts at byte 5. By calculating the data field length field value, the offset address and byte range of the device data set in the data frame are accurately located, ensuring that the register address and value subsequently extracted strictly correspond to the binary format defined by the protocol.

[0059] S230. Extracting a device data set of a first protocol data structure at the data frame position;

[0060] The device data set includes at least one item of device data information, and each item of device data information includes a register address and a register value stored in the register address.

[0061] The data set may be understood as a structured data set extracted from the first protocol data frame, including register addresses and corresponding register values.

[0062] In this embodiment, the data field is precisely parsed according to the first protocol specification: for response frames with function codes 03 (read holding registers) and 04 (read input registers), the data field contains a 1-byte byte count identifier and an N-byte register value sequence; for response frames with function code 10 (write multiple registers), the data field begins at byte 5. Subsequently, the continuous binary data stream is split into discrete key-value pairs in register address order, where the key is the register address in hexadecimal format (e.g., 0x1000) and the value is the corresponding original register value (e.g., 0x00A0).

[0063] S240: Map each device data information to a standard data field based on the second protocol object model according to a predefined mapping relationship.

[0064] S250. Encapsulate the mapped data in accordance with the second protocol format to generate a second protocol data frame, and send the second protocol data frame to the second protocol client application in the Kuanghong system via the second protocol server.

[0065] Optionally, based on the above embodiments, mapping each device data information to a standard data field based on the second protocol object model according to a predefined mapping relationship may include:

[0066] Sequentially acquiring current device data information from each of the device data information, and extracting a current register address and a current register value stored in the current register from the current device data information;

[0067] Querying a pre-established mapping relationship table to obtain a target mapping entry that matches the current register address, and extracting a target second protocol object model field and a target conversion rule from the target mapping entry;

[0068] Convert the current register value into a target second protocol field value according to a target conversion rule, and combine the target second protocol object model field with the target second protocol field value to obtain second protocol device data;

[0069] Return to execute the operation of sequentially obtaining the current device data information from each of the device data information until all the device data information is processed, and organize the obtained second protocol device data to obtain a second protocol data structure.

[0070] Generally speaking, the protocol conversion process begins with a systematic traversal of the raw device data. Using an iterator mechanism, each data item is accessed one by one to accurately extract the register address and corresponding binary value. This stage is critical to maintaining data integrity and avoiding information loss caused by preprocessing. It also converts hardware register addresses into standardized hexadecimal identifiers (such as 0x1000) to establish a unified data identification system for subsequent processing.

[0071] Generally speaking, the protocol conversion process precisely matches register addresses to physical model fields by querying a predefined mapping table. When processing each device data message, the current register address is used as the search key to search the mapping table for a fully matching target entry. Upon a successful match, two key parameters are extracted from this entry: the target second-protocol physical model field name (e.g., "motor_temperature") and the target conversion rule (e.g., "uint16_to_float×0.1"). These two parameters serve as the baseline for subsequent data conversion. The entire query process strictly adheres to the hierarchical structure defined in the mapping table, ensuring that each register address is associated with the correct physical model attributes and data processing rules.

[0072] Generally speaking, the conversion process strictly adheres to the target conversion rules defined in the mapping table, performing precise data processing on the current register value. The original binary value (such as 0x00A0) is first converted to a type (such as a 16-bit integer to a 32-bit floating point number) according to the rules. It then undergoes a range adjustment (such as multiplication by a coefficient of 0.1) to generate a target second protocol field value that meets engineering specifications (such as 25.5°C). A numerical validity check is also performed to ensure that the result is within the reasonable range defined by the physical model. The converted target second protocol field value is then structurally bound to the corresponding physical model field name (such as "motor_temperature"). The field name, conversion value, timestamp, and other elements are combined into a standardized second protocol device data entry according to the message format specified by the second protocol.

[0073] Generally speaking, loop through each device data item, extract the current register address and register value in turn, then query the mapping relationship table to obtain the corresponding second protocol object model field and conversion rules, perform numerical conversion and unit conversion to generate a standardized second protocol field value, and structure the value with the target second protocol object model field. Finally, all processed second protocol device data are organized into a hierarchical second protocol data structure according to the protocol specification, ensuring that the data format complies with the object model definition and maintains complete register address traceability information.

[0074] Specifically, in one example, the Modbus driver component of the Kuanghong system periodically reads device data according to the register address and stores it as a temporary data structure (such as a dictionary):

[0075]

[0076]

[0077] The converted data:

[0078]

[0079] According to the mapping table, the converted data is filled into the JSON format message of the second protocol:

[0080]

[0081] Further, based on the above embodiments, after organizing the obtained second protocol device data to obtain the second protocol data structure, the following steps may be further included:

[0082] Convert the second protocol data structure into a target second protocol message according to a JSON message format based on the second protocol;

[0083] Accordingly, the mapped data is encapsulated in accordance with the second protocol format to generate a second protocol data frame, and the second protocol data frame is sent to the second protocol client application in the Kuanghong system via the second protocol server, including:

[0084] According to the data transmission format requirements of the second protocol, the converted target second protocol message is encapsulated to generate a second protocol data frame;

[0085] The generated second protocol data frame is verified for integrity and accuracy, and the verified second protocol data frame is sent to the second protocol client application in the Kuanghong system via the second protocol server.

[0086] Generally, the second protocol data structure is serialized and converted strictly according to the JSON format defined by the protocol. The conversion process first verifies the integrity of the data structure, ensuring that all required fields (such as device ID and timestamp) are present and formatted correctly. The data is then organized into attribute-value pairs, with the numeric types precisely matching the object model definition, for example, retaining two decimal places for floating-point numbers.

[0087] Generally speaking, standardized JSON messages need to be converted into a binary transmission format. The encapsulation process is divided into three levels: first, a frame header is constructed (including the version number, message type, and data field length), then each data field is encoded using a TLV structure (Type-Length-Value triplet), and finally a CRC-16 checksum (polynomial 0xA001) is appended to the end of the frame, covering all bytes from the frame header to the data field.

[0088] Generally speaking, the encapsulated data frame needs to pass multiple layers of verification: structure verification (frame header identifier matching, length consistency, CRC verification) and business rule verification (numeric range check, timestamp validity, device ID whitelist verification). All verification items must pass before entering the transmission queue.

[0089] Generally speaking, verified data frames are transmitted to the terminal application through a priority queue. Control commands (such as emergency stop commands) receive the highest priority, and status data is sorted by acquisition time. The transmission process supports breakpoint resumability (up to three retries). The client must return an ACK response frame (0x06) to confirm successful reception. This entire process ensures high-reliability transmission in the complex network environment of the mine.

[0090] Furthermore, based on the above embodiments, converting the current register value into the target second protocol field value according to the target conversion rule may further include:

[0091] If the target conversion rule includes a target value range check rule, after converting the current register value to the target second protocol field value, it is detected whether the target second protocol field value is within the value range defined in the target value range check rule;

[0092] If not, in the constructed target second protocol message, the abnormal state of the target second protocol message is marked, and the retransmission mechanism of the first protocol host to the first protocol data frame is triggered.

[0093] Generally speaking, after completing the conversion of the current register value to the target second protocol field value, the conversion result is immediately compared with the predefined value range (such as the temperature value 0-100°C). If it is found that the field value exceeds the threshold (such as 120°C), an abnormal status mark (such as the "out_of_range" flag) is automatically added when constructing the target second protocol message, and the data retransmission mechanism of the first host is triggered at the same time. This mechanism will re-request the register address corresponding to the abnormal data (such as function code 03 reads 0x1001 address) to ensure that the final transmitted data fully complies with the valid range defined by the object model. The entire process strictly follows the minimum and maximum value boundaries defined by the value range check rules, and the abnormal mark format is completely consistent with the second protocol specification. At the same time, the retransmission request keeps the original first frame structure unchanged (including the same function code and register address).

[0094] The technical solution of the embodiment of the present invention is to establish a physical connection between the first host and each first slave device in the mine system and collect the first protocol data frame, perform integrity check and protocol parsing on the data frame to extract device data information, map the device data information to the standard data field based on the second protocol object model according to a predefined mapping relationship, perform data type conversion and range adaptation according to the target conversion rule, combine the converted data with the target second protocol object model field to obtain the second protocol device data, cyclically process all device data information and organize them into a complete second protocol data structure, generate the target second protocol message according to the message format of the second protocol, and perform binary conversion on the message. The second protocol data frame is encapsulated and sent to the second protocol client application in the Kuanghong system via the second protocol server after verifying the integrity and accuracy of the data frame. If the target conversion rule includes a value range check and an abnormality is found, the message status is marked and the first data retransmission is triggered, ultimately achieving standardized access and reliable transmission of device data. This new multi-protocol data conversion method uses deep protocol parsing technology to achieve efficient disassembly and precise extraction of data frames based on the Modbus protocol standard. Through optimized verification algorithms and structured data set generation mechanisms, it ensures the complete acquisition and reliable conversion of register addresses and values, providing stable and reliable technical support for the construction of intelligent mines.

[0095] Example 3

[0096] Figure 3 This is a flowchart of another multi-protocol device data conversion method based on the Mine Hong system provided in Example 3 of the present invention. This embodiment is optimized based on the above embodiments.

[0097] Correspondingly, such as Figure 3 As shown, the method includes:

[0098] S310. Obtain a first protocol data frame sent by a first protocol host, wherein the first host is connected to each first slave device in the Mine Hong system and is used to collect device data reported by each first slave device.

[0099] S320: Parse the first protocol data frame to obtain at least one item of device data information contained in the first protocol data frame.

[0100] S330: Map each of the device data information to a standard data field based on the second protocol object model according to a predefined mapping relationship.

[0101] S340. Encapsulate the mapped data in accordance with the second protocol format to generate a second protocol data frame, and send the second protocol data frame to the second protocol client application in the Kuanghong system via the second protocol server.

[0102] S350, receiving an attribute query request triggered and sent by a first type of second protocol client application in the Kuanghong system and forwarded via the second protocol server;

[0103] The attribute query request includes first-type multi-tuple data consisting of device model, device location, and device attributes.

[0104] The first type of second-protocol client can be understood as a terminal application instance with specific permissions in the Kuanghong system, enabling request traceability and response routing through a unique client identifier. This client uses the standardized interface defined by the second protocol, supports both synchronous query and asynchronous subscription communication modes, and can initiate precise queries based on multi-tuple data consisting of device model, location, and attribute name.

[0105] The first type of tuple data can be understood as a standardized query identifier consisting of the equipment model, physical location, and attribute name. Each field must strictly match predefined specifications, and the tuple is preferably a triple. The equipment model corresponds to the equipment type definition in the object model registry, the equipment location follows the mine classification and regional coding system, and the equipment attributes must be legal fields declared in the second protocol object model.

[0106] In this embodiment, a second protocol server receives an attribute query request from a first-class second protocol client application. This request is encapsulated in a standardized triplet data structure, containing three key fields: device model, device location, and device attributes. During the request processing, the second protocol server parses the triplet content, verifies the compliance of each field, and forwards the valid request to the protocol conversion module for further processing. The entire interaction process adopts a request-response model. After sending a request, the client enters a waiting state until it receives the attribute query result or a timeout notification from the second protocol server.

[0107] S360. By calling the read event callback interface pre-registered in the main communication processor service, the first protocol host is triggered to query the target database based on the pre-established correspondence between the tuple source index and the electromechanical equipment point table attribute and the first type of tuple data.

[0108] The read event callback interface can be understood as the asynchronous processing core of the protocol conversion architecture, implementing request conversion from the second protocol to the first protocol through pre-registered functions. This interface uses an event-driven mechanism to automatically parse multi-tuple query requests, trigger data acquisition after matching register addresses, and ultimately return the register values.

[0109] In this embodiment, upon receiving the first-category triplet data containing the device model, location, and attributes, the callback interface automatically triggers the following processing flow: first, based on the pre-established correspondence between the triplet source index and the electromechanical device point table attributes, the triplet data is mapped to a specific first register address; then, a query operation is initiated for the target register via the first protocol host; and finally, the query result is returned to the caller. The entire process strictly adheres to the predefined interface specifications and data processing flow, ensuring a seamless transition from the second protocol query request to the first operation.

[0110] S370: Obtain a first protocol attribute query result frame returned by the first protocol host.

[0111] In this embodiment, the response data frame returned by the first host is obtained through the established physical communication link. Its frame structure strictly follows the first protocol specification and contains core elements such as the slave device address, function code, data field and CRC check field. The received data frame must first pass the integrity check. After confirming that the CRC check code is correct, the original register value in the data field is extracted. These values ​​are arranged in the order of the register address at the time of the request, and each register value occupies 2 bytes of storage space. For abnormal responses (such as error frames with the highest bit of the function code being 1), the error status must be recorded and the subsequent processing flow must be triggered. The entire receiving process maintains a strict correspondence between the register address and the data value, providing complete binary data input for the subsequent parsing steps.

[0112] S380: Parse the first protocol attribute query result frame to obtain the target attribute query result included in the first protocol attribute query result frame.

[0113] In this embodiment, the received data frame is integrity checked, and after confirming that the CRC check code is correct, the frame structure is parsed according to the first protocol specification to extract the function code and data field content. For a normal response frame (function code 03 / 04), the parsing process includes: reading the byte number field to determine the length of subsequent data, splitting the register value sequence into 2-byte units, and establishing a strict correspondence between these values ​​and the register address in the original query request. For an abnormal response frame (the highest bit of the function code is 1), the abnormal code field is extracted to record the specific error type. During the parsing process, the complete mapping relationship between the register address and the numerical value is maintained to ensure that the subsequent mapping step can accurately obtain the original data value corresponding to each attribute. All parsing results are output in a structured form, including key information such as the register address, numerical value, and status mark.

[0114] S390. Map each of the target attribute query results to a standard data field based on the second protocol object model according to a predefined mapping relationship.

[0115] In this embodiment, the mapping table is first queried to obtain the second protocol physical model field name corresponding to the current register address (such as address 0x1001 is mapped to "motor_speed"), and then the data type conversion and unit standardization are performed according to the field type definition (such as float32) and the conversion rule (such as original value × 0.1). For enumerated fields (such as running status), the original value is converted into a semantic label (such as 0→"STOP", 1→"RUN") by looking up the value mapping table. Strict numerical range verification is performed during the conversion process, and numerical values ​​that exceed the range defined by the physical model are marked as abnormal states. Finally, a standardized field set that conforms to the second protocol physical model specification is generated, and each field contains complete information such as field name, conversion value, unit and status mark, providing structured input for subsequent data encapsulation.

[0116] S3100: Encapsulate the mapped data according to the second protocol format to generate a second protocol attribute query result frame, and send the second protocol attribute query result frame to the first type second protocol client application via the second protocol server.

[0117] In this embodiment, the converted standardized data fields are structured and encapsulated in the JSON format specified by the second protocol, generating an attribute query result frame containing complete metadata. The data is then converted to binary encoding, compressed using the TLV format, and integrity assurance mechanisms such as a CRC-32 checksum are added. Finally, the generated second protocol attribute query result frame is transmitted to the requesting client via a dedicated communication channel, completing the query-response interaction cycle.

[0118] The technical solution of the embodiment of the present invention is to collect and parse the first protocol data frame of each slave device through the first host, extract the device data information and convert it into a standard data field based on the second protocol object model according to a pre-defined mapping relationship, encapsulate and generate a second protocol data frame and send it to the second protocol client application. When the attribute query request sent by the second protocol client application is received, the read event callback interface of the main communication processor service is triggered to query based on the correspondence between the triple source index and the electromechanical equipment point table attribute, obtain and parse the first protocol attribute query result frame, map the target attribute query result to the standard data field of the second protocol object model, and finally encapsulate and generate the second protocol attribute query result frame and return it to the requesting client, thereby realizing standardized access and two-way interaction of device data. This new multi-protocol data conversion method significantly improves the efficiency and reliability of mine equipment data collection and interaction. Through the standardized protocol conversion process, it not only realizes the seamless connection between traditional equipment and intelligent mining system, but also ensures the real-time and accuracy of data transmission, providing a solid data foundation support for intelligent mine construction.

[0119] Example 4

[0120] Figure 4 This is a flowchart of another multi-protocol device data conversion method based on the Mine Hong system provided in Example 4 of the present invention. This embodiment is optimized based on the above embodiments.

[0121] S410. Obtain a first protocol data frame sent by a first protocol host, wherein the first host is connected to each first slave device in the Mine Hong system and is used to collect device data reported by each first slave device.

[0122] S420: Parse the first protocol data frame to obtain at least one item of device data information contained in the first protocol data frame.

[0123] S430: Map each device data information to a standard data field based on the second protocol object model according to a predefined mapping relationship.

[0124] S440. Encapsulate the mapped data in accordance with the second protocol format to generate a second protocol data frame, and send the second protocol data frame to the second protocol client application in the Kuanghong system via the second protocol server.

[0125] S450, receiving an attribute modification request triggered and sent by a second type of second protocol client application in the Kuanghong system and forwarded via the second protocol server;

[0126] The attribute modification request includes a second type of tuple data consisting of a device model, a device location, and device attributes.

[0127] The second protocol client can be understood as a terminal application with device control permission, which sends a triplet modification request containing the device model, location, and attribute name via the second protocol to trigger the first register write operation. The second type of triplet data can be understood as a standardized control instruction identifier consisting of the device model, device location, and device attributes, which is dedicated to attribute modification requests. This data structure strictly matches the predefined object model specification, where the device model identifies the target device type, the device location implements regional access control, and the device attribute field specifies the specific register parameters to be modified.

[0128] In this embodiment, control instructions sent by the client application are obtained through an established communication channel. The request message strictly follows the protocol-defined format and contains core fields such as the target modification value. Received requests are first digitally signed and validated. After confirming the legitimacy of the request source, each element is extracted and syntax-checked to ensure compliance with predefined rules. Request messages that pass verification retain complete control parameters, including the target value's data type, range, and unit information, providing standardized input for subsequent register write operations.

[0129] S460. By calling the write event callback interface pre-registered in the main communication processor service, the first protocol host is triggered to update the target database based on the pre-established correspondence between the tuple source index and the electromechanical equipment point table attributes and the second type of tuple data, and issue an attribute modification instruction to the matching first slave device to complete the device register modification.

[0130] The write event callback interface can be understood as a core processing module for protocol conversion, which is responsible for converting the second protocol control instruction into a first protocol write operation.

[0131] In this embodiment, the operation is triggered by a write event callback interface pre-registered in the main communication processor service. Based on the correspondence between the triplet source index and the electromechanical device point table attribute, the received attribute modification request is converted into a specific first register write operation. The conversion process first parses the second type of triplet data to determine the target register address. Then, according to the first protocol specification, a write single register (function code 06) or write multiple registers (function code 10) instruction frame is constructed. The instruction frame contains the verified target value and register address information. After the instruction construction is completed, the first host sends the modification instruction to the target slave device to perform the actual register write operation.

[0132] The technical solution of the embodiment of the present invention is to collect and parse the first protocol data frames of each slave device through the first host, extract the device data information and convert it into a standard data field based on the second protocol object model according to a predefined mapping relationship, encapsulate and generate a second protocol data frame and send it to the second protocol client application. When receiving the attribute modification request sent by the second protocol client application, the write event callback interface of the main communication processor service is triggered to update the data based on the correspondence between the multi-group source index and the electromechanical equipment point table attribute, and issue an attribute modification instruction to the matching first slave device to complete the device register modification, thereby realizing standardized access and two-way control of device data. This new multi-protocol data conversion method realizes the safe and reliable transmission and execution of control instructions through an efficient processing mechanism, which not only ensures the real-time response of industrial field equipment control, but also guarantees the accuracy of operation through multiple verifications, providing a stable and reliable remote control solution for industrial Internet of Things applications.

[0133] Example 5

[0134] For ease of understanding, specific application scenarios applicable to each embodiment of the invention are described. In this specific embodiment, in order to make the conversion from the first protocol to the second protocol model protocol more accurate and smooth, the embodiment of the present invention designs a complete multi-protocol device data conversion method.

[0135] Specifically, in Figure 5 , a data link diagram of an embodiment of the present invention is shown in FIG, wherein Modbus RUT Slave is a Modbus RUT slave, Modbus RUT Poll is a Modbus RUT host, the second protocol Server is a second protocol server, and the second protocol Client is a terminal application of the second protocol. Figure 5As shown, the data link in the embodiment of the present invention adopts a layered design to achieve seamless data interaction from physical devices to upper-layer applications. The link is divided into four layers from bottom to top: the device layer connects to the first slave device through the RS-485 bus, and the first host performs polling and collection; the protocol conversion layer deploys the edge computing gateway, runs the host communication processor (HCP) service, and realizes bidirectional conversion from the first to the second protocol; the service layer is composed of a cluster of second protocol servers, providing data routing, permission verification and device management functions; the application layer includes various second protocol clients, supporting monitoring, control and data analysis scenarios.

[0136] Further, Figure 6 The software architecture of the protocol conversion in this embodiment is shown. Figure 6 As shown, the software architecture includes three modules: a protocol parsing module, a data mapping module, and a second protocol encapsulation module. The protocol parsing module is responsible for parsing the first protocol data and extracting the device data information. The data mapping module is responsible for mapping the parsed first data to the corresponding data fields of the second protocol object model according to predefined mapping rules. The second protocol encapsulation module is responsible for encapsulating the mapped data according to the format of the second protocol, generating data frames that comply with the second protocol object model protocol.

[0137] Further, Figure 7 The specific implementation steps of the protocol conversion in this embodiment are shown. Figure 7 As shown, the process begins with the first host collecting data from the slave device through a polling mechanism. After obtaining the raw data frame, a CRC check is performed to ensure integrity. Once the check passes, the frame structure is parsed to extract register addresses and numerical information. The parsed data enters the mapping conversion phase, where the register values ​​are converted into standard fields of the second protocol object model according to a pre-established mapping table, and data type conversion and range adaptation are performed. The converted data is encapsulated into the second protocol format, first organized into a JSON structure and then encoded into a binary frame. After adding a frame header and CRC checksum, it is forwarded to the client application via the second protocol server.

[0138] Among them, the Modbus protocol application layer message header is as follows: Figure 8 As shown, the protocol configuration module imports a configuration file to complete the settings for the first port, baud rate, parity bit, data bits, stop bits, and station ID, and then starts the first host. The Modbus communication module receives the first protocol data frame sent by the electromechanical device via serial communication or other means. The protocol parsing module parses the data frame according to the first protocol specification, including function code, data address, data length, and data content, extracts the actual data from the device, and verifies the received data frame to ensure data integrity and accuracy.

[0139] Figure 9This section shows the core data mapping table used in the protocol conversion process. This table defines the precise correspondence between Modbus register addresses and second-protocol object model attributes. This table enables automatic conversion of raw register values ​​to standardized object model attributes. For example, to map address 0x4001 to a temperature attribute, the raw value must be multiplied by a conversion factor of 0.1 and the unit "°C" added.

[0140] Figure 10 The diagram shows the correspondence between the triplet and the device point table, which intuitively presents the key corresponding logic in the protocol conversion process. Figure 10 The system defines standardized management specifications for device parameters, employing a structured coding system to achieve precise parameter addressing and control. The first "Source Index" column defines device parameters using a three-level numeric code (e.g., 5383.2.50). The first segment, "5383," identifies the device category (representing a specific model), the middle segment, "2," identifies the device's specific location, and the final segment, "50," identifies the specific attribute name. For each specific source index, the second through fourth columns in the figure detail the attribute characteristics of each device parameter. For example, for the specific index 5383.2.50, the "Signal Strength" attribute is identified as a uint16 data type with read-only (R) permissions, indicating that this parameter is used only to monitor device communication quality and cannot be modified remotely. For the specific index 5383.2.51, the "High Temperature Alarm Setpoint" attribute is identified as a float data type and is read-write (R / W), indicating that the current setpoint can be read from the system and a new value can be configured remotely, but with a range check to ensure security.

[0141] Furthermore, through the clever coordination of the above steps and modules, the precise conversion from the first protocol to the second protocol physical model protocol can be achieved, achieving the following effective results:

[0142] (1) Through the collaborative work of first protocol parsing, second protocol object model conversion, and two-way communication mechanism, standardized processing of the entire process from equipment data collection to remote control is achieved. The intelligent conversion algorithm can independently complete protocol parsing, data mapping, and command issuance, significantly reducing the complexity of system integration, making industrial equipment data interaction more efficient and reliable, and greatly improving the intelligence level of the mining Internet of Things system.

[0143] (2) Based on an optimized data mapping mechanism and multi-layer verification strategy, it can accurately match device attributes and register addresses. Through improved data conversion algorithms and exception handling mechanisms, accurate protocol conversion is achieved, fully meeting the stringent requirements of the industrial field for data reliability and ensuring the accurate execution of monitoring and control instructions.

[0144] (3) The innovative edge computing architecture, equipped with multiple fault-tolerant mechanisms, can effectively cope with complex working conditions such as electromagnetic interference and network fluctuations in underground mines. The intelligent retransmission algorithm can automatically repair data loss caused by communication interruptions, ensuring stable transmission in harsh environments, greatly enhancing the environmental adaptability of the system.

[0145] (4) It adopts a modular protocol conversion engine design, which can flexibly adapt to different Modbus device protocol variants through standardized interface definition and plug-in management mechanism, achieve seamless compatibility between new and old devices, and significantly improve the system's sustainable maintenance capabilities during equipment upgrades.

[0146] Example 6

[0147] Figure 11 This is a structural diagram of a multi-protocol device data conversion device based on a mining system provided in Example 6 of the present invention. Figure 4 As shown, the device includes:

[0148] The data acquisition module 1110 is used to obtain a first protocol data frame sent by a first protocol host, wherein the first host is connected to each first slave device in the Kuanghong system, and is used to collect device data reported by each first slave device;

[0149] The data parsing module 1120 is configured to parse the first protocol data frame to obtain at least one device data information contained in the first protocol data frame;

[0150] The data mapping module 1130 is configured to map the device data information to a standard data field based on the second protocol object model according to a predefined mapping relationship;

[0151] The data encapsulation and transmission module 1140 is used to encapsulate the mapped data according to the second protocol format, generate a second protocol data frame, and send the second protocol data frame to the second protocol client application in the Kuanghong system via the second protocol server.

[0152] The technical solution of the embodiment of the present invention is to establish a physical connection between the first host and the first slave device in the Mine Hong system, regularly collect the first protocol data frames reported by the device, and perform integrity verification and protocol parsing on the data frames, extract device data containing key information such as register addresses, function codes and original values, and then based on the predefined mapping relationship, intelligently map the parsed device data information to the standard data field that complies with the second protocol physical model specification, complete the data type conversion and range adaptation, and finally securely encapsulate the standardized data according to the second protocol format, add metadata such as timestamp and device ID, generate a structured second protocol data frame, and establish two-way data interaction with the second protocol client application in the Mine Hong system through the second protocol server to realize real-time monitoring of device status and accurate issuance of remote control instructions. This new multi-protocol data conversion method can significantly improve the data collection efficiency and system compatibility of mining equipment, and realize plug-and-play of equipment from different manufacturers through a standardized protocol conversion architecture, providing reliable technical support for the construction of intelligent mines.

[0153] Based on the above embodiments, the data parsing module 1120 is specifically configured to:

[0154] Locating a data frame position where device data is located in the first protocol data frame according to a first protocol standard;

[0155] At the data frame position, extracting a device data set of a first protocol data structure;

[0156] The device data set includes at least one item of device data information, and each item of device data information includes a register address and a register value stored in the register address.

[0157] Furthermore, based on the above embodiments, the data mapping module 1130 may further include:

[0158] a data extraction submodule, configured to sequentially obtain current device data information from each of the device data information, and extract a current register address and a current register value stored in the current register from the current device data information;

[0159] A mapping query submodule, configured to query a pre-established mapping relationship table, obtain a target mapping entry that matches the current register address, and extract a target second protocol object model field and a target conversion rule from the target mapping entry;

[0160] A field conversion submodule, configured to convert a current register value into a target second protocol field value according to a target conversion rule, and combine the target second protocol object model field with the target second protocol field value to obtain second protocol device data;

[0161] The aggregation and iteration submodule is used to return to execute the operation of sequentially obtaining the current device data information from each of the device data information until all the device data information is processed, and organize the obtained second protocol device data to obtain a second protocol data structure.

[0162] Furthermore, based on the above embodiments, the following may be included:

[0163] A message conversion submodule, configured to convert the second protocol data structure into a target second protocol message according to a JSON message format based on the second protocol;

[0164] Based on the above embodiments, the data encapsulation and transmission module 1140 is specifically configured to:

[0165] According to the data transmission format requirements of the second protocol, the converted target second protocol message is encapsulated to generate a second protocol data frame;

[0166] The generated second protocol data frame is verified for integrity and accuracy, and the verified second protocol data frame is sent to the second protocol client application in the Kuanghong system via the second protocol server.

[0167] Furthermore, based on the above embodiments, the following may be included:

[0168] an exception marking submodule for detecting whether the target second protocol field value is within the value range defined in the target value range check rule after converting the current register value into the target second protocol field value if the target conversion rule includes a target value range check rule;

[0169] The retransmission triggering submodule is used to mark the abnormal state of the target second protocol message in the constructed target second protocol message if not, and trigger the retransmission mechanism of the first protocol host to the first protocol data frame.

[0170] Furthermore, based on the above embodiments, the following may be included:

[0171] A query request receiving module, configured to receive an attribute query request triggered and sent by a first-type second-protocol client application in the Kuanghong system and forwarded via a second-protocol server; wherein the attribute query request includes first-type triplet data consisting of a device model, a device location, and device attributes;

[0172] a callback interface triggering module, configured to trigger the first protocol host to query the target database based on the pre-established correspondence between the triple source index and the electromechanical device point table attribute and the first type of triple data by calling a read event callback interface pre-registered in the main communication processor service;

[0173] A query result acquisition module, configured to acquire a first protocol attribute query result frame returned by a first protocol host;

[0174] a data parsing module, configured to parse the first protocol attribute query result frame to obtain a target attribute query result contained in the first protocol attribute query result frame;

[0175] A data mapping module, configured to map each of the target attribute query results to a standard data field based on a second protocol object model according to a predefined mapping relationship;

[0176] The data encapsulation module is used to encapsulate the mapped data in accordance with the second protocol format, generate a second protocol attribute query result frame, and send the second protocol attribute query result frame to the first type second protocol client application via the second protocol server.

[0177] Furthermore, based on the above embodiments, the following may be included:

[0178] A modification request receiving module, configured to receive an attribute modification request triggered and sent by a second type of second protocol client application in the Kuanghong system and forwarded via a second protocol server; wherein the attribute modification request includes a second type of triplet data consisting of a device model, a device location, and device attributes;

[0179] The write callback interface trigger module is used to trigger the first protocol host to update the target database based on the pre-established correspondence between the triple source index and the electromechanical equipment point table attribute and the second type of triple data by calling the write event callback interface pre-registered in the main communication processor service, and send an attribute modification instruction to the matching first slave device to complete the device register modification.

[0180] The multi-protocol device data conversion device based on the Mine Hong system provided in an embodiment of the present invention can execute the multi-protocol device data conversion method based on the Mine Hong system provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0181] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0182] Example 7

[0183] Figure 12 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0184] like Figure 12 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0185] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0186] The processor 11 may be a variety of general and / or specialized processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a multi-protocol device data conversion method based on the Mine Hong system, namely:

[0187] Acquire a first protocol data frame sent by a first remote terminal unit protocol host, wherein the first host is connected to each first slave device in the Kuanghong system and is used to collect device data reported by each first slave device;

[0188] Parsing the first protocol data frame to obtain at least one item of device data information contained in the first protocol data frame;

[0189] According to a predefined mapping relationship, each of the device data information is mapped to a standard data field based on the second protocol object model;

[0190] The mapped data is encapsulated in accordance with the second protocol format to generate a second protocol data frame, and the second protocol data frame is sent to the second protocol client application in the Kuanghong system via the second protocol server.

[0191] In some embodiments, a multi-protocol device data conversion method based on a mining system may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the multi-protocol device data conversion method based on a mining system described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute a multi-protocol device data conversion method based on a mining system in any other appropriate manner (for example, by means of firmware).

[0192] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system comprising at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0193] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0194] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0195] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0196] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0197] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0198] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0199] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A multi-protocol device data conversion method based on the Kuanghong system, characterized in that: include: Obtaining a first protocol data frame sent by a first protocol host, wherein the first host is connected to each first slave device in the Kuanghong system and is used to collect device data reported by each first slave device; Parsing the first protocol data frame to obtain at least one item of device data information contained in the first protocol data frame; According to a predefined mapping relationship, each of the device data information is mapped to a standard data field based on a second protocol object model, wherein the second protocol is a standard protocol used by the Kuanghong system; The mapped data is encapsulated in accordance with the second protocol format to generate a second protocol data frame, and the second protocol data frame is sent to the second protocol client application in the Kuanghong system via the second protocol server.

2. The method according to claim 1, characterized in that Parsing the first protocol data frame to obtain at least one item of device data information contained in the first protocol data frame includes: Locating a data frame position where device data is located in the first protocol data frame according to a first protocol standard; At the data frame position, extracting a device data set of a first protocol data structure; The device data set includes at least one item of device data information, and each item of device data information includes a register address and a register value stored in the register address.

3. The method according to claim 2, characterized in that According to a predefined mapping relationship, each of the device data information is mapped to a standard data field based on the second protocol object model, including: Sequentially acquiring current device data information from each of the device data information, and extracting a current register address and a current register value stored in the current register from the current device data information; Querying a pre-established mapping relationship table to obtain a target mapping entry that matches the current register address, and extracting a target second protocol object model field and a target conversion rule from the target mapping entry; Convert the current register value into a target second protocol field value according to a target conversion rule, and combine the target second protocol object model field with the target second protocol field value to obtain second protocol device data; Return to execute the operation of sequentially obtaining the current device data information from each of the device data information until all the device data information is processed, and organize the obtained second protocol device data to obtain a second protocol data structure.

4. The method according to claim 3, characterized in that After organizing the obtained second protocol device data to obtain a second protocol data structure, the method further includes: Converting the second protocol data structure into a target second protocol message according to a message format based on the second protocol; Accordingly, the mapped data is encapsulated in accordance with the second protocol format to generate a second protocol data frame, and the second protocol data frame is sent to the second protocol client application in the Kuanghong system via the second protocol server, including: According to the data transmission format requirements of the second protocol, the converted target second protocol message is data encapsulated to generate a second protocol data frame; The generated second protocol data frame is verified for integrity and accuracy, and the verified second protocol data frame is sent to the second protocol client application in the Kuanghong system via the second protocol server.

5. The method according to claim 4, characterized in that Converting the current register value into a target second protocol field value according to a target conversion rule, further comprising: If the target conversion rule includes a target value range check rule, after converting the current register value to the target second protocol field value, it is detected whether the target second protocol field value is within the value range defined in the target value range check rule; If not, in the constructed target second protocol message, the abnormal state of the target second protocol message is marked, and the retransmission mechanism of the first protocol host to the first protocol data frame is triggered.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Receiving an attribute query request triggered and sent by a first type of second protocol client application in the Kuanghong system and forwarded via a second protocol server; The attribute query request includes first-type tuple data, and the first-type tuple data includes device model, device location, and device attributes; By calling a read event callback interface pre-registered in the main communication processor service, triggering the first protocol host to query the target database based on the pre-established correspondence between the tuple source index and the electromechanical device point table attribute and the first type of tuple data; Obtaining a first protocol attribute query result frame returned by the first protocol host; Parsing the first protocol attribute query result frame to obtain a target attribute query result included in the first protocol attribute query result frame; According to a predefined mapping relationship, each of the target attribute query results is mapped to a standard data field based on the second protocol object model; The mapped data is encapsulated according to the second protocol format to generate a second protocol attribute query result frame, and the second protocol attribute query result frame is sent to the first type second protocol client application via the second protocol server.

7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Receiving an attribute modification request triggered and sent by a second type of second protocol client application in the Kuanghong system and forwarded via a second protocol server; The attribute modification request includes second-type tuple data, and the second-type tuple data includes device model, device location, and device attributes; By calling the write event callback interface pre-registered in the main communication processor service, the first protocol host is triggered to update the target database data based on the pre-established correspondence between the multi-tuple source index and the electromechanical equipment point table attributes and the second type of multi-tuple data, and send an attribute modification instruction to the matching first slave device to complete the device register modification.

8. A multi-protocol device data conversion device based on the Kuanghong system, characterized in that: include: a data acquisition module, configured to acquire a first protocol data frame sent by a first protocol host, wherein the first host is connected to each first slave device in the Kuanghong system, and to collect device data reported by each first slave device; a data parsing module, configured to parse the first protocol data frame and obtain at least one item of device data information contained in the first protocol data frame; A data mapping module, configured to map the device data information to a standard data field based on a second protocol object model according to a predefined mapping relationship; The data encapsulation and transmission module is used to encapsulate the mapped data in accordance with the second protocol format, generate a second protocol data frame, and send the second protocol data frame to the second protocol client application in the Kuanghong system via the second protocol server.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the multi-protocol device data conversion method based on the Mine Hong system as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the processor to implement the multi-protocol device data conversion method based on the Mine Hong system as described in any one of claims 1-7 when executed.

Citation Information

Cited By

  • Data acquisition and remote control method of fire alarm host and related equipment

    CN121078102A

  • Multi-data protocol conversion method and device and electronic speed regulator

    CN121078142A

  • Domestic desktop terminal peripheral compatible method and system based on protocol reverse mapping and computer readable storage medium

    CN121411837A

  • A domestic desktop terminal peripheral device compatibility method and system based on protocol reverse mapping and a computer readable storage medium

    CN121411837B

  • Multi-protocol conversion method, system and equipment between fire alarm equipment and medium

    CN121691491A