Method and device for converting protocol packets

By extracting, recombining, and normalizing data from multiple input protocols, the problems of single protocol and uneven data in industrial data acquisition devices are solved, enabling rapid and accurate data conversion and interaction, and data acquisition that adapts to multi-protocol environments.

CN116781797BActive Publication Date: 2026-04-28SHANGHAI DAZHI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI DAZHI TECH CO LTD
Filing Date
2023-01-13
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing industrial data acquisition devices suffer from problems such as single protocol conversion, slow data acquisition speed, inability to interact with servers, and uneven data distribution, which makes it impossible to meet the data acquisition requirements in a multi-protocol environment.

Method used

By acquiring protocol messages from multiple input protocols, extracting useful information, performing data recombination and normalization transformation, and reassembling according to the target output protocol, real-time data conversion and unified output of multiple protocols are achieved.

Benefits of technology

It enables rapid and accurate data collection and transformation in a multi-protocol environment, improves data stability and collection efficiency, and supports information interaction with the server.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116781797B_ABST
    Figure CN116781797B_ABST
Patent Text Reader

Abstract

The application aims to provide a protocol message conversion method and device. The application obtains protocol messages corresponding to different input protocols. Data of each protocol message is extracted to obtain useful information corresponding to each protocol message. The useful information corresponding to each protocol message is sequentially subjected to data reorganization and normalized data conversion to obtain converted useful information corresponding to each protocol message. The converted useful information is reassembled according to a target output protocol to obtain a target output message corresponding to each protocol message. The target output message is output in the target output protocol. The application realizes obtaining diversified input protocol messages, achieves fast and accurate data conversion while converting multiple protocols, uniformly outputs different input protocols, adapts to multiple input protocols, and increases applicable scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for converting protocol messages. Background Technology

[0002] As major manufacturing nations worldwide unveil new development strategies, the pace of manufacturing toward intelligent manufacturing is accelerating. Acquiring data from underlying equipment is crucial for achieving intelligent manufacturing, posing unprecedented challenges to industrial data acquisition systems.

[0003] Currently, there are various types of industrial data acquisition devices. Common types include data acquisition devices with optional single protocol conversion, data acquisition devices that support open international standards with unified protocols, and data acquisition devices with data acquisition and analysis software provided by the equipment manufacturer. However, existing industrial data acquisition devices all suffer from the problem of limited acquisition functions, being limited to protocol conversion and acquisition only, and do not support clustering or communication with servers. This means that when an industrial data acquisition device malfunctions, it cannot exchange information with the server and can only be passively detected and handled through other means.

[0004] In addition, the data acquisition protocol conversion devices in existing industrial data acquisition devices are developed at the application layer, without requiring time stamping and without paying attention to the specific implementation of the device at the underlying level. They are all-variable conversions for a single protocol or product, resulting in slow protocol conversion and data acquisition speeds. At the same time, data analysis using industrial data usually requires uniform time-series data. Due to the performance differences of different industrial data carriers, the obtained data is uneven and has unequal intervals. Summary of the Invention

[0005] One objective of this application is to provide a protocol message conversion method and device that solves the problems of slow data acquisition response and single input protocol, supports multiple input protocols, realizes the diversification of input protocols, completes real-time data conversion of multiple protocols, improves data stability, and outputs different input protocols in a unified manner.

[0006] According to one aspect of this application, a method for converting protocol messages is provided, wherein the method includes:

[0007] Obtain the protocol messages corresponding to different input protocols;

[0008] Data is extracted from each of the protocol messages to obtain the useful information corresponding to each protocol message;

[0009] The useful information corresponding to each protocol message is sequentially reorganized and normalized to obtain the transformed useful information corresponding to each protocol message.

[0010] Each piece of converted useful information is reassembled according to the target output protocol to obtain the target output message corresponding to each protocol message, wherein the target output message is output in accordance with the target output protocol.

[0011] Furthermore, in the above method, the step of extracting data from each of the protocol messages to obtain useful information corresponding to each protocol message includes:

[0012] Remove the useless data at the beginning, end, and middle of each protocol message, and extract the information to be converted and sent from the useful data to obtain the useful information corresponding to each protocol message.

[0013] Furthermore, in the above method, the step of sequentially performing data reorganization and normalization data transformation on the useful information corresponding to each protocol message to obtain the transformed useful information corresponding to each protocol message includes:

[0014] According to the preset configuration file, the useful information corresponding to each protocol message is reassembled in a byte-aligned manner to obtain the reassembled useful information corresponding to each protocol message;

