A protocol conversion method, system, device, and medium for multi-source heterogeneous devices.

By constructing a protocol feature matrix and a pre-trained model to identify the protocols of multi-source heterogeneous equipment in the LNG tank meter system, and generating a conversion rule chain, the problem of poor protocol compatibility between equipment is solved, enabling rapid equipment access and efficient data conversion, improving system reliability and data utilization efficiency, and promoting the intelligent and digital transformation of LNG receiving terminals.

CN122496569APending Publication Date: 2026-07-31CNOOC GAS & POWER GRP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CNOOC GAS & POWER GRP
Filing Date
2026-05-06
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Poor protocol compatibility of heterogeneous devices in LNG tank metering systems leads to long equipment replacement times, severe data silos, and low system reliability, hindering the construction of smart receiving stations and data utilization.

Method used

By monitoring the communication messages of the target device, a protocol feature matrix is ​​constructed, a pre-trained model is used to predict the source protocol information, and a conversion rule chain is generated to achieve seamless data conversion between different protocols, combined with a security interlock response.

Benefits of technology

It enables rapid and accurate protocol identification and data conversion for multi-source heterogeneous devices, reduces integration costs, improves system reliability and data utilization efficiency, and supports intelligent and digital transformation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention relates to the field of communication technology for LNG tank metering systems, and discloses a method, system, device, and medium for protocol conversion of multi-source heterogeneous devices. The method includes: monitoring communication messages of the target LNG measuring device; constructing a protocol feature matrix and predicting source protocol information using a pre-trained protocol prediction model; identifying key data points and generating a conversion rule chain between the source protocol and a preset target protocol according to preset mapping rules; and using the rule chain to perform protocol data conversion. For unknown protocols, deep fingerprint feature vectors are extracted for clustering and new protocol templates are generated. This invention solves the problems of poor compatibility, high integration costs, and data silos caused by fragmented and closed instrument protocols in LNG receiving stations by replacing manual configuration with intelligent identification and program development with dynamic mapping. It achieves plug-and-play and efficient interconnection of heterogeneous devices, ensuring system security and scalability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology for LNG tank meter systems, and in particular to a protocol conversion method, system, device, and medium for multi-source heterogeneous devices. Background Technology

[0002] As a core infrastructure for national energy security, LNG receiving terminals rely heavily on automated monitoring systems for the entire process of storing and transporting cryogenic media. These systems integrate numerous specialized instruments to achieve data acquisition and safety interlocks, encompassing key equipment such as servo level gauges, LTD temperature density meters, and multi-point temperature sensors. However, in the process of large-scale expansion and intelligent upgrading of the industry, the heterogeneity of instrumentation equipment has become increasingly prominent: European and American manufacturers monopolize 90% of the market share, and their closed protocols create a technical black box, leading to a serious deterioration in protocol compatibility between equipment. This fragmented situation has triggered a triple dilemma—equipment replacement requires reverse engineering to crack proprietary protocols; protocol adaptation and debugging take an average of 72 hours, far exceeding the 4-hour safety window, resulting in a surge in the risk of LNG leakage at -162℃; and it further hinders the construction of smart receiving terminals. Protocol compatibility has become a fatal bottleneck restricting the inherent safety and digital transformation of the LNG sector.

[0003] This protocol incompatibility also poses a serious challenge to the system integration of LNG storage and transportation companies: system integrators or enterprise automation departments need to develop or configure dedicated conversion interfaces or gateways for each specific protocol, consuming a lot of manpower, material resources, and time; field instruments and equipment are diverse and widely distributed, making the configuration, management, and maintenance of protocol conversion interfaces extremely cumbersome. When equipment is upgraded or new equipment is added, interfaces need to be re-adapted or developed, resulting in poor system scalability and flexibility; data from devices using different protocols are difficult to aggregate and interact efficiently and in real time on a unified platform, forming data silos and hindering the effective use of data by upper-level applications (such as advanced process control, real-time optimization, predictive maintenance, energy management, and production execution systems); reliance on multiple heterogeneous protocol conversion gateways or customized interfaces increases system failure points, reduces the overall system reliability and stability, and poses a potential threat to the safe and stable operation of petrochemical production.

