A communication protocol conversion method and apparatus
By configuring point tables, the communication protocol conversion between automated devices is achieved using the first and second protocol processes, which solves the problem of low protocol conversion efficiency in the prior art and improves the communication efficiency between devices and the applicability of the communication management machine.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN HOPEWIND ELECTRIC CO LTD
- Filing Date
- 2023-04-28
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies are inefficient in identifying the communication protocol types between automated devices, requiring multiple identification processes and failing to achieve efficient protocol conversion.
By configuring a point table, the first protocol process and the second protocol process poll the protocol point tables of the bottom device and the main control device respectively, and send and receive characteristic data of data points based on different communication protocols to realize the communication protocol conversion between automation devices.
It improves protocol conversion efficiency, simplifies the configuration process in the communication management unit, and enhances the applicability between devices and the applicability of the communication management unit.
Smart Images

Figure CN116320063B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication protocol conversion technology, and in particular to a communication protocol conversion method and apparatus. Background Technology
[0002] With the development of technology, the interconnection between automated equipment is becoming increasingly important. The communication protocols between them are also diverse. Currently, no single protocol can properly adapt and connect all equipment produced by different manufacturers and at different times. Communication management units are used to solve the problem of communication protocol conversion between automated equipment.
[0003] Currently, communication management units are typically used to solve the problem of communication protocol conversion between automated devices. Existing invention CN201911315186.9 discloses a protocol conversion device and method on a communication management unit. An information acquisition module receives information uploaded by a lower-level device; a protocol identification module parses and analyzes the information to obtain its protocol type; a decapsulation module decapsulates the information acquired by the information acquisition module according to its protocol type; a packaging module packages the decapsulated information according to the protocol of the upper-level device; and an information uploading module uploads the packaged information to the upper-level device. This device can automatically identify the protocol type of the access device, thereby achieving secure and reliable protocol conversion by the communication management unit.
[0004] However, the method provided by this invention for identifying the protocol type of the lower-level machine is as follows: First, information of a first protocol type is sent to the lower-level machine. If the lower-level machine can recognize it and respond accordingly, the information received by the information acquisition module belongs to the first protocol type; otherwise, it does not belong to the first protocol type. The same method is used to sequentially verify whether it belongs to the second protocol type, the third protocol type, and so on, until the correct protocol type is found. Since there are many protocol types, multiple identification processes are generally required to identify the protocol type of the lower-level machine, resulting in low protocol conversion efficiency. Summary of the Invention
[0005] This invention provides a communication protocol conversion method and apparatus, which realizes communication protocol conversion between automated devices by configuring a point table, thereby improving the protocol conversion efficiency.
[0006] According to a first aspect of the embodiments of this application, a communication protocol conversion method is provided, the method comprising:
[0007] The first protocol process polls the data points in the first protocol point table. The first protocol point table includes the first feature data of the first data point, and the first feature data includes the acquisition path.
[0008] Based on the first feature data and the first communication protocol corresponding to the first protocol process, a data acquisition command is sent to the first bottom device corresponding to the first protocol point table.
[0009] Receive and store the variable values corresponding to the acquisition path returned by the first bottom device in response to the acquisition command;
[0010] The second protocol process polls the data points in the second protocol point table. The second protocol point table includes the second feature data of the second data points, and the second feature data includes the acquisition path.
[0011] Based on the second feature data and the second communication protocol corresponding to the second protocol process, send variable values corresponding to the acquisition path to the first master control device corresponding to the second protocol point table;
[0012] The first communication protocol is different from the second communication protocol.
[0013] In one possible implementation, the first feature data further includes a first data point type and a first data point identifier for the first data point; the acquisition path includes a first bottom-end device identifier (ID) of the first bottom-end device; based on the first feature data and the first communication protocol corresponding to the first protocol process, an acquisition command is sent to the first bottom-end device corresponding to the first protocol point table, including:
[0014] If the first data point type belongs to the first target data point type, then extract the first data point identifier and the first bottom device ID of the first data point from the first protocol point table;
[0015] Query the topology table of the first protocol process to find the port ID and communication address of the first bottom device corresponding to the first bottom device ID;
[0016] Based on the first communication protocol, a data acquisition command is generated using the port ID, the communication address of the first bottom-end device, and the identifier of the first data point.
[0017] Send a data acquisition command to the first bottom-end device.
[0018] In one possible implementation, receiving and storing variable values corresponding to the acquisition path returned by the first bottom-end device in response to the acquisition command includes:
[0019] Receive data returned by the first bottom-end device in response to the acquisition command;
[0020] Parse the data to obtain the first data point type, port ID, and first bottom device ID, as well as the first data point identifier and variable value of the first data point;
[0021] Query the identifier of the first protocol point table corresponding to the port ID and the first bottom device ID in the topology table of the first protocol process;
[0022] If the first data point type belongs to the first target data point type, determine the acquisition path corresponding to the first data point type and the first data point identifier in the first protocol point table;
[0023] Variable values are stored based on the acquisition path.
[0024] In one possible implementation, variable values are stored based on the acquisition path, including:
[0025] The collection path and variable value are stored in the database as key-value pairs and key-value pairs, respectively.
[0026] In one possible implementation, the database is a non-relational database.
[0027] In one possible implementation, the second feature data further includes the second data point type, the second data point identifier, and the upload path of the second data point. The upload path includes the first master control device ID of the first master control device. Based on the second feature data and the second communication protocol corresponding to the second protocol process, variable values corresponding to the acquisition path are sent to the first master control device corresponding to the second protocol point table, including:
[0028] If the second data point type belongs to the first target data point type, then extract the second data point identifier and the first master control device ID of the second data point;
[0029] Extract the variable values corresponding to the acquisition path;
[0030] Query the topology table of the second protocol process to find the first port ID and the first master control device communication address corresponding to the first master control device ID;
[0031] Based on the second communication protocol, variable values are sent to the first master control device according to the second data point identifier, the first port ID, and the first master control device communication address.
[0032] In one possible implementation, the method also includes:
[0033] Run the third protocol process, and based on the corresponding third communication protocol of the third protocol process, receive and parse the control commands of the second master control device to obtain the command value and the third feature data of the third data point;
[0034] Query the third protocol point table of the third protocol process to find the target path corresponding to the third feature data;
[0035] Run the fourth protocol process to receive command values and target paths sent by the third protocol process;
[0036] Query the fourth protocol point table of the fourth protocol process to find the fourth feature data corresponding to the target path;
[0037] At least according to the fourth feature data and the fourth communication protocol corresponding to the fourth protocol process, a command value is sent to the second bottom device corresponding to the fourth protocol point table.
[0038] In one possible implementation, the third characteristic data includes the second master control device ID, the second port ID, the third data point type, and the third data point identifier; querying the third protocol point table of the third protocol process, the target path corresponding to the third characteristic data includes:
[0039] Query the topology table of the third protocol process to find the identifier of the third protocol point table corresponding to the second master control device ID and the second port ID;
[0040] If the third data point type belongs to the second target data point type, extract the target path corresponding to the third data point type and the third data point identifier in the third protocol point table, represented by the identifier of the third protocol point table.
[0041] In one possible implementation, the target path includes the second bottom-end device ID and the ID in the table; querying the fourth protocol point table of the fourth protocol process, the fourth feature data corresponding to the target path includes:
[0042] Extract the second bottom device ID and the ID in the table from the target path;
[0043] Query the topology table of the fourth protocol process to find the third port ID, the communication address of the second bottom device, and the identifier of the fourth protocol point table corresponding to the second bottom device ID;
[0044] Query the fourth feature data corresponding to the ID in the fourth protocol point table, as indicated by the identifier in the fourth protocol point table.
[0045] In one possible implementation, the fourth feature data includes the fourth data point type and the fourth data point identifier; at least according to the second feature data and the fourth communication protocol corresponding to the fourth protocol process, a command value is sent to the second bottom-end device corresponding to the fourth protocol point table, including:
[0046] According to the fourth communication protocol corresponding to the fourth protocol process, the target control command is generated by combining the fourth data point type, the fourth data point identifier, the third port ID, the second bottom device communication address and the command value.
[0047] Send the target control command to the second bottom device corresponding to the fourth protocol point table.
[0048] According to a second aspect of the present invention, a communication protocol conversion device is provided, comprising a data acquisition module, a database module, and an upload module; wherein, the data acquisition module includes at least one protocol process corresponding to a communication protocol, and a port corresponding to each protocol process, and each protocol process of the data acquisition module includes at least one protocol point table corresponding to a bottom-end device and a point table processing submodule corresponding to each protocol point table; the database module includes at least one database submodule; the upload module includes at least one protocol process corresponding to a communication protocol, and a port corresponding to each protocol process, and each protocol process of the upload module includes at least one protocol point table corresponding to a master control device and a point table processing submodule corresponding to each protocol point table;
[0049] The acquisition module is used to poll the data points in the first protocol point table, which is a point table processing submodule running the first protocol process. The first protocol point table includes first feature data of the first data points, and the first feature data includes the acquisition path. It is also used to send acquisition commands to the first bottom-end device corresponding to the first protocol point table through the corresponding port of the first protocol process, based on the first feature data and the first communication protocol corresponding to the first protocol process. Furthermore, it is used to receive variable values corresponding to the acquisition path returned by the first bottom-end device in response to the acquisition command through the corresponding port of the first protocol process. Finally, it is used to send variable values to the database submodule.
[0050] The database submodule is used to receive and store variable values;
[0051] The upload module is used to run the point table processing submodule of the second protocol process to poll the data points in the second protocol point table. The second protocol point table includes the second feature data of the second data points, and the second feature data includes the acquisition path. It is also used to send variable values corresponding to the acquisition path to the first master control device corresponding to the second protocol point table through the corresponding port of the second protocol process based on the second feature data and the second communication protocol corresponding to the second protocol process.
[0052] Wherein, the first protocol process is any protocol process of the acquisition module, and the first protocol point table is any protocol point table in the first protocol process; the second protocol process is the protocol process in the upload module, and the second protocol point table is the protocol point table in the second protocol process; the first communication protocol and the second communication protocol are different.
[0053] In one possible implementation, the database module also includes a message routing submodule;
[0054] The upload module is also used to run the third protocol process, receive control commands from the second master control device through the second port based on the third communication protocol corresponding to the third protocol process; it is also used to parse the control commands to obtain the command value and the third feature data of the third data point; it is also used to query the third protocol point table of the third protocol process for the target path corresponding to the third feature data; and it is also used to send the target path and command value to the message routing submodule.
[0055] The message routing submodule is used to forward the target path and command value to the acquisition module;
[0056] The acquisition module is also used to run the fourth protocol process, receive command values and target paths; it is also used to query the fourth protocol point table of the fourth protocol process for the fourth feature data corresponding to the target path; and it is also used to send command values to the second bottom device corresponding to the fourth protocol point table through the first port, based at least on the fourth feature data and the fourth communication protocol corresponding to the fourth protocol process.
[0057] Among them, the third protocol process is the protocol process in the upload module, and the third protocol point table is the protocol point table in the third protocol process; the fourth protocol process is the protocol process in the acquisition module, and the fourth protocol point table is the protocol point table in the fourth protocol process; the third communication protocol is different from the fourth communication protocol.
[0058] This invention provides a communication protocol conversion method and apparatus. The method includes: running a first protocol process to poll data points in a first protocol point table, the first protocol point table including first feature data of the first data points, the first feature data including a collection path; sending a collection command to a first bottom-end device corresponding to the first protocol point table based on the first feature data and a first communication protocol corresponding to the first protocol process; receiving and storing variable values returned by the first bottom-end device in response to the collection command, corresponding to the target path; running a second protocol process to poll data points in a second protocol point table, the second protocol point table including second feature data of the second data points, the second feature data including the target path; and sending variable values corresponding to the target path to a first master control device corresponding to the second protocol point table based on the second feature data and a second communication protocol corresponding to the second protocol process, thereby completing the transmission of data from the bottom-end device using the first communication protocol to the master control device using the second communication protocol. This method, by configuring a point table, achieves communication protocol conversion between bottom-end devices and master control devices using different communication protocols, improving protocol conversion efficiency. Furthermore, configuring the point table in the communication management machine is very simple and easy to implement, effectively improving the applicability of the communication management machine. Attached Figure Description
[0059] To more clearly illustrate the technical solutions in the embodiments of the present 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 only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0060] Figure 1 This is a flowchart illustrating a communication protocol conversion method provided in an embodiment of the present invention.
[0061] Figure 2 A flowchart illustrating another communication protocol conversion method provided in an embodiment of the present invention;
[0062] Figure 3 This is a schematic diagram of a communication protocol conversion device provided in an embodiment of the present invention;
[0063] Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0064] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0065] To facilitate understanding of the technical solution provided by this invention, the terminology of this invention will be explained below.
[0066] Communication management unit: Equipped with multiple downlink communication interfaces and one or more uplink network interfaces, it functions as a front-end unit or monitoring computer. It collects and aggregates communication data from all intelligent monitoring / protection devices within a substation and uploads it in real-time to the upper-level master station system (monitoring center backend unit and Distributed Control System (DCS)) to perform remote signaling and telemetry functions. On the other hand, it receives commands from the backend unit or DCS and forwards them to the intelligent series units within the substation, enabling remote control of the opening and closing of various switchgear or parameter setting of devices, thus achieving remote control and remote adjustment functions. It should also be equipped with multiple serial interfaces to facilitate communication with other intelligent devices within the substation. Communication management units are generally used in substations and dispatch stations. Through the control platform, the communication management unit controls the downlink Remote Terminal Unit (RTU) devices to collect remote signaling and telemetry information, feeding the messages back to the dispatch center. The control center administrator then processes and analyzes the messages to select the commands to execute, achieving the goal of remotely outputting dispatch commands.
[0067] Communication protocol, also known as communication procedure, refers to an agreement between communicating parties regarding the control of data transmission. This agreement includes standardized provisions for data format, synchronization methods, transmission speed, transmission steps, error detection and correction methods, and control character definitions. Both communicating parties must adhere to these provisions; it is also called a link control procedure. Common communication protocols include Modbus, BACnet, and the OPC specification protocol.
[0068] Point table: A term used in the automation control system industry. It describes the usage of various variables within an automation control system. In automation control, data points are simply called points, and the number of variables used in an automation control system is called the point count. Point tables serve as important bases and protocol standards for equipment providers, software providers, and system integrators. The entire construction of an automation control system is based on the descriptions and specifications of variables in the point tables. Typically, each variable has a corresponding unique variable name, device name, device address, register, register address, and other related information.
[0069] Polling is a method by which the CPU decides how to provide services to peripheral devices, also known as "Programmed I / O". The concept of polling is that the CPU periodically sends out queries to each peripheral device in sequence to see if it needs its service. If it does, it provides the service, and after the service is completed, it queries the next peripheral device, and so on, continuously.
[0070] Data point: A data item collected by the bottom-end device. Different data points represent different meanings, such as data points representing voltage or data points representing current. Each data point can have multiple attributes (e.g., name, ID, function code, etc.).
[0071] Bottom-level equipment: Used for monitoring and responding to the control of the main control equipment, such as monitoring voltage and current, and responding to the main control equipment's power-on and power-off commands.
[0072] Main control equipment; used to control the bottom-end equipment based on data monitored by the bottom-end equipment or user operations.
[0073] Telemetry (telemetry information): Remote measurement. Acquiring and transmitting operating parameters, including various electrical quantities (voltage, current, power, etc. on the line) and load flow.
[0074] Remote signaling (remote signaling information): Remote signals. Collects and transmits various protection and switching information.
[0075] Remote control (remote control information): Remote control. Receiving and executing remote control commands, primarily for opening and closing circuit breakers, and remotely controlling some switch control equipment.
[0076] Remote adjustment (remote adjustment information): Remote adjustment. Accepts and executes remote adjustment commands to remotely adjust controlled devices, such as adjusting generator output power.
[0077] The method provided in this embodiment of the invention is applied to a communication management machine. The communication management machine can also be called an internetwork connector or a protocol converter.
[0078] Example 1
[0079] This invention provides a communication protocol conversion method, such as... Figure 1 As shown, the method may include the following steps:
[0080] S110, the first protocol process is run to poll the data points in the first protocol point table.
[0081] The first protocol process is a process that handles the communication needs of at least one bottom device that adopts the first communication protocol. It can send commands to the bottom device, receive data sent by the bottom device, etc. It is configured with a corresponding protocol point table for each bottom device, and the protocol point table includes the first protocol point table corresponding to any one of the bottom devices.
[0082] When the first protocol process is running, the first protocol process polls the data points in the first protocol point table corresponding to each first bottom device.
[0083] The first data point is any data point in the first protocol point table, and each first data point represents a data item monitored by the first bottom-end device.
[0084] The first protocol point table includes the first feature data of the first data point, and the first feature data may include the acquisition path. The acquisition path indicates the source of the variable values acquired by the communication management unit.
[0085] The first characteristic data represents the attribute of the first data point in the first protocol point table, and may include one or more of the following: table ID, variable name, acquisition path, data point type, and data point identifier. When receiving control commands from the master control device, the acquisition path may also be referred to as the target path, which will be explained in detail below.
[0086] In one example, the first protocol point table corresponding to the first bottom device is shown in Table 1.
[0087] Table 1 First Agreement Point Table
[0088]
[0089]
[0090] As shown in Table 1, the first protocol point table includes 6 data points. When the first data point is polled, its first characteristic data includes: table ID is 1, variable name is voltage, acquisition path is P2 / D1 / I1, data point type is telemetry, and data point identifier is 1. This indicates that the data point has a table ID of 1 in the first protocol point table; it acquires voltage data; the acquisition path is P2 / D1 / I1, where P2 represents the identifier of the first protocol process, D1 represents the device ID of the first bottom-end device is 1, and I1 represents the table ID of 1, indicating that the data source of this data point is the point with ID 1 in the first bottom-end device with ID 1 under the process of process number P2; the data point type indicates the behavior pattern of the data, and the data point identifier is used to distinguish the data. The meanings of the characteristic data of other data points in the table are similar.
[0091] S120, based on the first feature data and the first communication protocol corresponding to the first protocol process, a data acquisition command is sent to the first bottom device corresponding to the first protocol point table.
[0092] Based on the first feature data of the first data point and the first communication protocol corresponding to the first protocol process, a data acquisition command conforming to the first communication protocol is generated and then sent to the first bottom-end device corresponding to the first protocol point table. This data acquisition command is used to instruct the first bottom-end device to upload data.
[0093] Then, continue polling other data points in the first protocol point table until all rows in the first protocol point table have been traversed, and then start polling another protocol point table in the first protocol process.
[0094] S130, receive and store the variable values corresponding to the acquisition path returned by the first bottom device in response to the acquisition command.
[0095] The first bottom-end device responds to the acquisition command and returns the variable value corresponding to the acquisition path. The communication management unit receives the variable value and uses the acquisition path as the data identifier of the variable value, and stores the variable value in the database.
[0096] In one example, the acquisition command indicates that the acquisition path of the first bottom device is P2 / D1 / I1. The variable monitored by the point with ID 1 in the first bottom device is voltage, and the first bottom device returns the voltage value to the communication management unit.
[0097] S140, the second protocol process is running to poll the data points in the second protocol point table.
[0098] The second protocol point table includes the second feature data of the second data point, and the second feature data includes the acquisition path.
[0099] The second protocol process is a process that handles the communication needs of at least one master control device that adopts the second communication protocol. It can receive commands sent by the master control device for controlling the bottom device, send data to the master control device, etc. It is configured with a corresponding protocol point table for each master control device, and the protocol point table includes the second protocol point table corresponding to any one of the first master control devices.
[0100] Moreover, the first communication protocol is different from the second communication protocol.
[0101] When the second protocol process is running, the second protocol process polls the data points in the corresponding second protocol point table of each first master control device once.
[0102] The second data point is a data point in the second protocol point table, and each second data point represents a data item controlled by the first master control device.
[0103] The second feature data represents the attribute of the second data point in the second protocol point table, and may include one or more of the following: table ID, variable name, acquisition path, data point type, and data point identifier.
[0104] Second protocol point table of a certain first master control device
[0105] In one embodiment, the second feature data of the second data point may include one or more of the following: table ID, variable name, acquisition path, data point type, and data point identifier.
[0106] In one example, the table of second protocol points corresponding to the first master control device is shown in Table 2.
[0107] Table 2 Second Agreement Points Table
[0108] ID in table variable name Collection path Data point type Data point identifier 1 #1 Voltage P2 / D1 / I1 telemetry 100 2 #2 Voltage P2 / D2 / I1 telemetry 101 3 #3 Power-on status P2 / D3 / I3 remote message 102
[0109] As shown in Table 2, the second protocol point table includes three data points. When the first data point is polled, its second characteristic data includes: table ID 1, variable name #1 voltage, acquisition path P2 / D1 / I1, data point type telemetry, and data point identifier 100. This indicates that the data point has a table ID of 1 in the first protocol point table; voltage data is extracted; the acquisition path is P2 / D1 / I1, where P2 represents the process number of the first protocol process, D1 represents the device ID of the first bottom-end device (ID 1), and I1 represents the table ID 1, indicating that the data source of this data point is the point with ID 1 in the first bottom-end device with ID 1 under the process of process number P2; the data point type indicates the behavior pattern of the data, and the data point identifier is used to distinguish the data. The meanings of the characteristic data of other data points in the table are similar.
[0110] S150, based on the second feature data and the second communication protocol corresponding to the second protocol process, sends the variable values corresponding to the acquisition path to the first master control device corresponding to the second protocol point table.
[0111] Based on the acquisition path in the second feature data of the second data point, the variable value of the acquisition path identifier of the second data point is extracted from the database. A data frame conforming to the second communication protocol is generated based on the second communication protocol, the second feature data, and the variable value. The data frame includes the variable value. Then, the data frame is sent to the first master control device corresponding to the second protocol point table. After receiving the data frame, the first master control device completes the upload of the data from the first bottom-end device using the first communication protocol to the second master control device using the second communication protocol.
[0112] Then, continue polling the second protocol point table. If the upload path of a row that is polled is "NULL", skip that row.
[0113] The communication protocol conversion method provided in this embodiment of the invention uploads data from the bottom device to the master control device that uses a different communication protocol than the bottom device by configuring a point table. This realizes the communication protocol conversion between devices, which can improve the protocol conversion efficiency. Moreover, configuring the point table in the communication management machine is very simple and easy to implement, which can effectively improve the applicability of the communication management machine.
[0114] Example 2
[0115] In some embodiments, the first feature data further includes a first data point type and a first data point identifier, and the acquisition path includes a first bottom-end device ID of the first bottom-end device. Step S120: Based on the first feature data and the first communication protocol corresponding to the first protocol process, a acquisition command is sent to the first bottom-end device corresponding to the first protocol point table, which may include the following steps:
[0116] S121, if the first data point type belongs to the first target data point type, then extract the first data point identifier and the first bottom device ID of the first data point from the first protocol point table.
[0117] The first target data point types include telemetry and remote signaling.
[0118] Determine whether the first data point type is telemetry or tele-signaling. If it is telemetry or tele-signaling, extract the first data point identifier and the first bottom device ID from the first protocol point table.
[0119] In one example, the first protocol point table is shown in Table 1. The first data point is the second data point in the point table. The data type of this data point is telemetry. Then, the first data point identifier of the first data point extracted from the first protocol point table is 2, and the first bottom device ID is 1.
[0120] S122, query the topology table of the first protocol process for the port ID and the communication address of the first bottom device corresponding to the first bottom device ID.
[0121] The first protocol process contains a topology table, which describes the correspondence between the first protocol process and the tables of ports, devices, and points. Querying the topology table of the first protocol process yields the port ID and communication address of the first bottom-end device corresponding to its ID.
[0122] The communication management unit is equipped with at least one port, through which the first protocol process communicates with the bottom device.
[0123] In one example, the topology table for the first protocol process is shown in Table 3.
[0124] Table 3 Topology of the First Protocol Process
[0125]
[0126] The correspondence between the first bottom-end device ID, port ID, and communication address of the first bottom-end device is shown in Table 3. The first communication protocol is Protocol Q. The communication management unit communicates with the first bottom-end devices named Device 1 and Device 2 through port ID 1 in the topology table, and with the first bottom-end device named Device 3 through port ID 2.
[0127] S123, based on the first communication protocol, uses the port ID, the first bottom device communication address and the first data point identifier to generate a data acquisition command.
[0128] Based on the first communication protocol, the port ID, the first bottom device communication address, and the first data point identifier are combined to generate a data acquisition command that conforms to the first communication protocol.
[0129] S124, send a data acquisition command to the first bottom device.
[0130] The acquisition command is sent to the first bottom-end device through the port indicated by the port ID.
[0131] The method provided in this embodiment of the invention generates a collection command that conforms to the first communication protocol by configuring a first protocol point table on the communication management machine and generating the first feature data of the first data point based on the first communication protocol. This allows communication with the first bottom-end device using the first communication protocol to complete the issuance of the collection command. This improves protocol conversion efficiency, is easy to implement, and effectively enhances the applicability of the communication management machine.
[0132] Example 3
[0133] In some embodiments, step S130: receiving and storing the variable value corresponding to the acquisition path returned by the first bottom device in response to the acquisition command may include the following steps:
[0134] S131, Receive data returned by the first bottom device in response to the acquisition command.
[0135] The first bottom-end device responds to the acquisition command and returns data to the communication management unit, which then receives the data.
[0136] S132, parse the data to obtain the first data point type, port ID, first bottom device ID, and the first data point identifier and variable value of the first data point.
[0137] The first protocol process of the communication management machine parses the data returned by the first bottom device to the communication management machine, and obtains the first data point type, port ID, first bottom device ID, and the first data point identifier and variable value of the first data point.
[0138] S133, query the identifier of the first protocol point table corresponding to the port ID and the first bottom device ID in the topology table of the first protocol process.
[0139] By searching the topology table of the first protocol process, the identifiers of the first protocol point table corresponding to the aforementioned port ID and first bottom device ID are matched.
[0140] In one example, the topology table of the first protocol process is shown in Table 3. If the port ID is 1 and the first bottom device ID is 1, then the corresponding identifier of the first protocol point table is the protocol Q device 1 point table.
[0141] S134, if the first data point type belongs to the first target data point type, determine the acquisition path corresponding to the first data point type and the first data point identifier in the first protocol point table.
[0142] The first target data point types include telemetry and remote signaling.
[0143] Determine whether the first data point type is telemetry or teleindication. If it is telemetry or teleindication, query the first protocol point table for the corresponding acquisition path that matches the first data point type and the first data point identifier.
[0144] In one example, the first data point type is telemetry, the first data point identifier is 1, and the identifier of the first protocol point table is Protocol Q Device 1 Point Table, as shown in Table 1. From Table 1, the acquisition path corresponding to the first data point type and the first data point identifier being 1 is P2 / D1 / I1.
[0145] S134, stores variable values based on the acquisition path.
[0146] The data identifier, which is used as a variable value, is stored in the database.
[0147] In one embodiment, the collection path and variable value are stored in the database as key name and key value, respectively.
[0148] In one embodiment, the database is a non-relational database used to store remote signaling and telemetry.
[0149] In one example, the database used to store telemetry data is shown in Table 4.
[0150] Table 4 Database
[0151]
[0152]
[0153] The method provided in this embodiment of the invention uses the acquisition path as the identifier of the variable value and stores the variable value in a non-relational database. It is fast, and the non-relational database is easy to expand, good at handling multiple processes and multiple concurrency, and has very high stability.
[0154] Example 4
[0155] In some embodiments, the second feature data further includes the second data point type, the second data point identifier, and the upload path of the second data point, wherein the upload path includes the first master control device ID of the first master control device. Step S150: Based on the second feature data and the second communication protocol corresponding to the second protocol process, send the variable value corresponding to the acquisition path to the first master control device corresponding to the second protocol point table, which may include the following steps:
[0156] S151, if the second data point type belongs to the first target data point type, then extract the second data point identifier and the first master control device ID of the second data point.
[0157] The primary target data point types include telemetry and telecontrol. The upload path indicates the location to which the communication management unit sends the variable values.
[0158] Determine whether the second data point type is telemetry or telesignaling. If it is telemetry or telesignaling, extract the second data point identifier from the second protocol point table and extract the first master control device ID from the upload path.
[0159] In one example, the table of second protocol points corresponding to the first master control device is shown in Table 5.
[0160] Table 5 Second Agreement Points Table
[0161]
[0162] When polling the first row of data points in Table 5, if the data point type is telemetry, then extract the second data point identifier of the second data point: 100, and extract the first master control device ID: 1 from the upload path P1 / D1 / I1.
[0163] S152, extract the variable values corresponding to the acquisition path.
[0164] Extract variable values from the database that are identified by the acquisition path of the second data point.
[0165] In one example, if the second data point is the first data point in Table 5, then the variable value identified by the collection path P2 / D1 / I1 is extracted.
[0166] S153, query the topology table of the second protocol process for the first port ID and the first master control device communication address corresponding to the first master control device ID.
[0167] The second protocol process contains a topology table, which describes the correspondence between the second protocol process and the tables of ports, devices, and points. Querying the topology table of the second protocol process yields the first port ID and the first master control device communication address corresponding to the first master control device ID.
[0168] The communication management unit is equipped with at least one port, through which the second protocol process communicates with the bottom device.
[0169] In one example, the topology table for the second protocol process is shown in Table 6.
[0170] Table 6 Topology of the Second Protocol Process
[0171]
[0172] The correspondence between the first master control device ID, port ID, and communication address is shown in the first row of data points in Table 6. The second communication protocol is Protocol A, and the communication management unit communicates with the first master control device named Device 1 through the port with port ID 1 in the topology table.
[0173] S154, based on the second communication protocol, sends variable values to the first master control device according to the second data point identifier, the first port ID, and the first master control device communication address.
[0174] Based on the second communication protocol, the first port ID, the second data point identifier, the first port ID, the first master control device communication address, and the variable value are combined to obtain a data frame, and the data frame is sent to the first master control device communication address of the first master control device through the port represented by the first port ID.
[0175] The method provided in this embodiment of the invention generates a data frame that conforms to the second communication protocol by configuring a second protocol point table on the communication management machine and generating the second feature data of the second communication protocol and the second data point. The data frame can then be sent to the first bottom-end device using the first communication protocol to complete the data upload. This method can improve the protocol conversion efficiency, is easy to implement, and effectively improve the applicability of the communication management machine.
[0176] Example 5
[0177] In some embodiments, such as Figure 2 As shown, the method provided in this embodiment of the invention may further include the following steps:
[0178] S160 runs the third protocol process, and based on the corresponding third communication protocol of the third protocol process, receives and parses the control commands of the second master control device to obtain the command value and the third characteristic data of the third data point.
[0179] The third protocol process is a protocol process that handles the communication needs of the master control device that uses the third communication protocol. It can receive control commands from the master control device, etc. It contains a protocol point table for each master control device, and the protocol point table includes the third protocol point table for any second master control device.
[0180] The third protocol process can be the same as or different from the second communication protocol.
[0181] The third protocol process is run. After receiving the control command from the second master control device, the third protocol process parses the control command based on the corresponding third communication protocol to obtain the command value and the third feature data of the third data point.
[0182] The third feature data represents the attributes of the third data point in the third protocol point table, and may include one or more of the following: table ID, variable name, acquisition path, upload path, target path, data point type, and data point identifier.
[0183] S170, query the third protocol point table of the third protocol process for the target path corresponding to the third feature data.
[0184] The target path is the control target of the second master control device.
[0185] In one example, the target path corresponding to the third feature data is P2 / D1 / I4, which means that the control target of the second master control device is the bottom device with device ID 1 corresponding to protocol process P2, and the variable represented by the data point with ID 4 in the corresponding protocol point table.
[0186] S180 runs the fourth protocol process, receiving command values and target paths sent by the third protocol process.
[0187] The fourth protocol process is a protocol process that handles the communication needs of the master control device that uses the fourth communication protocol. It can receive command values and target paths sent by the third protocol process, and send control commands to the bottom devices that use the fourth communication protocol. It is configured with a corresponding protocol point table for each bottom device, and the protocol point table includes the fourth protocol point table corresponding to any second bottom device.
[0188] The fourth communication protocol process differs from the third communication protocol. When the third communication protocol differs from the first communication protocol, the fourth communication protocol can be the same as the first communication protocol.
[0189] The fourth protocol process is running, and it receives command values from the target path and the second master control device.
[0190] S190, query the fourth protocol point table of the fourth protocol process for the fourth feature data corresponding to the target path.
[0191] The fourth protocol point table includes the correspondence between the target path and the fourth feature data. By querying the fourth protocol point table, the fourth feature data corresponding to the target path can be obtained.
[0192] The fourth feature data represents the attributes of the fourth data point in the fourth protocol point table, and may include one or more of the following: table ID, variable name, acquisition path / target path, data point type, and data point identifier.
[0193] S200, at least according to the fourth feature data and the fourth communication protocol corresponding to the fourth protocol process, sends a command value to the second bottom device corresponding to the fourth protocol point table.
[0194] The fourth feature data and command value are combined based on the fourth communication protocol to generate a data frame that conforms to the fourth communication protocol. The data includes the command value, and the data frame is sent to the second bottom device.
[0195] The communication protocol conversion method provided in this embodiment of the invention sends commands from the master control device to the bottom device that uses a different communication protocol than the master control device through communication management and configuration point table, thereby realizing communication protocol conversion, improving protocol conversion efficiency, and the configuration point table in the communication management machine is very simple and easy to implement, which can effectively improve the applicability of the communication management machine.
[0196] Example 6
[0197] In some embodiments, the third characteristic data may include the second master device ID, the second port ID, the third data point type, and the third data point identifier. Step S170: Querying the third protocol point table of the third protocol process for the target path corresponding to the third characteristic data may include the following steps:
[0198] S171, query the topology table of the third protocol process, and find the identifier of the third protocol point table corresponding to the second master control device ID and the second port ID.
[0199] The third protocol process contains a topology table, which describes the correspondence between the third protocol process and ports, devices, and point tables. Querying the third protocol process's topology table yields the identifiers of the third protocol point tables corresponding to the second master control device ID and the second port ID.
[0200] In one example, the third communication protocol is the same as the second communication protocol, and the first master control device is the same as the second master control device. The topology table of the third protocol process is shown in Table 6. The correspondence between the second master control device ID and the second port ID and the identifiers in the third protocol point table is shown in the first row of data points in Table 6. The third communication protocol is Protocol A, and the communication management machine communicates with the second master control device named Device 1 through the port with port ID 1 in the topology table.
[0201] S172, If the third data point type belongs to the second target data point type, extract the target path corresponding to the third data point type and the third data point identifier in the third protocol point table represented by the identifier of the third protocol point table.
[0202] The second target data point type includes remote adjustment and remote control. The third protocol point table includes the correspondence between the third data point type, the third data point identifier, and the target path.
[0203] Determine whether the second data point type is telemetry or teleindication. If it is telemetry or teleindication, extract the target path corresponding to the third data point type and the third data point identifier from the third protocol point table.
[0204] In one example, the third communication protocol is the same as the second communication protocol, and the first master control device is the same as the second master control device. The third protocol point table is shown in Table 7.
[0205] Table 7 Third Agreement Point Table
[0206]
[0207] If the third data point type is remote adjustment and the third data point identifier is 103, then the corresponding target path is P2 / D1 / I4, indicating that the control target of the second master control device is the bottom device with device ID 1 corresponding to the protocol process identified as P2, and the given voltage represented by the data point with ID 4 in the corresponding protocol point table.
[0208] The method provided in this embodiment of the invention configures a protocol point table and a topology table on the communication management machine, searches the protocol point table and topology table of the corresponding third protocol process of the third communication protocol, and obtains the target path, thus providing a target for issuing control commands.
[0209] Example 7
[0210] In some embodiments, in the protocol point table corresponding to the bottom device, the acquisition path can also be referred to as the target path, and the target path includes the second bottom device ID and the ID in the table. Step S190: Querying the fourth protocol point table of the fourth protocol process for the fourth feature data corresponding to the target path may include the following steps:
[0211] S191, extract the second bottom device ID and the ID in the table from the target path.
[0212] S192, query the topology table of the fourth protocol process for the third port ID, the communication address of the second bottom device, and the identifier of the fourth protocol point table corresponding to the second bottom device ID.
[0213] The fourth protocol process contains a topology table, which describes the correspondence between the fourth protocol process and ports, devices, and point tables. Querying the fourth protocol process's topology table yields the third port ID corresponding to the second bottom-end device ID, the communication address of the second bottom-end device, and the identifier of the fourth protocol point table.
[0214] In one example, the fourth protocol process is the same as the first protocol process. The topology table of the fourth protocol process is shown in Table 3. If the second bottom device ID of the target path is 1, then the corresponding third port ID is 1, the second bottom device communication address is 3000, and the identifier of the fourth protocol point table is Protocol Q Device 1 point table.
[0215] S193, query the fourth feature data corresponding to the ID in the fourth protocol point table represented by the identifier of the fourth protocol point table.
[0216] The fourth protocol point table includes the correspondence between the IDs in the table and the fourth feature data.
[0217] In one embodiment, the fourth feature data may include the fourth data point type and the fourth data point identifier.
[0218] In one example, the fourth communication protocol is the same as the first communication protocol. The identifier of the fourth protocol point table is shown in Table 1. If the ID in the table is 4, then the corresponding fourth data point type is remote adjustment and the fourth data point identifier is 4.
[0219] The method provided in this embodiment of the invention configures a protocol point table and a topology table in the communication management machine, searches the protocol point table and topology table of the fourth protocol process corresponding to the fourth communication protocol, and obtains the fourth feature data, providing the necessary data for the issuance of control commands.
[0220] Example 8
[0221] In some embodiments, the fourth feature data includes the fourth data point type and the fourth data point identifier. Step S200: Sending a command value to the second bottom-end device corresponding to the fourth protocol point table, at least according to the second feature data and the fourth communication protocol corresponding to the fourth protocol process, may include the following steps:
[0222] S201, according to the fourth communication protocol corresponding to the fourth protocol process, generate the target control command by combining the fourth data point type, the fourth data point identifier, the third port ID, the second bottom device communication address and the command value.
[0223] Based on the fourth communication protocol, the fourth data point type, the fourth data point identifier, the third port ID, the second bottom device communication address, and the command value are combined to obtain the target control command.
[0224] S202, send the target control command to the second bottom device corresponding to the fourth protocol point table.
[0225] The target control command is sent to the second bottom device through the port represented by the third port ID.
[0226] The method provided in this embodiment of the invention obtains the target control command by combining the fourth data point type, the fourth data point identifier, the third port ID, the second bottom device communication address, and the command value, and sends the target control command to the second bottom device to complete the issuance of the control command, thereby improving the protocol conversion efficiency.
[0227] Example 9
[0228] Accordingly, embodiments of the present invention also provide a communication protocol conversion device, which can be applied to a communication management machine. For example... Figure 3 As shown, the communication protocol conversion device 300 includes a data acquisition module 310, a database module 320, and an upload module 330. The data acquisition module 310 includes at least one protocol process corresponding to a communication protocol, and a port corresponding to each protocol process. Each protocol process in the data acquisition module 310 includes at least one protocol point table corresponding to a bottom-end device and a point table processing submodule corresponding to each protocol point table. The database module 320 includes at least one database submodule 321. The upload module 330 includes at least one protocol process corresponding to a communication protocol, and a port corresponding to each protocol process. Each protocol process in the upload module includes at least one protocol point table corresponding to a master control device and a point table processing submodule corresponding to each protocol point table. Wherein:
[0229] The acquisition module is used to poll the data points in the first protocol point table, which is a point table processing submodule running the first protocol process. The first protocol point table includes first feature data of the first data points, and the first feature data includes the acquisition path. It is also used to send acquisition commands to the first bottom-end device corresponding to the first protocol point table through the corresponding port of the first protocol process, based on the first feature data and the first communication protocol corresponding to the first protocol process. Furthermore, it is used to receive variable values corresponding to the acquisition path returned by the first bottom-end device in response to the acquisition command through the corresponding port of the first protocol process. Finally, it is used to send variable values to the database submodule.
[0230] Wherein, the first protocol process is any protocol process in the acquisition module 310, and the first protocol point table is any protocol point table in the first protocol process.
[0231] The database submodule is used to receive and store variable values;
[0232] The upload module is used to run the point table processing submodule of the second protocol process to poll the data points in the second protocol point table. The second protocol point table includes the second feature data of the second data points, and the second feature data includes the acquisition path. It is also used to send variable values corresponding to the acquisition path to the first master control device corresponding to the second protocol point table through the corresponding port of the second protocol process based on the second feature data and the second communication protocol corresponding to the second protocol process.
[0233] Among them, the second protocol process is the protocol process in the upload module, and the second protocol point table is the protocol point table of the second protocol process; the first communication protocol is different from the second communication protocol.
[0234] The device provided in this embodiment of the invention uploads data from the bottom device to the master control device that uses a different communication protocol than the bottom device by configuring a point table. This achieves communication protocol conversion, improves protocol conversion efficiency, and the configuration of the point table in the communication management machine is very simple and easy to implement, which can effectively improve the applicability of the communication management machine.
[0235] Example 10
[0236] In one embodiment, the first feature data further includes a first data point type and a first data point identifier, and the acquisition path includes the first bottom device ID of the first bottom device. The acquisition module 310 can be specifically used for:
[0237] If the first data point type belongs to the first target data point type, then extract the first data point identifier and the first bottom device ID of the first data point from the first protocol point table;
[0238] Query the topology table of the first protocol process to find the port ID and communication address of the first bottom device corresponding to the first bottom device ID;
[0239] Based on the first communication protocol, a data acquisition command is generated using the port ID, the communication address of the first bottom-end device, and the identifier of the first data point.
[0240] The acquisition command is sent to the first bottom-end device through the port indicated by the port ID.
[0241] The device provided in this embodiment of the invention is configured with a first protocol point table corresponding to a first bottom device. Based on the first communication protocol and the first feature data of the first data point, it generates a collection command that conforms to the provisions of the first communication protocol. It can then communicate with the first bottom device using the first communication protocol to complete the issuance of the collection command. This can improve the protocol conversion efficiency, facilitate implementation, and effectively improve the applicability of the communication management machine.
[0242] Example 11
[0243] In one embodiment, the acquisition module 310 can also be specifically used for:
[0244] The system receives data returned by the first bottom-end device in response to the acquisition command through the corresponding port of the first communication protocol.
[0245] The database submodule sends data.
[0246] Database submodule 321 can be specifically used for:
[0247] Receive and parse the data to obtain the first data point type, port ID, first bottom device ID, and the first data point identifier and variable value of the first data point;
[0248] Query the identifier of the first protocol point table corresponding to the port ID and the first bottom device ID in the topology table of the first protocol process;
[0249] If the first data point type belongs to the first target data point type, determine the acquisition path corresponding to the first data point type and the first data point identifier in the first protocol point table; the first target data point type includes telemetry and remote signaling.
[0250] Variable values are stored based on the acquisition path.
[0251] In one embodiment, the collection path and variable value are stored in the database as key name and key value, respectively.
[0252] In one embodiment, the database is a non-relational database.
[0253] The device provided in this embodiment of the invention uses the acquisition path as the identifier of the variable value and stores the variable value in a non-relational database. It is fast, and the non-relational database is easy to expand, good at handling multiple processes and multiple concurrency, and has very high stability.
[0254] Example 12
[0255] In one embodiment, the second feature data further includes the second data point type, the second data point identifier, and the upload path, wherein the upload path includes the first master control device ID of the first master control device. The upload module 330 can also be specifically used for:
[0256] If the second data point type belongs to the first target data point type, then extract the second data point identifier and the first master control device ID of the second data point; wherein, the first target data point type includes telemetry and remote signaling;
[0257] Extract the variable values corresponding to the acquisition path from database submodule 321;
[0258] Query the topology table of the second protocol process to find the first port ID and the first master control device communication address corresponding to the first master control device ID;
[0259] Based on the second communication protocol, variable values are sent to the first master control device through the port indicated by the first port ID, according to the second data point identifier, the first port ID, and the communication address of the first master control device.
[0260] The device provided in this embodiment of the invention is configured with a second protocol point table corresponding to the first master control device and a topology table of the second protocol process. Based on the second communication protocol and the second feature data of the second data point, a data frame conforming to the second communication protocol is generated. The data frame can then be sent to the first bottom device using the first communication protocol to complete the data upload. This can improve the protocol conversion efficiency, facilitate implementation, and effectively improve the applicability of the communication management machine.
[0261] Example 13
[0262] In some embodiments, the database module 320 may further include a message routing submodule 322.
[0263] The upload module 330 is also used to run the third protocol process, receive control commands from the second master control device through the second port based on the third communication protocol corresponding to the third protocol process; it is also used to parse the control commands to obtain command values and third feature data of the third data points; it is also used to query the third protocol point table of the third protocol process for the target path corresponding to the third feature data; and it is also used to send the target path and command values to the message routing submodule.
[0264] Among them, the third protocol process is the protocol process in the upload module, and the third protocol point table is the protocol point table of the third protocol process.
[0265] The message routing submodule 322 is used to forward the target path and command value to the acquisition module;
[0266] The acquisition module 310 is also used to run the fourth protocol process, receive command values and target paths; it is also used to query the fourth protocol point table of the fourth protocol process for the fourth feature data corresponding to the target path; it is also used to send command values to the second bottom device corresponding to the fourth protocol point table through the first port, based at least on the fourth feature data and the fourth communication protocol corresponding to the fourth protocol process.
[0267] Among them, the fourth protocol process is the protocol process in the acquisition module, and the fourth protocol point table is the protocol point table in the fourth protocol process; the third communication protocol is different from the fourth communication protocol.
[0268] The device provided in this embodiment of the invention, by configuring point tables for the bottom device and the main control device, can send commands from the main control device to the bottom device that uses a different communication protocol than the main control device, thereby improving the protocol conversion efficiency. Moreover, configuring point tables in the communication management machine is very simple and easy to implement, which can effectively improve the applicability of the communication management machine.
[0269] Example 14
[0270] In some embodiments, the third feature data may include the second master control device ID, the second port ID, the third data point type, and the third data point identifier. The upload module 330 may be specifically used for:
[0271] Query the topology table of the third protocol process to find the identifier of the third protocol point table corresponding to the second master control device ID and the second port ID;
[0272] If the third data point type belongs to the second target data point type, extract the acquisition path corresponding to the third data point type and the third data point identifier in the third protocol point table represented by the identifier of the third protocol point table; wherein, the second target data point type includes remote adjustment and remote control;
[0273] The device provided in this embodiment of the invention is equipped with a protocol point table and a topology table. By searching the protocol point table and topology table of the corresponding third protocol process of the third communication protocol, the acquisition path can be obtained, providing a target for issuing control commands.
[0274] Example 15
[0275] In some embodiments, the acquisition path in the corresponding protocol point table of the bottom device can also be referred to as the target path, which includes the second bottom device ID and the ID in the table. The acquisition module 310 can also be specifically used for:
[0276] Extract the second bottom device ID and the ID in the table from the target path;
[0277] Query the topology table of the fourth protocol process to find the third port ID, the communication address of the second bottom device, and the identifier of the fourth protocol point table corresponding to the second bottom device ID;
[0278] Query the fourth feature data corresponding to the ID in the fourth protocol point table, as indicated by the identifier in the fourth protocol point table.
[0279] The device provided in this embodiment of the invention is configured with a protocol point table and a topology table. It searches the protocol point table and topology table of the fourth protocol process corresponding to the fourth communication protocol to obtain the fourth feature data, providing the necessary data for issuing control commands.
[0280] Example 16
[0281] In some embodiments, the fourth feature data includes the fourth data point type and the fourth data point identifier. The acquisition module 310 can also be specifically used for:
[0282] According to the fourth communication protocol corresponding to the fourth protocol process, the target control command is generated by combining the fourth data point type, the fourth data point identifier, the third port ID, the second bottom device communication address and the command value.
[0283] The target control command is sent to the second bottom device corresponding to the fourth protocol point table through the port represented by the third port ID.
[0284] The device provided in this embodiment of the invention obtains a target control command by combining the fourth data point type, the fourth data point identifier, the third port ID, the second bottom device communication address, and the command value, and sends the target control command to the second bottom device to complete the issuance of the control command, thereby improving the protocol conversion efficiency.
[0285] The communication protocol conversion device provided in this embodiment of the invention belongs to the same concept as the communication protocol conversion method provided in the above embodiments of this application. It can execute the communication protocol conversion method provided in any of the above embodiments of this application and has the corresponding functional modules and beneficial effects for executing the communication protocol conversion method. Technical details not described in detail in this embodiment can be found in the specific processing content of the communication protocol conversion method provided in the above embodiments of this application, and will not be repeated here.
[0286] Exemplary electronic devices
[0287] Another embodiment of this application also provides an electronic device, see [link to relevant documentation] Figure 4 As shown, the device includes:
[0288] Memory 400 and processor 410;
[0289] The memory 400 is connected to the processor 410 and is used to store programs;
[0290] The processor 410 is configured to implement the communication protocol conversion method disclosed in any of the above embodiments by running the program stored in the memory 400.
[0291] Specifically, the aforementioned electronic device may also include: a bus, a communication interface 420, an input device 430, and an output device 440.
[0292] The processor 410, memory 400, communication interface 420, input device 430, and output device 440 are interconnected via a bus. Among them:
[0293] A bus can include a pathway for transmitting information between various components of a computer system.
[0294] The processor 410 can be a general-purpose processor, such as a general-purpose central processing unit (CPU), a microprocessor, etc., or an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present invention. It can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0295] Processor 410 may include a main processor, as well as a baseband chip, modem, etc.
[0296] The memory 400 stores a program that executes the technical solution of this invention, and may also store an operating system and other key business functions. Specifically, the program may include program code, which includes computer operation instructions. More specifically, the memory 400 may include read-only memory (ROM), other types of static storage devices capable of storing static information and instructions, random access memory (RAM), other types of dynamic storage devices capable of storing information and instructions, disk storage, flash memory, etc.
[0297] Input device 430 may include means for receiving data and information input by the user.
[0298] Output device 440 may include devices that allow information to be output to a user, such as a display screen, printer, speaker, etc.
[0299] The communication interface 420 may include a device that uses any transceiver to communicate with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Network (WLAN), etc.
[0300] The processor 410 executes the program stored in the memory 400 and calls other devices, which can be used to implement the various steps of any of the communication protocol conversion methods provided in the above embodiments of this application.
[0301] Exemplary computer program products and storage media
[0302] In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the communication protocol conversion methods according to various embodiments of this application as described in the "Exemplary Methods" section of this specification.
[0303] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0304] Furthermore, embodiments of this application may also be storage media storing a computer program, which is executed by a processor in the communication protocol conversion methods according to various embodiments of this application described in the "Exemplary Methods" section above.
[0305] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0306] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0307] The steps in the methods of the various embodiments of this application can be adjusted, merged, or deleted in order according to actual needs, and the technical features described in each embodiment can be replaced or combined.
[0308] The modules and sub-modules in the various embodiments of the present application's devices and terminals can be merged, divided, and deleted according to actual needs.
[0309] It should be understood that the disclosed terminals, devices, and methods can be implemented in other ways, given the several embodiments provided in this application. For example, the terminal embodiments described above are merely illustrative. For instance, the division of modules or sub-modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple sub-modules or modules may be combined or integrated into another module, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or modules, and may be electrical, mechanical, or other forms.
[0310] The modules or submodules described as separate components may or may not be physically separate. The components that constitute a module or submodule may or may not be physical modules or submodules; that is, they may be located in one place or distributed across multiple network modules or submodules. Some or all of the modules or submodules can be selected to achieve the purpose of this embodiment's solution, depending on actual needs.
[0311] Furthermore, the functional modules or sub-modules in the various embodiments of this application can be integrated into one processing module, or each module or sub-module can exist physically separately, or two or more modules or sub-modules can be integrated into one module. The integrated modules or sub-modules described above can be implemented in hardware or in the form of software functional modules or sub-modules.
[0312] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0313] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software unit executed by a processor, or a combination of both. The software unit can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0314] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0315] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A communication protocol conversion method, characterized in that, The method includes: The first protocol process polls the data points in the first protocol point table, which includes the first feature data of the first data point and the first feature data includes the acquisition path. Based on the first feature data and the first communication protocol corresponding to the first protocol process, a collection command is sent to the first bottom device corresponding to the first protocol point table. Receive and store the variable values corresponding to the acquisition path returned by the first bottom device in response to the acquisition command; The second protocol process polls the data points in the second protocol point table, which includes the second feature data of the second data points and the second feature data includes the acquisition path. Based on the second feature data and the second communication protocol corresponding to the second protocol process, send variable values corresponding to the acquisition path to the first master control device corresponding to the second protocol point table; The first communication protocol is different from the second communication protocol.
2. The method according to claim 1, characterized in that, The first feature data further includes a first data point type and a first data point identifier for the first data point, and the acquisition path includes a first bottom-end device identifier ID for the first bottom-end device; the step of sending an acquisition command to the first bottom-end device corresponding to the first protocol point table based on the first feature data and the first communication protocol corresponding to the first protocol process includes: If the first data point type belongs to the first target data point type, then extract the first data point identifier and the first bottom device ID of the first data point from the first protocol point table; Query the topology table of the first protocol process to find the port ID and communication address of the first bottom device corresponding to the first bottom device ID; Based on the first communication protocol, the acquisition command is generated using the port ID, the first bottom device communication address, and the first data point identifier. Send the acquisition command to the first bottom device.
3. The method according to claim 1, characterized in that, The step of receiving and storing the variable values corresponding to the acquisition path returned by the first bottom-end device in response to the acquisition command includes: Receive data returned by the first bottom-end device in response to the acquisition command; Parse the data to obtain the first data point type, port ID, and first bottom device ID, as well as the first data point identifier and variable value of the first data point; Query the topology table of the first protocol process to find the identifier of the first protocol point table corresponding to the port ID and the first bottom device ID; If the first data point type belongs to the first target data point type, determine the acquisition path corresponding to the first data point type and the first data point identifier in the first protocol point table corresponding to the identifier of the first protocol point table; The variable values are stored based on the acquisition path.
4. The method according to claim 3, characterized in that, The storage of the variable values based on the acquisition path includes: The acquisition path and the variable value are stored in the database as key name and key value, respectively.
5. The method according to claim 4, characterized in that, The database in question is a non-relational database.
6. The method according to claim 1, characterized in that, The second feature data also includes the second data point type, the second data point identifier, and the upload path of the second data point, wherein the upload path includes the first master control device ID of the first master control device; the step of sending variable values corresponding to the acquisition path to the first master control device corresponding to the second protocol point table based on the second feature data and the second communication protocol corresponding to the second protocol process includes: If the second data point type belongs to the first target data point type, then extract the second data point identifier and the first master control device ID of the second data point; Extract the variable values corresponding to the acquisition path; Query the topology table of the second protocol process to find the first port ID and the first master control device communication address corresponding to the first master control device ID; Based on the second communication protocol, the variable value is sent to the first master control device according to the second data point identifier, the first port ID, and the first master control device communication address.
7. The method according to claim 1, characterized in that, The method further includes: Run the third protocol process, and based on the third communication protocol corresponding to the third protocol process, receive and parse the control commands of the second master control device to obtain the command value and the third feature data of the third data point; Query the third protocol point table of the third protocol process to find the target path corresponding to the third feature data; Run the fourth protocol process to receive the command value and the target path sent by the third protocol process; Query the fourth protocol point table of the fourth protocol process to find the fourth feature data corresponding to the target path; At least according to the fourth feature data and the fourth communication protocol corresponding to the fourth protocol process, the command value is sent to the second bottom device corresponding to the fourth protocol point table; The third communication protocol is different from the fourth communication protocol.
8. The method according to claim 7, characterized in that, The third feature data includes the second master control device ID, the second port ID, the third data point type, and the third data point identifier; The query of the target path corresponding to the third feature data in the third protocol point table of the third protocol process includes: Query the topology table of the third protocol process to find the identifier of the third protocol point table corresponding to the second master control device ID and the second port ID; If the third data point type belongs to the second target data point type, extract the target path in the third protocol point table that corresponds to the third data point type and the third data point identifier, represented by the identifier in the third protocol point table.
9. The method according to claim 7, characterized in that, The target path includes the second bottom-end device ID and the ID in the table; the fourth feature data corresponding to the target path in the fourth protocol point table of the fourth protocol process includes: Extract the second bottom device ID and the ID in the table from the target path; Query the topology table of the fourth protocol process to find the third port ID, the communication address of the second bottom device, and the identifier of the fourth protocol point table corresponding to the second bottom device ID; Query the fourth feature data corresponding to the ID in the fourth protocol point table, which is represented by the identifier in the fourth protocol point table.
10. The method according to claim 9, characterized in that, The fourth feature data includes the fourth data point type and the fourth data point identifier; sending the command value to the second bottom device corresponding to the fourth protocol point table, at least according to the second feature data and the fourth communication protocol corresponding to the fourth protocol process, includes: According to the fourth communication protocol corresponding to the fourth protocol process, a target control command is generated by combining the fourth data point type, the fourth data point identifier, the third port ID, the second bottom device communication address, and the command value. The target control command is sent to the second bottom device corresponding to the fourth protocol point table.
11. A communication protocol conversion device, characterized in that, The communication protocol conversion device includes a data acquisition module, a database module, and an upload module. The data acquisition module includes at least one protocol process corresponding to a communication protocol, and a port corresponding to each protocol process. Each protocol process in the data acquisition module includes at least one protocol point table corresponding to a bottom-end device and a point table processing submodule corresponding to each protocol point table. The database module includes at least one database submodule. The upload module includes at least one protocol process corresponding to a communication protocol, and a port corresponding to each protocol process. Each protocol process in the upload module includes at least one protocol point table corresponding to a master control device and a point table processing submodule corresponding to each protocol point table. The acquisition module is configured to: run a point table processing submodule of a first protocol process to poll data points in a first protocol point table, wherein the first protocol point table includes first feature data of the first data points, and the first feature data includes an acquisition path; and send an acquisition command to a first bottom-end device corresponding to the first protocol point table through a port of the first protocol process based on the first feature data and a first communication protocol corresponding to the first protocol process; receive variable values corresponding to the acquisition path returned by the first bottom-end device in response to the acquisition command through a port of the first protocol process; and send the variable values to a database submodule. The database submodule is used to receive and store the variable values; The upload module is used to run the point table processing submodule of the second protocol process to poll the data points in the second protocol point table. The second protocol point table includes second feature data of the second data points. The second feature data includes the acquisition path. It is also used to send variable values corresponding to the acquisition path to the first master control device corresponding to the second protocol point table through the corresponding port of the second protocol process based on the second feature data and the second communication protocol corresponding to the second protocol process. Wherein, the first protocol process is any protocol process in the acquisition module, and the first protocol point table is any protocol point table in the first protocol process; the second protocol process is the protocol process in the upload module, and the second protocol point table is the protocol point table in the second protocol process; the first communication protocol is different from the second communication protocol.
12. The apparatus according to claim 11, characterized in that, The database module also includes a message routing submodule; The upload module is further configured to run a third protocol process, receive control commands from the second master control device through a second port based on the third communication protocol corresponding to the third protocol process; parse the control commands to obtain command values and third feature data of the third data point; query the third protocol point table of the third protocol process for the target path corresponding to the third feature data; and send the target path and command values to the message routing submodule. The message routing submodule is used to forward the target path and the command value to the acquisition module; The acquisition module is further configured to run a fourth protocol process, receive the command value and the target path; query the fourth protocol point table of the fourth protocol process for fourth feature data corresponding to the target path; and send the command value to the second bottom device corresponding to the fourth protocol point table through a first port, based at least on the fourth feature data and the fourth communication protocol corresponding to the fourth protocol process. Wherein, the third protocol process is the protocol process in the upload module, and the third protocol point table is the protocol point table in the third protocol process; the fourth protocol process is the protocol process in the acquisition module, and the fourth protocol point table is the protocol point table in the fourth protocol process; the third communication protocol is different from the fourth communication protocol.