[0015] The reconstructed useful information extracted from the protocol messages corresponding to different input protocols is normalized according to the normalization format in the preset configuration file to obtain the transformed useful information corresponding to each protocol message.

[0016] Furthermore, the above method, specifically the protocol message conversion method, further includes:

[0017] The target output message is sent to the target device in accordance with the target output protocol, so that the target device can store and / or display the target output message.

[0018] Furthermore, the above method, specifically the protocol message conversion method, further includes:

[0019] Time compensation is performed on each of the protocol messages corresponding to the different input protocols.

[0020] Furthermore, the above method, specifically the protocol message conversion method, further includes:

[0021] A preset configuration file is provided, which includes configuration information of the input / output protocol, network parameters of the input / output protocol, uplink and downlink communication parameters between the data acquisition protocol converter and the upper-layer server, and variable parameters to be acquired and converted.

[0022] Furthermore, the above method, specifically the protocol message conversion method, further includes:

[0023] Update the preset configuration file.

[0024] Furthermore, the above method, specifically the protocol message conversion method, further includes:

[0025] Real-time monitoring of the transition status of protocol messages.

[0026] According to another aspect of this application, a non-volatile storage medium is also provided, on which computer-readable instructions are stored, which, when executed by a processor, cause the processor to implement a protocol message conversion method as described above.

[0027] According to another aspect of this application, a protocol message conversion device is also provided, wherein the device includes:

[0028] One or more processors;

[0029] Computer-readable medium for storing one or more computer-readable instructions.

[0030] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors perform the conversion of a protocol message as described above.

[0031] Compared with existing technologies, this application obtains protocol messages corresponding to different input protocols; extracts data from each protocol message to obtain useful information corresponding to each protocol message; sequentially reassembles and normalizes the useful information corresponding to each protocol message to obtain the transformed useful information corresponding to each protocol message; and reassembles each transformed useful information according to the target output protocol to obtain the target output message corresponding to each protocol message. The target output message is output in accordance with the target output protocol, thereby achieving the acquisition of diverse, inputtable protocol messages. This enables rapid and accurate data conversion while converting different protocols, and unifies the output of different input protocols, adapting to multiple input protocols and expanding the applicable application scenarios. Attached Figure Description

[0032] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0033] Figure 1 A flowchart illustrating a method for converting protocol messages according to one aspect of this application is shown.

[0034] Figure 2 The flowchart illustrates a method for converting protocol messages according to one aspect of this application to obtain the Siemens PLC input protocol in a practical application scenario.

[0035] Figure 3 This paper illustrates a flowchart of the protocol conversion process in a practical application scenario, illustrating a protocol message conversion method according to one aspect of this application.

[0036] Figure 4 The diagram illustrates the circuit layout of a hardware device in a practical application scenario for a protocol message conversion method according to one aspect of this application.

[0037] Figure 5 The diagram illustrates a software system flowchart of a protocol message conversion method according to one aspect of this application in a practical application scenario.

[0038] Figure 6 This diagram illustrates a data flow flowchart in a practical application scenario for a protocol message conversion method according to one aspect of this application.

[0039] The same or similar reference numerals in the accompanying drawings represent the same or similar parts. Detailed Implementation

[0040] The present application will now be described in further detail with reference to the accompanying drawings.

[0041] In a typical configuration of this application, the terminal, the device of the service network, and the trusted party all include one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0042] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0043] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.

[0044] In existing technologies, there are various types of industrial data acquisition devices. Among them, there are data acquisition devices with optional single protocol conversion. These devices have the function of acquiring data from various mainstream PLCs, meters, machine tools, sensors, and instruments, and also function as a data relay station. They also have interfaces such as RS-232, RS-485, and 4G, and have limitations on the data acquisition they can collect. Examples include Modbus to Siemens protocol gateways and Omron to AB protocol gateways. PLC gateways, etc., are available as options. However, the drawback of data acquisition devices with optional single-protocol conversion is that they only support a single protocol and cannot simultaneously convert various protocols. They require customized products based on specific protocols, and the original product becomes unusable when the protocol or scenario changes. There are also data acquisition devices that support open international standards with unified protocols, such as the OPCUA protocol. Many industrial devices have incorporated OPCUA, allowing them to exchange and acquire data across different device types, operating systems, and equipment vendors. However, the drawback of data acquisition devices supporting open international standards with unified protocols is that some devices have not yet incorporated the OPCUA standard or are unsuitable for it. There are also data acquisition devices with equipment vendor-provided data acquisition and analysis software. Some equipment vendors develop data acquisition and analysis tools that match their industrial equipment, such as ToolsNet for the Atlas torque gun. However, the drawback of these vendor-provided data acquisition and analysis software is that they only adapt to their own protocols and products, failing to overcome technical barriers between equipment vendors and limiting their application scenarios.