[0004] Currently, the main methods for solving the protocol compatibility problem of LNG tank meter system equipment include: using hardware gateways for two specific protocols (such as Modbus RTU to Modbus TCP), which has the disadvantages of fixed functions, limited supported protocol combinations, inability to flexibly cope with the needs of a large number of heterogeneous protocols in the field, and high deployment costs; developing customized protocol parsing: developing customized protocol parsing software or drivers for specific equipment and protocols, which has a long development cycle, high cost, poor universality, and difficulty in adapting to the rapid updates and diversified needs of instrument equipment.

[0005] Therefore, LNG tank metering systems urgently need an intelligent, universal, and simplified configuration solution. Summary of the Invention

[0006] To address the issues of poor compatibility, high integration costs, and data silos caused by fragmented and closed instrument protocols in existing LNG tank meter systems, this invention provides a protocol conversion method, system, device, and medium for multi-source heterogeneous devices.

[0007] This invention provides a protocol conversion method for multi-source heterogeneous devices, comprising: Listen to the communication messages of the target LNG measuring device, wherein the target LNG measuring device includes at least one of a liquid level measuring device, a temperature measuring device, and a density measuring device; Based on the communication messages, a protocol feature matrix is ​​constructed, and a pre-trained protocol prediction model is used to predict the source protocol information of the communication messages. Key data points are identified in the communication message, and a conversion rule chain between the source protocol and the preset target protocol is generated, which includes data validity verification rules, based on the preset data point mapping rules and the source protocol information. The conversion rule chain is used to convert data between the source protocol and the preset target protocol for each LNG measurement device, and a preset safety interlock response is triggered when the data validity verification result exceeds the preset safe operation threshold of the LNG storage tank.

[0008] According to the protocol conversion method for multi-source heterogeneous devices provided by the present invention, the step of constructing a protocol feature matrix based on communication messages and predicting the source protocol information of communication messages using a pre-trained protocol prediction model includes: Extract message features from communication messages and construct a protocol feature matrix. The message features include any one of the following or any combination thereof: message structure features, timing features, and abnormal response features.

[0009] According to the protocol conversion method for multi-source heterogeneous devices provided by the present invention, the pre-trained protocol prediction model is obtained by training a machine learning algorithm based on protocol feature matrix sample data and protocol information label data.

[0010] According to the protocol conversion method for multi-source heterogeneous devices provided by the present invention, the machine learning algorithm is a decision tree algorithm, and the step of constructing a protocol feature matrix based on communication messages and predicting the source protocol information of communication messages using a pre-trained protocol prediction model includes: The pre-trained protocol prediction model calculates the matching degree of the protocol feature matrix on each decision path; When the matching degree is equal to or greater than the preset threshold, the protocol information label on the decision path with the highest matching degree is used as the source protocol information. When the matching degree is less than the preset threshold, the source protocol information is marked as an unknown protocol.

[0011] According to the present invention, a protocol conversion method for multi-source heterogeneous devices is provided, wherein the protocol information includes protocol content and protocol version.

[0012] According to the protocol conversion method for multi-source heterogeneous devices provided by the present invention, the step of constructing a protocol feature matrix based on communication messages and predicting the source protocol information of communication messages using a pre-trained protocol prediction model includes: When the source protocol information is marked as an unknown protocol, extract the deep fingerprint feature vector to be tested from the communication message; The similarity calculation or clustering of the deep fingerprint feature vector to be tested with the deep fingerprint feature vectors of known protocols in the preset protocol knowledge base is performed, and the deep fingerprint feature vector to be tested is assigned to a certain known protocol cluster or forms its own category. When a protocol cluster forms its own category, a new protocol description template is generated based on the commonalities and variable parts of that category and stored in a pre-set protocol knowledge base. The protocol information in the pre-set protocol knowledge base can be used to train a pre-trained protocol prediction model.

[0013] In one embodiment, the deep fingerprint feature vector is constructed by extracting fixed byte patterns through data mining of multiple frames in the communication message; the similarity calculation adopts at least one of cosine similarity or Euclidean distance; and the clustering adopts at least one of hierarchical clustering or density clustering.

