Automatic protocol conversion system and method
By adding a conversion board and a dynamic protocol library storage device between the core board and the acquisition device, the problem of hardware interface and protocol incompatibility was solved, and the communication connection between the core board and the newly added acquisition device was realized, enhancing the scalability and flexibility of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHENGDU TD TECH LTD
- Filing Date
- 2024-11-27
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, the added acquisition devices are incompatible with the hardware interfaces or protocols of the existing development boards, resulting in the inability to establish communication connections and poor system scalability.
By adding a conversion board between the core board and the acquisition device, and using a dynamic protocol library storage device to load the protocol library required for communication with the new acquisition device, protocol conversion is achieved, thereby enhancing system scalability.
It enables communication between the core board and newly added acquisition devices, reducing development cycle and cost, and improving the scalability and flexibility of the system.
Smart Images

Figure CN122120353A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of hardware interfaces and protocols in industry, and in particular to an automatic protocol conversion system and method. Background Technology
[0002] In the industrial sector, due to technological differences between different equipment manufacturers, the hardware interfaces and protocols between devices are showing a trend of diversification.
[0003] In existing technologies, hardware interfaces and corresponding protocol conversion software are integrated on the same development board to achieve protocol conversion between different devices, thereby enabling communication between devices.
[0004] This approach has poor scalability; if the new acquisition device is incompatible with the hardware interface or protocol conversion software on the core board of the existing development board, it cannot establish a communication connection with the new acquisition device. Summary of the Invention
[0005] This application provides an automatic protocol conversion system and method to achieve the effect of establishing a communication connection between the core board and a newly added acquisition device whose hardware interface or protocol is incompatible.
[0006] In a first aspect, embodiments of this application provide an automatic protocol conversion system, including: a core board and at least one conversion board;
[0007] The conversion board is used to acquire first attribute information of the acquisition device and first data acquired by the acquisition device when the conversion board is in communication connection with the acquisition device.
[0008] The core board is configured to, when the core board is in communication connection with the conversion board, obtain the first attribute information in the conversion board, determine the first protocol corresponding to the first data based on the first attribute information, and detect whether a protocol library corresponding to the first protocol exists in the hard disk; wherein, the protocol library corresponding to the first protocol is used to convert the first data into second data, and the protocol corresponding to the second data is the protocol used by the core board;
[0009] The core board is also used to load the protocol library corresponding to the first protocol in the hard disk to the conversion board when the protocol library corresponding to the first protocol is detected in the hard disk;
[0010] The conversion board is further configured to convert the first data into the second data according to the protocol library corresponding to the first protocol, and send the second data to the core board.
[0011] In one possible implementation, obtaining the first attribute information in the conversion board includes:
[0012] The first attribute information is obtained from the preset configuration file of the conversion board or the RFID module; wherein the first attribute information is stored in the preset configuration file or the RFID module.
[0013] In one possible implementation, determining the first protocol corresponding to the first data based on the first attribute information includes:
[0014] The protocol corresponding to the first attribute information is determined by the first correspondence relationship, which includes multiple protocols and attribute information corresponding to each protocol.
[0015] The first protocol is determined to be the protocol corresponding to the first attribute information;
[0016] The first attribute information includes one or more of the following: device type and hardware version.
[0017] In one possible implementation, the system further includes: a dynamic protocol library storage device;
[0018] The core board is also configured to send a first request to the dynamic protocol library storage device when the protocol library corresponding to the first protocol is not detected in the hard disk, wherein the first request is used to obtain the protocol library corresponding to the first protocol.
[0019] The dynamic protocol library storage device is used to determine whether to store the protocol library corresponding to the first protocol according to the first request; if the protocol library corresponding to the first protocol is stored, the device sends the protocol library corresponding to the first protocol to the core board.
[0020] When the core board receives the protocol library corresponding to the first protocol sent by the dynamic protocol library storage device, it loads the protocol library corresponding to the first protocol into the hard disk.
[0021] In one possible implementation, the dynamic protocol library storage device is further configured to, in the absence of a protocol library corresponding to the first protocol stored, respond to a generation instruction for a protocol library corresponding to the first protocol, create a protocol library corresponding to the first protocol according to the generation instruction, and send the protocol library corresponding to the first protocol to the core board.
[0022] In one possible implementation, sending the first request to the dynamic protocol library storage device includes:
[0023] The first request is generated based on the first protocol and the protocol used by the core board;
[0024] Send a first request to the dynamic protocol library storage device.
[0025] In one possible implementation, the dynamic protocol library storage device is a host computer that is communicatively connected to the core board.
[0026] In one possible implementation, the second data includes the private messages of the conversion board;
[0027] The core board is also used to load the protocol library corresponding to the first protocol into memory, and when the conversion board indicated by the private message is one of the at least one conversion boards, to parse the second data according to the protocol library corresponding to the first protocol in the memory.
[0028] In one possible implementation, the conversion board is further configured to send a device offline signal to the core board when the communication connection between the conversion board and the acquisition device is disconnected.
[0029] The core board is also used to delete the protocol library corresponding to the first protocol from the memory according to the device offline signal when the protocol library corresponding to the first protocol is loaded in the memory.
[0030] In one possible implementation, the core board is further configured to delete the attribute information of the acquisition device and the protocol library corresponding to the first protocol from the conversion board.
[0031] This application provides an automatic protocol conversion system and method. A conversion board acquires first attribute information and first data from a data acquisition device. A core board determines the first protocol of the first data based on the first attribute information in the conversion board. If a protocol library corresponding to the first protocol exists on the core board's hard drive, it is loaded into the memory of both the conversion board and the core board. The conversion board uses this protocol library to convert the first data into second data and sends it to the core board. This enables the automatic protocol conversion system to connect to new data acquisition devices that are incompatible with the existing core board hardware interface and / or protocols, enhancing the system's scalability. Attached Figure Description
[0032] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0033] Figure 1 This is one of the structural schematic diagrams of the automatic protocol conversion system provided in the embodiments of this application;
[0034] Figure 2 One of the flowcharts of the automatic protocol conversion method provided in the embodiments of this application;
[0035] Figure 3 This is a second schematic diagram of the structure of the automatic protocol conversion system provided in the embodiments of this application;
[0036] Figure 4 A second schematic flowchart illustrating the automatic protocol conversion method provided in this application embodiment;
[0037] Figure 5 The third flowchart illustrates the automatic protocol conversion method provided in this application embodiment;
[0038] Figure 6 This is the fourth flowchart illustrating the automatic protocol conversion method provided in the embodiments of this application.
[0039] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0040] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0041] First, let me explain the terms used in this application:
[0042] A hardware interface refers to the physical or logical connection point in a computer system used to connect different hardware devices or external devices to the computer body for data transmission and communication. It includes various forms of ports, slots, buses, etc. Through these interfaces, the computer can identify, connect to, and control external devices, enabling data input, output, and interaction between devices.
[0043] A protocol library is a set of pre-written program code or instruction sets used to enable data exchange and communication between different systems, devices, or applications according to specific rules. These protocols define the format, sequence, error detection and correction mechanisms, etc., of data exchange to ensure that information can be transmitted accurately between different entities.
[0044] In the industrial sector, due to technological differences among equipment manufacturers, hardware interfaces and protocols between devices are becoming increasingly diverse. Current technology integrates the hardware interface and corresponding protocol conversion software onto the same development board to achieve protocol conversion and communication between different devices. However, this approach has gradually revealed its limitations in practical applications, especially when new data acquisition devices need to be connected. If the added data acquisition device is incompatible with the hardware interface of the core board in the existing development board, or if its protocol is not within the scope of the protocol conversion software supported by the core board, the system cannot establish a communication connection with the new device, limiting the system's scalability.
[0045] This application proposes an automatic protocol conversion system, the core of which lies in a conversion board and a dynamic protocol library storage device. By adding a conversion board between the core board and the acquisition device, the problem of hardware interface mismatch between the core board and the acquisition device is solved. The dynamic protocol library storage device stores and updates protocol libraries not included in the core board. When the core board needs to connect to a new acquisition device, the protocol library required for communication with the new acquisition device can be loaded through the dynamic protocol library storage device, thereby converting the protocol and enabling communication between the core board and the acquisition device, thus improving the scalability of the system.
[0046] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0047] Figure 1 This is one of the structural schematic diagrams of an automatic protocol conversion system provided in an embodiment of this application. For example, as shown... Figure 1 As shown, it includes: a core board, at least one conversion board, and at least one acquisition device corresponding to each conversion board.
[0048] In one possible implementation, one or more of the core board, at least one conversion board, and at least one acquisition device corresponding to each conversion board can be integrated or separated.
[0049] For example, the core board and at least one conversion board can be integrated into a single configuration.
[0050] For example, at least one acquisition device corresponding to each conversion board can be integrated and configured.
[0051] For example, at least one conversion board includes N conversion boards, where N is an integer greater than or equal to 1.
[0052] The core board is equipped with at least one first hardware interface, and one first hardware interface corresponds to one conversion board.
[0053] The core board can communicate with the conversion board through the corresponding first hardware interface.
[0054] Taking conversion board n as an example, at least one acquisition device corresponding to each conversion board is illustrated. The at least one acquisition device corresponding to conversion board n includes: acquisition device n_1, acquisition device n_2, ..., acquisition device n_m, where n takes the value from 1 to N, and m is an integer greater than or equal to 1.
[0055] The number of at least one acquisition device corresponding to each conversion board may be different or the same.
[0056] Each acquisition device is equipped with a second hardware interface, through which the acquisition device can communicate with the conversion board.
[0057] The first hardware interface and the second hardware interface can be the same or different.
[0058] Optionally, the first hardware interface and the second hardware interface include, but are not limited to: RS-485 interface, RS-232 interface, Ethernet interface, Controller Area Network Interface (CAN) interface, Universal Serial Bus Interface (USB) interface, USB Type-A interface, USB Type-B interface, and USB Type-C interface.
[0059] Each conversion board is associated with a scenario, which indicates the maximum number of acquisition devices that can be communicated with, as well as the second hardware interface of the acquisition devices.
[0060] Optionally, the core board also includes an MCU (Microcontroller Unit), which is used to perform related processing, such as processing data from the conversion board, loading protocol libraries, deleting protocol libraries, etc. The data from the conversion board includes, but is not limited to, the first attribute information of the acquisition device.
[0061] Based on the above embodiments, the following is combined with Figure 2 The automatic protocol conversion method applicable to the above-mentioned automatic protocol conversion system is described in detail.
[0062] Figure 2 This is one of the flowcharts illustrating the automatic protocol conversion method provided in the embodiments of this application, such as... Figure 2 As shown, the method includes:
[0063] S201, The acquisition device obtains the first data.
[0064] Optionally, the data acquisition device includes, but is not limited to: sensors, actuators, and motors.
[0065] Optionally, the first data is the data collected by the acquisition device.
[0066] When the data acquisition device is a sensor, the first data is data obtained by collecting information about the environment or object. Sensors include, but are not limited to, temperature sensors, humidity sensors, pressure sensors, and gas concentration sensors. For example, when the data acquisition device is a temperature sensor, the first data is temperature data obtained by collecting the temperature of the environment or object.
[0067] When the data acquisition device is an actuator, the first data is the data acquired by the actuator through relevant operations. Actuators include, but are not limited to, level control actuators and temperature control actuators. For example, when the data acquisition device is a level control actuator, the first data includes the number of operations, operation time, and trend of level change acquired by the actuator through level control.
[0068] When the data acquisition device is a motor, the first data is the data collected by the motor through its operating status record. Motors include, but are not limited to, conveyor belt motors and electric curtain motors. For example, when the data acquisition device is a conveyor belt motor, the first data includes the product's moving speed, production line efficiency, and downtime events collected during motor transmission.
[0069] S202. When the conversion board and the acquisition device are in communication connection, the conversion board obtains the first attribute information of the acquisition device and the first data collected by the acquisition device.
[0070] S203. When the core board and the conversion board are in communication connection, the core board obtains the first attribute information from the conversion board.
[0071] S204. The core board determines the first protocol corresponding to the first data based on the first attribute information.
[0072] Optionally, the first protocol includes, but is not limited to: Modbus, HyperText Transfer Protocol (HTTP), OLE for Process Control Unified Architecture (OPC UA), Message Queuing Telemetry Transport (MQTT), Advanced Message Queuing Protocol (AMQP), Distributed Data Protocol, and Zigbee.
[0073] S205. The core board checks whether the protocol library corresponding to the first protocol exists in the hard drive.
[0074] Alternatively, the hard drive is the core board's hard drive.
[0075] Optionally, the core board uses the first protocol as an index to search for the protocol library corresponding to the first protocol in the hard disk, wherein the hard disk includes multiple protocol libraries and the protocols supported by each protocol library.
[0076] Optionally, the core board uses the identifier of the first protocol as an index to search for the protocol library corresponding to the first protocol in the hard disk. The hard disk includes multiple protocol libraries and the identifiers of the protocols supported by each protocol library. The identifier of the first protocol is obtained through the first protocol.
[0077] S206. If the core board detects the protocol library corresponding to the first protocol in the hard drive, it loads the protocol library corresponding to the first protocol into the conversion board.
[0078] Optionally, the core board loads the protocol library corresponding to the first protocol from the hard disk into the core board's memory.
[0079] Optionally, the core board can first load the protocol library corresponding to the first protocol to the conversion board, and then load the protocol library corresponding to the first protocol to the core board's memory, or it can first load the protocol library corresponding to the first protocol to the core board's memory, and then load the protocol library corresponding to the first protocol to the conversion board.
[0080] Optionally, when the core board starts up, the core board can preload commonly used or smaller protocol libraries into the core board's memory to further reduce loading latency.
[0081] S207. The conversion board converts the first data into the second data according to the protocol library corresponding to the first protocol.
[0082] In one possible implementation, the protocol library corresponding to the first protocol is used to convert the first data into second data, wherein the protocol corresponding to the second data is the protocol used by the core board.
[0083] Specifically, the conversion board uses the rules and methods in the protocol library corresponding to the first protocol to convert the first data using the first protocol into second data that conforms to the protocol used by the core board.
[0084] S208, the conversion board sends the second data to the core board.
[0085] exist Figure 2 In the automatic protocol conversion method provided in this embodiment, a conversion board is added between the core board and the acquisition device. This conversion board converts the first data from the acquisition device into data (i.e., second data) that matches the protocol used by the core board. This allows communication between the acquisition device and the core board to be maintained even when their hardware interfaces and / or protocols are incompatible, enhancing the scalability of the automatic protocol conversion system. When a new acquisition device is added that is incompatible with the conversion board's hardware interface and / or protocol, only the conversion board needs to be replaced; there is no need to upgrade the core board, reducing development cycle and cost.
[0086] In one possible implementation, the automatic protocol conversion system further includes a dynamic protocol library storage device. The following... Figure 3 An automatic protocol conversion system that includes a dynamic protocol library storage device.
[0087] Figure 3 This is a second schematic diagram of the structure of the automatic protocol conversion system provided in this application embodiment. For example, as shown... Figure 3 As shown, it includes: a core board, a dynamic protocol library storage device, at least one conversion board, and at least one acquisition device corresponding to each conversion board.
[0088] The dynamic protocol library storage device can communicate with the core board through a preset network, which includes, but is not limited to, mobile hotspot (Wi-Fi), Bluetooth, and Ethernet cable.
[0089] The dynamic protocol library storage device can also communicate with the core board via a hardware interface.
[0090] Optionally, the dynamic protocol library storage device is a host computer that communicates with the core board.
[0091] Optionally, the dynamic protocol library storage device is a remote server or database system that has a remote database configured.
[0092] The following is combined with Figure 4 When the automatic protocol conversion system also includes a dynamic protocol library storage device, the automatic protocol conversion method provided in this application embodiment will be further described.
[0093] Figure 4 This is a second flowchart illustrating the automatic protocol conversion method provided in the embodiments of this application, as shown below. Figure 4 As shown, the method includes:
[0094] S401, The data acquisition device obtains the first data.
[0095] For details on the execution process of S401, please refer to S201, which will not be repeated here.
[0096] S402. When the conversion board and the acquisition device are in communication connection, the conversion board obtains the first attribute information of the acquisition device and the first data collected by the acquisition device.
[0097] In one possible implementation, the first attribute information is stored in a preset configuration file of the conversion board or in a radio frequency identification (RFID) module.
[0098] S403. When the core board and the conversion board are in communication connection, the core board obtains the first attribute information from the conversion board.
[0099] In one possible implementation, the core board obtains the first attribute information from a preset configuration file of the conversion board or from an RFID module.
[0100] S404. The core board determines the first protocol corresponding to the first data based on the first attribute information.
[0101] In one possible implementation, determining the first protocol corresponding to the first data based on the first attribute information includes:
[0102] The protocol corresponding to the first attribute information is determined in the first correspondence relationship, which includes multiple protocols and attribute information corresponding to each protocol;
[0103] The first protocol is determined to be the protocol corresponding to the first attribute information.
[0104] In one possible implementation, the first attribute information includes one of the following:
[0105] Device type and hardware version;
[0106] Equipment type.
[0107] Optionally, the first attribute information may also include: the number of data acquisition devices, the manufacturer information of the data acquisition devices, and the serial number of the data acquisition devices.
[0108] For example, the first correspondence is shown in Table 1 below.
[0109] Table 1 First Correspondence Relationship
[0110]
[0111] For example, the first attribute information includes device type and hardware version, where the device type is a1 and the hardware version is 1.0. Based on Table 1, the query shows that the protocol corresponding to the first attribute information is protocol 1, thus confirming protocol 1 as the protocol corresponding to the first attribute information.
[0112] S405, the core board checks whether the protocol library corresponding to the first protocol exists in the hard drive.
[0113] S406. If the core board does not detect the protocol library corresponding to the first protocol in the hard disk, it sends a first request to the dynamic protocol library storage device. The first request is used to obtain the protocol library corresponding to the first protocol.
[0114] In one possible implementation, sending a first request to the dynamic protocol library storage device includes:
[0115] The core board generates a first request based on the first protocol and the protocol used by the core board;
[0116] The core board sends the first request to the dynamic protocol library storage device.
[0117] Optionally, the core board can be configured with a timeout timer. The timeout timer starts counting after the core board sends the first request; if no response is received from the dynamic protocol library storage device before the timeout, the core board checks the connection status with the dynamic protocol library storage device and determines whether to resend the first request based on the connection status.
[0118] Optionally, timeout refers to the time exceeding a preset duration, which can be adjusted according to actual conditions to improve request success rate and system stability.
[0119] S407. The dynamic protocol library storage device determines whether to store the protocol library corresponding to the first protocol based on the first request.
[0120] Optionally, the first request may include the first protocol and / or the identifier of the first protocol.
[0121] For example, when the first request includes the first protocol, the dynamic protocol library storage device uses the first protocol as an index to search for the protocol library corresponding to the first protocol in the dynamic protocol library storage device, and determines whether to store the protocol library corresponding to the first protocol. The dynamic protocol library storage device includes multiple protocol libraries and the protocols supported by each protocol library.
[0122] For example, when the first request includes the identifier of the first protocol, the dynamic protocol library storage device uses the identifier of the first protocol as an index to search for the protocol library corresponding to the first protocol in the dynamic protocol library storage device, and determines whether to store the protocol library corresponding to the first protocol. The dynamic protocol library storage device includes multiple protocol libraries and the identifier of the protocols supported by each protocol library.
[0123] S408a: The dynamic protocol library storage device, while storing the protocol library corresponding to the first protocol, sends the protocol library corresponding to the first protocol to the core board.
[0124] S408b, including S408b-1 and S408b-2.
[0125] S408b-1. In the absence of a protocol library corresponding to the first protocol, the dynamic protocol library storage device responds to the generation instruction of the protocol library corresponding to the first protocol and creates the protocol library corresponding to the first protocol according to the generation instruction.
[0126] Optionally, the generation instructions may include: the version number of the required protocol library, specific configuration requirements, etc.
[0127] Optionally, creating a protocol library corresponding to the first protocol includes, but is not limited to: downloading the protocol library corresponding to the first protocol from an external source, or downloading the protocol library corresponding to the first protocol from a custom library.
[0128] Furthermore, after creating the protocol library corresponding to the first protocol, the dynamic protocol library storage device adds it to the dynamic protocol library storage device.
[0129] S408b-2, The dynamic protocol library storage device sends the protocol library corresponding to the first protocol to the core board.
[0130] S409. When the core board receives the protocol library corresponding to the first protocol sent by the dynamic protocol library storage device, it loads the protocol library corresponding to the first protocol into the hard disk.
[0131] S410, including the aforementioned S206 to S208, will not be repeated here.
[0132] exist Figure 4In the automatic protocol conversion method provided in this embodiment, if the core board does not detect the protocol library corresponding to the first protocol in the hard drive, it sends a first request to the dynamic protocol library storage device to obtain the protocol library corresponding to the first protocol. If the dynamic protocol library storage device stores the protocol library corresponding to the first protocol, it sends the protocol library corresponding to the first protocol to the core board. If the dynamic protocol library storage device does not store the protocol library corresponding to the first protocol, it can create and send the protocol library corresponding to the first protocol to the core board, improving the flexibility of the core board in obtaining the protocol library and thus improving the scalability of the protocol library in the core board. In addition, if the dynamic protocol library storage device does not store the protocol library corresponding to the first protocol, it responds to the generation instruction of the protocol library corresponding to the first protocol and creates the protocol library corresponding to the first protocol according to the generation instruction, further enhancing the scalability of the protocol library in the automatic protocol conversion system. The addition of the protocol library is directly realized through the generation instruction, improving the convenience of management and maintenance of the automatic protocol conversion system.
[0133] In one possible implementation, the second data includes the private messages of the conversion board.
[0134] The following is combined with Figure 5 When the second data includes private messages from the conversion board, the automatic protocol conversion method provided in this application embodiment will be further explained.
[0135] Figure 5 This is the third flowchart illustrating the automatic protocol conversion method provided in the embodiments of this application, as shown below. Figure 5 As shown, the method includes:
[0136] S501, including the aforementioned S201 to S206, will not be repeated here.
[0137] S502, the conversion board converts the first data into second data according to the protocol library corresponding to the first protocol. The second data includes the conversion board's private message.
[0138] Optionally, during the process of converting the first data into the second data, the conversion board generates a private message, wherein the private message indicates the conversion board that generated the private message.
[0139] S503, the conversion board sends the second data to the core board.
[0140] S504. When the conversion board indicated by the private message is one of at least one conversion board, the core board parses the second data according to the protocol library corresponding to the first protocol in the core board's memory.
[0141] Optionally, S504 includes:
[0142] The core board determines the conversion board indicated by the private message based on the private message, and determines whether the conversion board indicated by the private message is one of at least one conversion board.
[0143] If it is determined that the conversion board indicated by the private message is one of at least one conversion board, the second data is parsed according to the protocol library corresponding to the first protocol in the memory of the core board.
[0144] Optionally, determining whether the conversion board indicated by the private message is one of at least one conversion board is to determine whether the conversion board indicated by the private message is a conversion board that can legally access the core board.
[0145] exist Figure 5 In the automatic protocol conversion method provided in the embodiment, the conversion board converts the first data into second data according to the protocol library corresponding to the first protocol, and sends the second data to the core board. The second data includes the private message of the conversion board. The core board parses the second data only when it determines that the conversion board indicated by the private message is one of at least one conversion board. This improves the security of the core board in parsing the second data, thereby improving the security of the automatic protocol conversion system.
[0146] The following is combined with Figure 6 The automatic protocol conversion method provided in this application embodiment is further explained when the communication connection between the conversion board and the acquisition device is disconnected.
[0147] Figure 6 This is the fourth flowchart illustrating the automatic protocol conversion method provided in the embodiments of this application, as shown below. Figure 6 As shown, the method includes:
[0148] S601, including the aforementioned S401 to S410, will not be repeated here.
[0149] S602. When the communication connection between the conversion board and the acquisition device is disconnected, the conversion board sends a device offline signal to the core board. The device offline signal indicates that the communication connection between the conversion board and the acquisition device is disconnected.
[0150] Optionally, the conversion board can continuously monitor the communication connection status between the conversion board and the acquisition device by checking the status of the second hardware interface.
[0151] S603: Based on the device offline signal, the core board deletes the protocol library corresponding to the first protocol from the core board's memory.
[0152] S604. The core board deletes the first attribute information of the acquisition device and the protocol library corresponding to the first protocol in the conversion board.
[0153] Optionally, the device offline signal may include a device offline indicator and an identifier of the acquisition device. The device offline indicator is used to indicate that the communication connection between the conversion board and the acquisition device is disconnected, and the identifier of the acquisition device corresponds one-to-one with the acquisition device.
[0154] Optionally, the core board determines that the communication connection between the conversion board and the acquisition device is disconnected based on the device offline indication in the device offline signal; the core board deletes the protocol library corresponding to the first protocol from the core board's memory based on the identifier of the acquisition device, and deletes the first attribute information of the acquisition device and the protocol library corresponding to the first protocol from the conversion board.
[0155] exist Figure 6 In the automatic protocol conversion method provided in the embodiment, when the communication connection between the conversion board and the acquisition device is disconnected, the conversion board sends a device offline signal to the core board. Based on the device offline signal, the core board deletes the protocol library corresponding to the first protocol from its memory, and also deletes the first attribute information of the acquisition device and the protocol library corresponding to the first protocol from the conversion board. This ensures that the core board has sufficient memory space for subsequent communication connections, optimizing the resource allocation of the automatic protocol conversion system. Furthermore, by only deleting the protocol library in the core board's memory, when the conversion board re-establishes a communication connection with the acquisition device, the corresponding protocol library can be directly loaded from the core board's hard drive without having to send a request to the dynamic protocol library storage device to obtain the corresponding protocol library. This improves the flexibility and speed of protocol loading in the automatic protocol conversion system.
[0156] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. An automatic protocol conversion system, characterized in that, include: The core board and at least one conversion board; The conversion board is used to acquire first attribute information of the acquisition device and first data acquired by the acquisition device when the conversion board is in communication connection with the acquisition device. The core board is configured to, when the core board is in communication connection with the conversion board, obtain the first attribute information in the conversion board, determine the first protocol corresponding to the first data based on the first attribute information, and detect whether a protocol library corresponding to the first protocol exists in the hard disk; wherein, the protocol library corresponding to the first protocol is used to convert the first data into second data, and the protocol corresponding to the second data is the protocol used by the core board; The core board is also used to load the protocol library corresponding to the first protocol in the hard disk to the conversion board when the protocol library corresponding to the first protocol is detected in the hard disk; The conversion board is further configured to convert the first data into the second data according to the protocol library corresponding to the first protocol, and send the second data to the core board.
2. The system according to claim 1, characterized in that, The step of obtaining the first attribute information in the conversion board includes: The first attribute information is obtained from the preset configuration file of the conversion board or the radio frequency identification (RFID) module; wherein the preset configuration file or the RFID module stores the first attribute information.
3. The system according to claim 1 or 2, characterized in that, The step of determining the first protocol corresponding to the first data based on the first attribute information includes: The protocol corresponding to the first attribute information is determined in the first correspondence relationship, which includes multiple protocols and attribute information corresponding to each protocol; The first protocol is determined to be the protocol corresponding to the first attribute information; The first attribute information includes one or more of the following: device type and hardware version.
4. The system according to claim 1 or 2, characterized in that, The system also includes: a dynamic protocol library storage device; The core board is also configured to send a first request to the dynamic protocol library storage device when the protocol library corresponding to the first protocol is not detected in the hard disk, wherein the first request is used to obtain the protocol library corresponding to the first protocol. The dynamic protocol library storage device is used to determine whether to store the protocol library corresponding to the first protocol according to the first request; if the protocol library corresponding to the first protocol is stored, the device sends the protocol library corresponding to the first protocol to the core board. When the core board receives the protocol library corresponding to the first protocol sent by the dynamic protocol library storage device, it loads the protocol library corresponding to the first protocol into the hard disk.
5. The system according to claim 4, characterized in that, The dynamic protocol library storage device is further configured to, in the absence of a protocol library corresponding to the first protocol stored, respond to a generation instruction for a protocol library corresponding to the first protocol, create a protocol library corresponding to the first protocol according to the generation instruction, and send the protocol library corresponding to the first protocol to the core board.
6. The system according to claim 4, characterized in that, Sending the first request to the dynamic protocol library storage device includes: The first request is generated based on the first protocol and the protocol used by the core board; Send a first request to the dynamic protocol library storage device.
7. The system according to claim 6, characterized in that, The dynamic protocol library storage device is a host computer that is communicatively connected to the core board.
8. The system according to claim 1 or 2, characterized in that, The second data includes the private messages of the conversion board; The core board is also used to load the protocol library corresponding to the first protocol into memory, and when the conversion board indicated by the private message is one of the at least one conversion boards, to parse the second data according to the protocol library corresponding to the first protocol in the memory.
9. The system according to claim 1 or 2, characterized in that, The conversion board is also used to send a device offline signal to the core board when the communication connection between the conversion board and the acquisition device is disconnected; The core board is also used to delete the protocol library corresponding to the first protocol from the memory according to the device offline signal when the protocol library corresponding to the first protocol is loaded in the memory.
10. The system according to claim 9, characterized in that, The core board is also used to delete the attribute information of the acquisition device and the protocol library corresponding to the first protocol from the conversion board.