[0045] The main technical problems addressed by this invention are: Firstly, due to the single protocol used in protocol data acquisition, data acquisition and analysis can only correspond to a single protocol, failing to meet data acquisition requirements when multiple protocols coexist. Secondly, data acquisition response is slow, failing to fully utilize the performance of the data source controller. Thirdly, it cannot meet requirements for uniform or variable data acquisition. Fourthly, traditional data acquisition functions are limited, cannot be configured, do not support online modifications, and require a complete redefinition and rebuilding of the data acquisition system after changing application scenarios or system upgrades. Finally, it cannot monitor data acquisition or display the acquired data.

[0046] like Figure 1 As shown, one aspect of this application proposes a flowchart of a protocol message conversion method, wherein the method includes steps S11, S12, S13, and S14, specifically including the following steps:

[0047] Step S11: Obtain the protocol messages corresponding to different input protocols; Here, there can be one or more input protocols, and the protocol input can be entered one by one or simultaneously, supporting the diversification of input protocols, increasing the applicable scenarios, and solving the problem of single protocol conversion and the inability to convert various protocols uniformly at the same time.

[0048] Meanwhile, in practical application scenarios, in order to maximize the performance of the data carrier device when inputting the protocol, the data is usually tagged with a time stamp as soon as possible, and the performance of the data carrier device is fully utilized to quickly convert the protocol and collect the data without wasting any time.

[0049] For example, Figure 2 The diagram shows a flowchart of a protocol message conversion method from one aspect of this application, used to acquire the Siemens PLC input protocol in a practical application scenario. The Siemens PLC operates in a cyclic scanning mode. When it receives request data from the protocol converter, the Siemens PLC responds within one scan cycle and then sends the data to the protocol converter. Specifically, the time consumed during the entire data acquisition process—from the protocol converter sending request A to the device response delay B to the protocol converter receiving data C—is equal to the network delay A for sending the request, the Siemens PLC response time B, and the network delay C for receiving the request. These three times represent the necessary time for one data acquisition. No additional time is consumed within this necessary timeframe, ensuring the shortest possible path from sending the data request to obtaining the actual data. This achieves high-speed acquisition of protocol data and utilizes the optimal performance of the data carrier device to acquire data at the fastest speed.

[0050] Step S12: Extract data from each protocol message to obtain useful information corresponding to each protocol message; here, the useful information can be configured in real time according to actual needs to increase the flexibility of data extraction and expand the applicable application scope.

[0051] Step S13: Sequentially reorganize and normalize the useful information corresponding to each protocol message to obtain the transformed useful information corresponding to each protocol message.

[0052] Here, data reassembly refers to reassembling the useful information corresponding to the protocol message in a byte-aligned manner according to the real-time configuration setting after obtaining the useful information, thereby optimizing data storage and retrieval, compressing data, and improving the speed and stability of data retrieval. Normalized data transformation refers to re-storing the useful information extracted from different protocol messages in a unified format after data reassembly, facilitating the output of useful information in the future, uniformly processing data from different protocol messages, reassembling and transforming the data, quickly extracting important data, making messy data more unified and regular, and improving the efficiency of data collection and transformation.

[0053] Step S14: Reassemble each piece of converted useful information according to the target output protocol to obtain the target output message corresponding to each protocol message. The target output message is output in the manner of the target output protocol. In actual application scenarios, the useful data of the target output message will be recombined according to the configuration of the configuration file, the data will be reassembled according to the requirements of the output protocol in the configuration file, and the assembled message will be output through the output hardware (network port, serial port, etc.). If there is a northbound server interface, the data with time information will be displayed in the database in chronological order. If there is a display window, the collected and converted data can be displayed directly.

[0054] Through the above steps S11 to S14, multiple and different protocol inputs are realized, and real-time data is collected from multiple and different input protocols. Data extraction, data recombination and normalization conversion are performed in sequence, and the data is uniformly output in the form of target output messages, achieving high-speed protocol conversion and performing precise and controllable data processing operations, thereby improving the accuracy and efficiency of data collection.