[0014] According to the protocol conversion method for multi-source heterogeneous devices provided by the present invention, the step of identifying key data points in communication messages and generating a conversion rule chain between the source protocol and the preset target protocol, which includes data validity verification rules, based on preset data point mapping rules and source protocol information, includes: In the communication message, by parsing the device metadata, the field location and data format of the liquid level data point, temperature data point, or density data point in the communication message are identified; and / or, The semantic analysis engine is used to perform semantic inference on the numerical fields in the communication message. Based on the range and trend of the numerical value, the physical quantity type corresponding to the numerical field is determined, and liquid level data point, temperature data point or density data point is identified. Among them, key data points are data units with business significance, including liquid level data points, temperature data points, and density data points.

[0015] In one embodiment, the preset data point mapping rule includes mapping rules that map the liquid level data point, temperature data point, and density data point to the corresponding data nodes in the standard data model of the target protocol, respectively; the conversion rule chain includes field extraction rules, byte order conversion rules, and target data node mapping rules executed sequentially.

[0016] According to the present invention, a protocol conversion method for multi-source heterogeneous devices, wherein the data conversion between the source protocol and the preset target protocol of each LNG measurement device using a conversion rule chain includes: The conversion rule chain is encapsulated into a protocol adapter, which is categorized and stored according to the instrument type of the target LNG measuring equipment; When a new LNG measurement device requests access, based on the source protocol information predicted by the pre-trained protocol prediction model and the instrument type of the new LNG measurement device, the existing protocol adapter of the same type of instrument is preferentially matched to perform data conversion. When an existing protocol adapter for the same type of instrument fails to match, a new protocol adapter is generated and archived into the protocol adapter library according to the instrument type.

[0017] In one implementation, the protocol adapter is a containerized microservice; When the new LNG measurement equipment is connected, resources are dynamically allocated through the container engine to create an isolated operating environment to run the protocol adapter; when the LNG measurement equipment goes offline, the resources occupied by the isolated operating environment are released. The present invention also provides a protocol conversion system for multi-source heterogeneous devices, comprising: The monitoring module is used to monitor the communication messages of the target LNG measurement equipment. The prediction module is used to: construct a protocol feature matrix based on the communication message, and use a pre-trained protocol prediction model to predict the source protocol information of the communication message; The mapping module is used to: identify key data points in communication messages, and generate a conversion rule chain between the source protocol and the preset target protocol, which includes data validity verification rules, based on preset data point mapping rules and source protocol information. The conversion module is used to: convert data between the source protocol and the preset target protocol for each LNG measurement device using the conversion rule chain, and trigger a preset safety interlock response when the data validity verification result exceeds the preset safe operation threshold of the LNG storage tank.

[0018] The present invention also provides an electronic device, including a processor and a memory storing a computer program, wherein the processor executes the computer program to implement the protocol conversion method for multi-source heterogeneous devices described above.

[0019] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the protocol conversion method for multi-source heterogeneous devices described above.

[0020] The present invention also provides a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the computer is able to execute any of the above-described protocol conversion methods for multi-source heterogeneous devices.

[0021] The present invention provides a protocol conversion method, system, device, and medium for multi-source heterogeneous devices, which can bring at least the following beneficial effects: This invention enables real-time monitoring and analysis of communication messages from target LNG measurement equipment. By constructing a protocol feature matrix that includes message structure, timing, and abnormal response characteristics, it can automatically detect and accurately predict the source protocol content and version of messages without intruding on the equipment or relying on closed vendor documentation. This reduces the identification process to the second level. Furthermore, for potential "unknown protocols," this invention extracts deep fingerprint feature vectors for similarity calculation and clustering, possessing adaptive learning capabilities. It can generate new protocol description templates and expand the knowledge base, greatly improving compatibility and flexibility with future additions or non-standard instrument protocols.

[0022] After identifying the source protocol information, this invention further utilizes parsing device metadata and a semantic analysis engine to identify key data points with business significance in the communication messages, and automatically generates a conversion rule chain from the source protocol to the preset target protocol based on preset data point mapping rules. This mechanism can replace the tedious programming work of developing customized protocol parsing software or drivers for each specific instrument, thereby improving the efficiency of data point conversion rule generation by orders of magnitude, and eliminating the need for complex code-level modifications to the field control system, greatly reducing the manpower and time costs of system integration.