[0055] For example, Figure 3The diagram shows a flowchart of the protocol conversion process in a practical application scenario for a protocol message conversion method according to one aspect of this application. First, in the protocol input, one or more different protocols are input according to actual needs, and high-speed data acquisition is completed in the shortest possible time. Then, data is extracted from each acquired protocol message to obtain the useful information of each protocol message, completing the initial information screening. Second, the useful information is sequentially reorganized and normalized, and the useful information of different protocols is configurably organized to obtain the converted useful information. Finally, according to the target output protocol, each converted useful information is recombined and output in a unified output protocol manner.

[0056] Meanwhile, in practical application scenarios, the protocol conversion process is also a parallel process. Protocol input, data extraction, data reassembly, normalized data conversion, and protocol output are all controlled by their own separate threads. After the data processed by the previous level is output, new data can be received immediately. Buffer queues are added to the data flow at each level to ensure that the protocol conversion process is executed with maximum efficiency and minimum time consumption.

[0057] Following the above embodiments of this application, step S12 extracts data from each of the protocol messages to obtain useful information corresponding to each protocol message, including:

[0058] Remove the useless data at the beginning, end, and middle of each protocol message, and extract the information to be converted and sent from the useful data to obtain the useful information corresponding to each protocol message.

[0059] In practical applications, when multiple different protocol messages are input through hardware (such as Ethernet or serial ports), data extraction is performed, and redundant data in the header, trailer, and middle is removed. Using configuration file settings, useful information is extracted from the relevant data, completing initial information filtering and reducing data volume. Furthermore, if the configuration file contains settings for change-based data collection, data analysis and judgment are performed simultaneously with useful information filtering, extracting only the changed and necessary data, further reducing data volume and improving efficiency. If a fixed-interval collection setting exists, the time of the current data is compared with the time of the previous data to extract the data that needs to be converted and sent.

[0060] Following the above embodiments of this application, step S13 sequentially performs data reorganization and normalization data transformation on the useful information corresponding to each protocol message to obtain the transformed useful information corresponding to each protocol message, including:

[0061] According to the preset configuration file, the useful information corresponding to each protocol message is reassembled in a byte-aligned manner to obtain the reassembled useful information corresponding to each protocol message. Here, the configuration file refers to a file that is set in advance according to the collection requirements before the protocol is input, and the useful information is byte-aligned to improve the efficiency of data collection and conversion.

[0062] The reconstructed useful information extracted from the protocol messages corresponding to different input protocols is normalized according to the normalization format in the preset configuration file to obtain the transformed useful information corresponding to each protocol message. That is, it is re-stored according to a unified format, and the data is regular and orderly for subsequent data processing.

[0063] Continuing with the above embodiments of this application, the method for converting protocol messages further includes:

[0064] The target output message is sent to the target device in accordance with the target output protocol, so that the target device can store and / or display the target output message.

[0065] like Figure 4The diagram shown illustrates the circuit layout of a hardware device in a practical application scenario for a protocol message conversion method according to one aspect of this application. The hardware device mainly consists of a memory, CPU, RAM, and several peripheral interfaces. The CPU is responsible for data processing during the protocol conversion process; the RAM stores the computational data during the protocol conversion process; the RAM stores configuration files, commonly used settings, and important intermediate files during the protocol conversion process. The peripheral interfaces include: a serial port, a power port, an SD card, an external display port, WIFI, GPIO, a USB port, Ethernet port 1, and Ethernet port 2. The serial port serves as the input port for protocol conversion, extracting useful data from the serial port and outputting it using the HTTP protocol, thus achieving the conversion from serial protocol to HTTP protocol. The power port is mainly used for powering the hardware device. The SD card serves as an external storage device. The external display port can connect to… The device features a display screen for interaction with the data acquisition protocol conversion device; a Wi-Fi interface for wireless networks; general-purpose GPIO for input and output; a USB port for protocol conversion, extracting useful data from the USB port and outputting it via the HTTP protocol, thus achieving USB-to-HTTP protocol conversion. The USB port can also connect common peripherals such as a mouse and keyboard; Ethernet port 1 is an input port for upper-layer protocols based on TCP, such as Siemens' TPKT, MODBUS, XML, EIPscanner, CIP, MQTT, etc. Useful data is extracted from Ethernet port 1 and output via the HTTP protocol, thus achieving data conversion based on upper-layer TCP protocols; Ethernet port 2 primarily serves as the output port after protocol conversion, uniformly converting the protocol to output data via the HTTP protocol.

[0066] Following the above embodiments of this application, the method for converting protocol messages further includes:

[0067] Time compensation is performed on each protocol message in the protocol messages corresponding to the different input protocols. Here, since big data applied in industry generally requires time-series data with equal intervals, time compensation can ensure that even when the response time of the data carrier device is uncertain, uniform time-series data can be obtained, thereby obtaining data with equal intervals.

[0068] like Figure 2The diagram shows a flowchart of a protocol message conversion method according to one aspect of this application, used to obtain the Siemens PLC input protocol in a practical application scenario. Here, B is the response time of the Siemens PLC, and the specific value of B is uncertain, but less than or equal to the Siemens PLC's scan cycle (e.g., the maximum Siemens scan cycle is 20ms). If the network delay between A and C is less than 2ms, the acquisition interval can be set to less than 25ms. If a certain data point calculates the time T from A to B to C, it will be delayed by T1 (T1=25-T) to obtain time-series data with uniform intervals, facilitating data analysis and computation.

[0069] Following the above embodiments of this application, the method for converting protocol messages further includes:

[0070] A preset configuration file is provided, which includes configuration information of the input / output protocol, network parameters of the input / output protocol, uplink and downlink communication parameters between the data acquisition protocol converter and the upper-layer server, and variable parameters to be acquired and converted.

[0071] Following the above embodiments of this application, the method for converting protocol messages further includes:

[0072] Update the preset configuration file.

[0073] In practical application scenarios, the protocols that are supported for configuration and application include Siemens' TPKT protocol, MODBUS protocol, XML protocol, EIP scanner, CIP protocol, MQTT, etc. The configuration task includes, but is not limited to, the configuration of input and output protocols, the variables that need to be converted and collected, the network parameters of the input and output protocol machines, and the configuration of the uplink and downlink communication parameters between the data acquisition protocol converter and the upper-layer server. The configuration is performed through the configuration file config.json or a web page. The configuration may be changed during the entire program process, so the configuration management task continuously reads the configuration periodically and updates it in a timely manner.

[0074] Continuing with the above embodiments of this application, the method for converting protocol messages further includes:

[0075] It provides real-time monitoring of the protocol message conversion status, supports communication with the server, establishes information exchange with the server, allows the server to understand the conversion status at any time, and can actively control and process the protocol message conversion. It monitors the conversion operation status and displays data in real time, ensuring security and stability.

[0076] like Figure 5The diagram shows a software system flowchart of a protocol message conversion method according to one aspect of this application in a practical application scenario. The software system consists of six modules that run in parallel on the hardware device. The six modules are: protocol configuration module, protocol conversion module, registration module, heartbeat module, downlink module, and time synchronization module. When the system starts, it first reads the contents of the protocol configuration module. The configuration file includes the configuration information of the input / output protocol, the network parameters of the input / output protocol, the uplink and downlink communication parameters between the data acquisition protocol converter and the upper-layer server, and the variable parameters to be collected and converted. The registration module is the module that communicates with the upper-layer server. The data acquisition protocol converter can be registered under the upper-layer server architecture, such as a server in a factory or a cloud server. Registration can be done by providing an API interface, which is convenient for management. The heartbeat module is also the module that interacts with the upper-layer server and is used to show the upper-layer server whether the data acquisition protocol converter is working properly. The downlink module is the module that receives information sent to the data acquisition protocol converter by the upper-layer server and is used to receive instructions issued by the upper-layer server. The time synchronization module ensures that the system and the input / output system always maintain time consistency and avoids data quality being affected by excessive time errors. The time synchronization accuracy of this device is at the microsecond level.

[0077] Meanwhile, in practical application scenarios, the protocol configuration module, registration module, heartbeat module, downlink module, and time synchronization module form a complete structure that includes uplink, downlink, and north-south communication. When the northbound server does not support device registration, heartbeat detection, and downlink commands, the data acquisition protocol converter can perform only the most basic data acquisition protocol conversion process according to the actual situation.

[0078] like Figure 6 The diagram shows a data flow flowchart of a protocol message conversion method according to one aspect of this application in a practical application scenario. The southbound service includes various protocol input equipment carriers, such as PLCs, robots, CNC devices, motors, etc., and standardized protocols containing useful information, such as OPC-UA. The southbound devices input data to the data acquisition protocol conversion device. The data acquisition protocol conversion device operates in parallel in hardware and includes a protocol configuration module, a protocol conversion module, a registration module, a heartbeat module, a downlink module, and a time synchronization module. The protocol conversion module is the core module of the data acquisition protocol conversion device, divided into protocol input, data extraction, data reassembly, data conversion, and protocol output processes. The northbound server is the final protocol output target and can provide other functions, such as registration, heartbeat, downlink, time synchronization, protocol output, and configuration management, as well as other extended modules. The northbound server completes different functions of data interaction with the data acquisition protocol device through different ports, such as providing a database interface to receive and save data, and providing a web port to display the received data in real time.