[0023] This invention encapsulates the generated conversion rule chain into a flexible protocol adapter. When any LNG measurement device is connected or replaced, the corresponding protocol adapter can be dynamically scheduled based on the predicted source protocol information, enabling seamless data conversion between the source protocol and the preset target protocol for multi-source heterogeneous devices. This ensures that data from various instruments such as servo level gauges and multi-point temperature sensors can be efficiently and in real-time aggregated on a unified platform. This not only reduces system failure points and operational complexity introduced by relying on multiple heterogeneous protocol gateways, ensuring the safe and stable operation of petrochemical production, but also provides high-quality, standardized data support for upper-level applications (such as advanced process control, real-time optimization, predictive maintenance, and energy management systems), promoting the deep transformation of LNG receiving terminals from automation to intelligence and digitalization. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0025] Figure 1 This is one of the flowcharts illustrating a protocol conversion method for multi-source heterogeneous devices provided by the present invention.

[0026] Figure 2 This is one of the flowcharts illustrating a protocol conversion method for multi-source heterogeneous devices provided by the present invention.

[0027] Figure 3 This is a schematic diagram of the structure of a protocol conversion system for multi-source heterogeneous devices provided by the present invention.

[0028] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, embodiments of this invention, and should not be construed as limiting the invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention. In the description of this invention, it should be understood that the terminology used is for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0030] Figure 1 and 2 This is a flowchart illustrating a protocol conversion method for multi-source heterogeneous devices provided by the present invention. The execution entity of the protocol conversion method for multi-source heterogeneous devices provided by the present invention can be any applicable terminal-side device or network-side device, such as a protocol conversion device for multi-source heterogeneous devices.

[0031] See Figure 1 and 2 The present invention provides a protocol conversion method for multi-source heterogeneous devices, which may include: S110, Monitor the communication messages of the target LNG measurement equipment.

[0032] S120. Based on the communication messages, construct the protocol feature matrix and use the pre-trained protocol prediction model to predict the source protocol information of the communication messages.

[0033] In one embodiment, S120 can extract message features from the communication message, perform cleaning, standardization and feature engineering processing, and construct a structured protocol feature matrix. The message features include any one of the following or any combination thereof: message structure features (such as fixed frame start / end characters, length field position, function code range, etc.), timing features (such as the frequency of communication interaction, the behavior pattern of fixed delays in requests and responses), and abnormal response features (such as specific return formats for erroneous requests, timeout retransmission mechanisms, etc.).

[0034] In one embodiment, training data can be obtained by collecting and parsing publicly released standard protocol documents and communication specifications from multiple industrial equipment manufacturers, including but not limited to Modbus RTU / ASCII / TCP. The training steps may include: Stage 1: Comparative pre-training (self-learning), simulating data based on a publicly available protocol, feeding the output value and scaled true value into the prediction model, and performing simulation deduction; Stage 2: Supervised fine-tuning, fine-tuning the prediction protocol based on the pre-trained weights and inputting complete information from the publicly available protocol to form the prediction model. In one embodiment, the pre-trained protocol prediction model is trained using a decision tree algorithm based on protocol feature matrix sample data and protocol information label data. During training, the decision tree model learns how to make decision splits based on feature values. For example, the root node may split based on the "start / end character of the message"; internal nodes may make judgments based on whether the "function code value is within the range of 1-6" or whether the "request-response interval is less than 10ms". Ultimately, each leaf node represents a specific protocol type and version (e.g., "Modbus TCP V1.0"). When a new device connects, the system extracts three types of features from its real-time communication messages to form a feature vector to be identified. This vector is then input into a pre-trained multi-level decision tree model. The model performs layer-by-layer matching according to the decision rules of each node, eventually reaching a leaf node, which outputs the most likely protocol type and version. This process achieves automated and rapid classification from raw message features to protocol standards.

[0035] In one embodiment, S120 may include: The pre-trained protocol prediction model calculates the matching degree of the protocol feature matrix on each decision path; When the matching degree is equal to or greater than a preset threshold (e.g., 85%), the protocol information label on the decision path with the highest matching degree is used as the source protocol information, where the protocol information includes the protocol content and the protocol version. When the matching degree is less than a preset threshold, the source protocol information is marked as an unknown protocol; When the source protocol information is marked as an unknown protocol, the deep fingerprint feature vector to be tested is extracted from the communication message (the original data packet can be automatically analyzed by data mining algorithms to find a fixed and unique byte pattern (like finding a fingerprint), and these patterns are used as the basis for identifying the unknown protocol to form the deep fingerprint feature vector to be tested). The similarity calculation or clustering of the deep fingerprint feature vector to be tested with the deep fingerprint feature vectors of known protocols in the preset protocol knowledge base is performed, and the deep fingerprint feature vector to be tested is assigned to a certain known protocol cluster or forms its own category. When a protocol cluster forms its own category, a new protocol description template (containing a fixed header) is generated based on the commonalities and variable parts of that protocol cluster and stored in a preset protocol knowledge base. The protocol information in the preset protocol knowledge base can be used to train a pre-trained protocol prediction model.

[0036] In one embodiment, the deep fingerprint feature vector is extracted by data mining of multiple frames in the communication message. Specifically, a stacked autoencoder is used to encode the original message byte sequence to extract a fixed and unique byte pattern, which constitutes the deep fingerprint feature vector to be tested. In the similarity calculation stage, cosine similarity or Euclidean distance is used to calculate the distance between the deep fingerprint feature vector to be tested and each known protocol fingerprint vector in the preset protocol knowledge base. In the clustering stage, hierarchical clustering or density clustering algorithms are used to classify the deep fingerprint feature vector to be tested into a protocol cluster or into its own class.

[0037] S130. Identify key data points in the communication message (such as liquid level 2506 (the liquid level data transmitted at this point is 2506, which usually needs to be scaled to obtain the actual liquid level value)), and generate a conversion rule chain between the source protocol and the preset target protocol based on the preset data point mapping rules (such as "temperature → 4012, unit ℃" (the temperature data transmitted at this point is 4012, which usually needs to be scaled to obtain the actual temperature value)) and the source protocol information.

[0038] In one embodiment, S130 can identify key data points in the communication message by parsing device metadata; and / or identify key data points in the communication message using a semantic analysis engine; wherein, key data points are data units with business significance.

[0039] A communication message refers to the raw byte stream transmitted by a device over a network; it is the physical carrier of data.

[0040] Metadata values: Data that describes the device's own attributes and static information about data points. For example, the name ("level"), description, unit ("meter"), and range of a data point. This information may come from the device manual, configuration files, or be parsed from protocol messages.

[0041] A key data point refers to a data unit with business significance identified from a communication message. For example, through protocol identification, it can be known that the two bytes starting at offset 0x10 in the message represent the liquid level value. Binding this concept of "liquid level value" (defined by metadata) to its specific location in the message (offset 0x10) constitutes a key data point.

[0042] Metadata provides semantic context for understanding communication messages; protocol identification and fingerprint learning provide methods for locating and parsing key data points from communication messages (such as which byte represents the liquid level); and data point mapping is precisely about associating these parsed key data points (source data points) with the data model of the target system (target data points).

[0043] In one embodiment, the conversion rule chain includes, in sequence: field extraction rule (extracting a byte sequence of a specified length from a specified offset in the communication message), byte order conversion rule (converting from big-endian to little-endian according to the byte order format of the source protocol), and target data node mapping rule (writing the converted value into the corresponding data node in the standard data model of the preset target protocol).

[0044] S140. Use the conversion rule chain to perform data conversion between the source protocol and the preset target protocol for each LNG measurement device.

[0045] In one embodiment, S140 can encapsulate the static conversion rule chain into a dynamically running, independent, stateless protocol adapter (i.e., the complete logic for parsing and converting a specific protocol, including its identification rules, data point mapping table, and conversion rule chain); when a new LNG measurement device requests access, based on the source protocol information of the communication message predicted by the pre-trained protocol prediction model, the corresponding protocol adapter image is pulled, dynamically loaded and run, and data conversion between the source protocol of the new LNG measurement device and the preset target protocol is performed; when the device is offline, resources are released, realizing true on-demand use and elastic scaling.

[0046] In one embodiment, the conversion rule chain further includes data validity verification rules. These rules are generated based on preset safe operating thresholds for the LNG storage tank. For example, the valid range for level data points is 5% to 95% of the tank's capacity, the valid range for temperature data points is -165℃ to -155℃, and the valid range for density data points is 420 to 470 kg / m³. After data conversion, the conversion module verifies the converted key data point values. When the verification result exceeds the aforementioned safe operating thresholds, a preset safety interlock response is triggered, including sending an alarm signal to the upper-level monitoring system and / or suspending the data conversion output of the corresponding LNG measuring equipment, which resumes after manual confirmation.