[0079] According to another aspect of this application, a non-volatile storage medium is also provided, on which computer-readable instructions are stored, which, when executed by a processor, cause the processor to implement a protocol message conversion method as described above.

[0080] According to another aspect of this application, a device for converting protocol messages is also provided, wherein the device includes:

[0081] One or more processors;

[0082] Computer-readable medium for storing one or more computer-readable instructions.

[0083] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the protocol message conversion method described above.

[0084] For details of the various embodiments of the protocol message conversion device, please refer to the corresponding parts of the embodiments of the protocol message conversion method described above, and they will not be repeated here.

[0085] In summary, this application obtains protocol messages corresponding to different input protocols; extracts data from each protocol message to obtain useful information; sequentially reassembles and normalizes the useful information of each protocol message to obtain converted useful information; and reassembles the converted useful information according to the target output protocol to obtain the target output message corresponding to each protocol message. The target output message is output in accordance with the target output protocol. This achieves the acquisition of diverse, inputtable protocol messages, enabling rapid and accurate data conversion while performing multiple protocol conversions, and unifying the output of different input protocols, adapting to multiple input protocols and expanding the application scenarios.

[0086] It should be noted that this application can be implemented in software and / or a combination of software and hardware, for example, using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In one embodiment, the software program of this application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of this application (including related data structures) can be stored in a computer-readable recording medium, such as RAM memory, a magnetic or optical drive, a floppy disk, or similar devices. Furthermore, some steps or functions of this application can be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.

[0087] Furthermore, a portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. The program instructions invoking the methods of this application may be stored in a fixed or removable recording medium, and / or transmitted via data streams in broadcast or other signal carrying media, and / or stored in the working memory of a computer device operating according to the program instructions. Here, one embodiment of this application includes an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, the apparatus is triggered to operate the methods and / or technical solutions based on the foregoing embodiments of this application.

[0088] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be embraced within this application. No reference numerals in the claims should be construed as limiting the scope of the claims. Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices recited in the apparatus claims may also be implemented by a single unit or device in software or hardware. The terms "first," "second," etc., are used to indicate names and do not indicate any particular order.

Claims

1. A method for converting protocol messages, wherein, The method includes: Obtain protocol messages corresponding to different input protocols, and perform time compensation on each of the protocol messages corresponding to the different input protocols to obtain time-series data with uniform intervals. Data is extracted from each time-compensated protocol message to obtain useful information corresponding to each protocol message; According to the preset configuration file, the useful information corresponding to each protocol message is reassembled in a byte-aligned manner to obtain the reassembled useful information corresponding to each protocol message. The reassembled useful information extracted from the protocol messages corresponding to different input protocols is normalized according to the normalization format in the preset configuration file to obtain the converted useful information corresponding to each protocol message. Each piece of converted useful information is reassembled according to the target output protocol to obtain the target output message corresponding to each protocol message, wherein the target output message is output in accordance with the target output protocol.

2. The method according to claim 1, wherein, The step of extracting data from each of the protocol messages to obtain useful information corresponding to each protocol message includes: Remove the useless data at the beginning, end, and middle of each protocol message, and extract the information to be converted and sent from the useful data to obtain the useful information corresponding to each protocol message.

3. The method according to claim 1, wherein, The method further includes: The target output message is sent to the target device in accordance with the target output protocol, so that the target device can store and / or display the target output message.

4. The method according to any one of claims 1 to 3, wherein, The method further includes: A preset configuration file is provided, which includes configuration information of the input / output protocol, network parameters of the input / output protocol, uplink and downlink communication parameters between the data acquisition protocol converter and the upper-layer server, and variable parameters to be acquired and converted.

5. The method according to claim 4, wherein, The method further includes: Update the preset configuration file.

6. The method according to claim 1, wherein, The method further includes: Real-time monitoring of the transition status of protocol messages.

7. A non-volatile storage medium having stored computer-readable instructions thereon, which, when executed by a processor, cause the processor to perform the method as described in any one of claims 1 to 6.

8. A protocol message conversion device, wherein, The device includes: One or more processors; Computer-readable medium for storing one or more computer-readable instructions. When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors perform the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Communication protocol conversion method and device

    CN109561104A

  • Data management method and device

    CN114827262A