[0047] The present invention will be further illustrated by several examples below.

[0048] Example 1 Taking the addition of a servo level gauge based on the RS485 non-standard protocol at an LNG receiving terminal as an example, the servo level gauge uses a non-standard Modbus protocol based on RS485, and the factory wants to connect its data to the existing tank meter system.

[0049] Protocol intelligent identification steps: After the servo level gauge is connected to the system, the gateway first passively listens to its communication messages. Finding that the messages do not conform to the standard Modbus format, it initiates an active probe, sending a standard Modbus request. The servo level gauge returns an error code with a specific format. The system extracts its structural features and communication timing features, constructs a protocol feature matrix, and inputs it into a pre-trained protocol prediction model. The model ultimately fails to match at low confidence, triggering protocol fingerprint learning. The system uses a stacked autoencoder to extract deep fingerprint feature vectors from multiple frames of messages and compares them with a preset protocol knowledge base. Finding no match, it automatically categorizes the message into a new cluster and generates a new protocol template named "V1".

[0050] The dynamic generation steps for data point mapping rules are as follows: The system parses the new protocol template and locates the data fields in the message. Simultaneously, the semantic analysis engine observes a 16-bit value that slowly fluctuates between 20.0 and 80.0, inferring it to be the liquid level. The system searches the semantic mapping template library and finds the template ("liquid level", "Tank.Level", "value"), therefore automatically suggesting mapping this field to the existing "Tank.Level" variable in the tank meter system. Based on the template rules (keeping the value unchanged) and combined with the data format (Little-Endian integer) parsed from the message, a dynamic conversion rule chain is generated: [Extract(offset=3, length=2), EndianConvert("Little"), MapTo("ns=2;s=Tank.Level")].

[0051] After completing the data conversion, the adapter verifies the validity of the output liquid level value to confirm that it is within the preset safe operating threshold range of the LNG storage tank (such as 5% to 95% of the tank capacity). If the verification is successful, the data is sent to the upper-level tank capacity calculation system; if the verification fails, an alarm signal is triggered.

[0052] Containerized protocol microservice deployment steps: The system packages the new "Legacy_Modbus_Like_V1" protocol adapter into an image. The scheduling engine dynamically runs this adapter based on the sensor's access request. After the adapter starts, it processes the sensor data according to the rule chain, packages the parsed liquid level values ​​into standard JSON format ({"timestamp": ..., "value": 35.6}), and sends it to the "plant_data" topic in Kafka.

[0053] The above steps enable rapid and reliable connection of old, non-standard equipment.

[0054] Example 2: Two-way seamless replacement process Scenario 1: Equipment failure and replacement (e.g., damaged level gauge) The specific work steps are as follows: Remove the faulty level gauge and connect the new equipment to the original communication line; The protocol intelligent identification module sniffs out new device messages; Once the protocol matrix match is successful, the corresponding protocol container is loaded (e.g., Modbus RTU → HART conversion). After the protocol intelligent identification module identifies the source protocol information of the new device, it searches the protocol adapter library based on the instrument type (level gauge) of the new device, prioritizing the matching of existing protocol adapters for the same type of instrument (level gauge). If a match is successful, it is directly loaded and run without the need to regenerate the conversion rule chain, achieving plug-and-play functionality. The tank capacity calculation software automatically receives the original protocol data through the existing interface, completing a seamless replacement.

[0055] Scenario 2: System failure replacement (e.g., tank capacity software crash) The specific work steps are as follows: After the new tank capacity software is installed, it automatically sends connection requests to field devices or listens to raw messages through the protocol intelligent identification module. The identification module reverse-engineers virtual device drivers (dynamically allocating physical resources through the container engine, creating an isolated environment to encapsulate protocol-driven applications, and calling the container through standard interfaces). The new software directly reads the converted standard protocol, completing a seamless replacement.

[0056] The protocol conversion method for multi-source heterogeneous devices provided by this invention transforms the traditional integration model, which relies on a large number of distributed, fixed-function hardware gateways or deeply customized software, into a service-oriented architecture based on software intelligent recognition and dynamic mapping. This transformation directly brings significant economic benefits: firstly, it greatly reduces the deployment cost of purchasing hardware gateways for specific protocols; secondly, it reduces the costs of repetitive development and debugging caused by equipment replacement and upgrades; and finally, it simplifies the cumbersome configuration management and maintenance work caused by the large variety and wide distribution of field instruments and devices. The system has extremely high scalability; adding new devices only requires model recognition and adapter scheduling, without downtime for modification. While ensuring the reliability of industrial-grade real-time data transmission, it effectively controls the complexity and cost of the entire lifecycle operation and maintenance of LNG storage and transportation facilities.

[0057] The protocol conversion system for multi-source heterogeneous devices provided by the present invention is described below. The protocol conversion system for multi-source heterogeneous devices described below can be referred to in correspondence with the protocol conversion method for multi-source heterogeneous devices described above.

[0058] See Figure 3 The present invention provides a protocol conversion system for multi-source heterogeneous devices, which may include: The monitoring module is used to monitor the communication messages of the target LNG measurement equipment. The prediction module is used to: construct a protocol feature matrix based on the communication message, and use a pre-trained protocol prediction model to predict the source protocol information of the communication message; The mapping module is used to: identify key data points in communication messages, and generate a conversion rule chain between the source protocol and the preset target protocol, which includes data validity verification rules, based on preset data point mapping rules and source protocol information. The conversion module is used to: convert data between the source protocol and the preset target protocol for each LNG measurement device using the conversion rule chain, and trigger a preset safety interlock response when the data validity verification result exceeds the preset safe operation threshold of the LNG storage tank.

[0059] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute the following steps: Monitor the communication messages of the target LNG measurement equipment; Based on the communication messages, a protocol feature matrix is ​​constructed, and a pre-trained protocol prediction model is used to predict the source protocol information of the communication messages. Key data points are identified in the communication message, and a conversion rule chain between the source protocol and the preset target protocol is generated, which includes data validity verification rules, based on the preset data point mapping rules and the source protocol information. The conversion rule chain is used to convert data between the source protocol and the preset target protocol for each LNG measurement device, and a preset safety interlock response is triggered when the data validity verification result exceeds the preset safe operation threshold of the LNG storage tank.

[0060] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0061] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, and the computer program being executed by a processor, enabling the computer to perform the following steps: Monitor the communication messages of the target LNG measurement equipment; Based on the communication messages, a protocol feature matrix is ​​constructed, and a pre-trained protocol prediction model is used to predict the source protocol information of the communication messages. Key data points are identified in the communication message, and a conversion rule chain between the source protocol and the preset target protocol is generated, which includes data validity verification rules, based on the preset data point mapping rules and the source protocol information. The conversion rule chain is used to convert data between the source protocol and the preset target protocol for each LNG measurement device, and a preset safety interlock response is triggered when the data validity verification result exceeds the preset safe operation threshold of the LNG storage tank.

[0062] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps: Monitor the communication messages of the target LNG measurement equipment; Based on the communication messages, a protocol feature matrix is ​​constructed, and a pre-trained protocol prediction model is used to predict the source protocol information of the communication messages. Key data points are identified in the communication message, and a conversion rule chain between the source protocol and the preset target protocol, which includes data validity verification rules, is generated based on the preset data point mapping rules and the source protocol information. The conversion rule chain is used to convert data between the source protocol and the preset target protocol for each LNG measurement device, and a preset safety interlock response is triggered when the data validity verification result exceeds the preset safe operation threshold of the LNG storage tank.

[0063] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0064] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0065] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A protocol conversion method of a multi-source heterogeneous device, characterized by, include: Monitor the communication messages of the target LNG measurement equipment; Based on the communication messages, a protocol feature matrix is ​​constructed, and a pre-trained protocol prediction model is used to predict the source protocol information of the communication messages. Key data points are identified in the communication message, and a conversion rule chain between the source protocol and the preset target protocol is generated, which includes data validity verification rules, based on the preset data point mapping rules and the source protocol information. The conversion rule chain is used to convert data between the source protocol and the preset target protocol for each LNG measurement device, and a preset safety interlock response is triggered when the data validity verification result exceeds the preset safe operation threshold of the LNG storage tank.

2. The protocol conversion method of a multi-source heterogeneous device according to claim 1, wherein, Construct a protocol feature matrix and use a pre-trained protocol prediction model to predict the source protocol information of communication messages, including: Extract message features from communication messages and construct a protocol feature matrix. The message features include any one of the following or any combination thereof: message structure features, timing features, and abnormal response features.

3. The protocol conversion method of a multi-source heterogeneous device according to claim 1, wherein, The pre-trained protocol prediction model is trained using machine learning algorithms based on protocol feature matrix sample data and protocol information label data.

4. The protocol conversion method of a multi-source heterogeneous device according to claim 3, wherein, The machine learning algorithm is a decision tree algorithm. The step of constructing a protocol feature matrix based on the communication messages and using a pre-trained protocol prediction model to predict the source protocol information of the communication messages includes: The pre-trained protocol prediction model calculates the matching degree of the protocol feature matrix on each decision path; When the matching degree is equal to or greater than the preset threshold, the protocol information label on the decision path with the highest matching degree is used as the source protocol information, where the protocol information includes the protocol content and the protocol version; When the matching degree is less than the preset threshold, the source protocol information is marked as an unknown protocol.

5. The protocol conversion method for multi-source heterogeneous devices according to claim 4, characterized in that, The step of constructing a protocol feature matrix based on communication messages and predicting the source protocol information of communication messages using a pre-trained protocol prediction model includes: When the source protocol information is marked as an unknown protocol, extract the deep fingerprint feature vector to be tested from the communication message; The similarity calculation or clustering of the deep fingerprint feature vector to be tested with the deep fingerprint feature vectors of known protocols in the preset protocol knowledge base is performed, and the deep fingerprint feature vector to be tested is assigned to a certain known protocol cluster or forms its own category. When a protocol cluster forms its own category, a new protocol description template is generated based on the commonalities and variable parts of that category and stored in a pre-set protocol knowledge base. The protocol information in the pre-set protocol knowledge base can be used to train a pre-trained protocol prediction model.

6. The protocol conversion method for multi-source heterogeneous devices according to claim 5, characterized in that, The step of identifying key data points in communication messages and generating a conversion rule chain between the source protocol and a preset target protocol, including data validity verification rules, based on preset data point mapping rules and source protocol information, includes: In communication messages, key data points are identified by parsing device metadata; and / or, The semantic analysis engine is used to perform semantic inference on the numerical fields in the communication message, and the physical quantity type corresponding to the numerical field is determined according to the range and trend of the numerical value, and key data points are identified. The key data points include any one or any combination of the following: liquid level data points, temperature data points, or density data points.

7. The protocol conversion method for multi-source heterogeneous devices according to claim 6, characterized in that, The preset data point mapping rules include mapping rules that map liquid level data points, temperature data points, and density data points to corresponding data nodes in the standard data model of the preset target protocol, respectively. The conversion rule chain includes field extraction rules, byte order conversion rules, and target data node mapping rules executed sequentially; and / or, The process of using a transformation rule chain to perform data conversion between the source protocol and the preset target protocol for each LNG measurement device includes: The transformation rule chain is encapsulated as a protocol adapter; When a new LNG measurement device requests access, the protocol adapter corresponding to the source protocol information of the communication message is scheduled to perform data conversion between the source protocol of the new LNG measurement device and the preset target protocol, based on the source protocol information of the communication message predicted by the pre-trained protocol prediction model.

8. A protocol conversion system for multi-source heterogeneous devices, characterized in that, include: The monitoring module is used to monitor the communication messages of the target LNG measurement equipment. The prediction module is used to: construct a protocol feature matrix based on the communication message, and use a pre-trained protocol prediction model to predict the source protocol information of the communication message; The mapping module is used to: identify key data points in communication messages, and generate a conversion rule chain between the source protocol and the preset target protocol, which includes data validity verification rules, based on preset data point mapping rules and source protocol information. The conversion module is used to: convert data between the source protocol and the preset target protocol for each LNG measurement device using the conversion rule chain, and trigger a preset safety interlock response when the data validity verification result exceeds the preset safe operation threshold of the LNG storage tank.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the protocol conversion method for multi-source heterogeneous devices as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the protocol conversion method for multi-source heterogeneous devices as described in any one of claims 1 to 7.