A protocol converter and conversion system

By combining the communication interface module, protocol conversion module, and mapping method planning module, the problem of low conversion efficiency of the protocol converter is solved, diversified protocol data conversion is realized, and the efficiency and accuracy of the converter are improved.

CN118474213BActive Publication Date: 2024-11-22SHANGHAI BINY ELECTRIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410726023.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-11-22
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

Existing protocol converters are inefficient in multi-protocol conversion processes, have a single conversion method, and result in slow data conversion speeds, failing to effectively meet the requirements of the Industrial Internet for seamless integration and convergence.

Method used

The system employs a communication interface module, a protocol conversion module, a tagging module, and a mapping method planning module. By tagging and identifying protocol data types, it selects the indirect conversion method with the shortest conversion time and rationally allocates information channels to achieve diversified protocol data conversion.

Benefits of technology

It improves the efficiency of protocol conversion, reduces the error rate during the conversion process, ensures the accuracy and integrity of protocol data, and improves the conversion accuracy of the converter.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118474213B_ABST
    Figure CN118474213B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of protocol conversion processing, specifically to a protocol converter and a conversion system, wherein the conversion system includes a communication interface module, a protocol conversion module, a marking module and a mapping mode planning module; the protocol converter includes a single-chip microcomputer, and the single-chip microcomputer is used to integrate the conversion system. The present invention can arrange all conversion modes that can indirectly convert the protocol data when the current information channel is converting the protocol data, screen out the conversion mode with the shortest conversion time, and convert the protocol data when the same protocol data is subsequently received, so as to diversify the conversion modes, reasonably allocate and use various information channels, and greatly improve the conversion efficiency; and when other types of protocol data exist in a certain protocol data, it can realize automatic repair of the mixed loopholes of the protocol data, reduce the number of errors in the conversion process, and improve the conversion accuracy of the converter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of protocol conversion processing, in particular to a protocol converter and a conversion system. Background Art

[0002] In the context of industrial Internet and intelligent manufacturing, precise control of production processes has become particularly important. The hierarchical structure of traditional control networks has certain limitations in information acquisition, control, scheduling and management, and it is difficult to meet the requirements of seamless integration and fusion of the industrial Internet. In this case, protocol converters play an indispensable role. Protocol converters, as the name suggests, are devices used to convert one communication protocol to another. When multiple networks or devices with different protocols need to communicate with each other, protocol converters play a vital "translation" role. It not only involves data conversion, but also includes conversions at multiple levels such as events, commands and time synchronization.

[0003] The current protocol converter has the function of converting multiple protocols. In order to realize the function of converting multiple protocols, the protocol converter contains multiple conversion channels, but each conversion channel can only convert one protocol data. When the current information channel is converting the protocol data, when the same protocol data is received later, it can only wait in line and wait for the previous protocol data to be converted before it can convert the subsequent protocol data. The conversion method is single, resulting in slow conversion efficiency. Summary of the invention

[0004] The object of the present invention is to provide a protocol converter and a conversion system to solve the problems raised in the above background technology.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a conversion system, the conversion system comprising a communication interface module, a protocol conversion module, a marking module and a mapping mode planning module;

[0006] The communication interface module is used to receive input protocol data, transmit the protocol data to the protocol conversion module, and send the target protocol data mapped by the protocol conversion module to the designated port;

[0007] The protocol conversion module is used to map the input protocol data into target protocol data and transmit the target protocol data to the application layer;

[0008] The marking module marks the protocol data, wherein the input protocol data is marked as primary marked protocol data; the protocol data packets that cannot be mapped in the primary marked protocol data are marked as secondary marked protocol data, the protocol types of the primary marked protocol data and the secondary marked protocol data are analyzed, and the secondary marked protocol data is extracted;

[0009] The mapping method planning module obtains the corresponding information channel according to the type of the first-level tag protocol data, analyzes the current state of the information channel, obtains the method of mapping the first-level tag protocol data, and maps the first-level tag protocol data to the first-level target protocol data; obtains the corresponding information channel according to the second-level tag protocol data, analyzes the current state of the information channel, obtains the method of mapping the second-level tag protocol data, maps the second-level tag protocol data to the second-level target protocol data, and then inserts it into the initial position of the first-level tag protocol data to form complete first-level target protocol data.

[0010] Furthermore, the communication interface module includes an input port and an output port, the input port is used to receive input protocol data, and the output port is used to output mapped target protocol data to the application layer.

[0011] Furthermore, the input port and the output port both include a ModBus interface, an RS485 interface, a CAN interface and an Ethernet interface.

[0012] Further, the protocol conversion module includes a transmission unit, a configuration unit, an encoding unit and a decoding unit;

[0013] The transmission unit includes an information channel, and the information channel is used to convert input protocol data into target protocol data;

[0014] The configuration unit obtains the type of the input protocol data and allocates the input protocol data to the corresponding information channel according to the conversion target;

[0015] The encoding unit encodes the received protocol data and stores the encoded protocol data in the message area;

[0016] The decoding unit decodes the protocol data in the message area and outputs it to the application layer.

[0017] Furthermore, the transmission unit includes:

[0018] The information channel includes a plurality of channels M→N, wherein the channel M→N represents converting the protocol data M into the protocol data N;

[0019] The type of protocol data is obtained to form a set L={A, B, C, D, E}; wherein A, B, C, D, E represent the type of protocol data; M∈{A, B, C, D, E}; N∈{A, B, C, D, E}; and M≠N.

[0020] Further, the marking module includes a marking unit, a recognition unit and an extraction unit;

[0021] The marking unit marks the input protocol data as first-level marked protocol data; marks the protocol data packets that cannot be mapped in the first-level marked protocol data as second-level marked protocol data;

[0022] The identification unit identifies the types of the primary tag protocol data and the secondary tag protocol data; and uses the extraction unit to extract the secondary tag protocol data, and inserts a position mark number into the primary tag protocol data.

[0023] Furthermore, the mapping mode planning module includes a primary planning unit and a secondary planning unit:

[0024] The first-level planning unit includes:

[0025] Obtain the primary marked protocol data M1 and the mapped target protocol data N1, and detect whether the corresponding channel M1→N1 is undergoing conversion. If the channel M1→N1 is not undergoing conversion, input the primary marked protocol data M1 into the channel M1→N1 for mapping to obtain the target protocol data N1;

[0026] If the channel M1→N1 is converting, the indirect conversion method corresponding to the shortest conversion time is output, and the first-level tag protocol data is mapped and converted according to the indirect conversion method to obtain the first-level target protocol data;

[0027] The secondary planning unit comprises:

[0028] Acquire the secondary marked protocol data M2, and simultaneously obtain the mapped target protocol data N2, and detect whether the corresponding channel M2→N2 is undergoing conversion. If the channel M2→N2 is not undergoing conversion, input the secondary marked protocol data M2 into the channel M2→N2 for mapping, and obtain the target protocol data N2;

[0029] If channel M2→N2 is undergoing conversion, the indirect conversion method corresponding to the shortest conversion time will be output, and the secondary mark protocol data will be mapped and converted according to the indirect conversion method to obtain the secondary target conversion protocol data. The secondary target protocol data will be reset and inserted into the position mark number in the primary mark protocol data to form complete primary target protocol data.

[0030] Furthermore, the process of outputting the indirect conversion method corresponding to the shortest conversion time is as follows:

[0031] Z1. The indirect conversion output process of the first-level tag protocol data includes:

[0032] If the channel M1→N1 corresponding to the primary tag protocol data is working, the conversion time of obtaining the primary tag protocol data and selecting the channel M1→N1 is T 转, calculate T according to the formula 转 =T MN +t MN ; Among them, T MN represents the conversion time of converting the primary protocol data M1 into the primary target protocol data N1; t MN Indicates the time that the first-level tag protocol data waits for the channel M1→N1 to complete the current conversion work queue;

[0033] The type of the first-level tag protocol data and the type of the first-level target protocol data are obtained, and all information channels are extracted at the same time. All conversion methods for converting the first-level tag protocol data into the type of the target protocol data are traversed to form a set U = {conversion path 1, conversion path 2 ... conversion path n}, and the conversion time of each conversion path is calculated to form a set T = {T1, T2 ... T n}, output the T with the shortest conversion time in the set T n ;

[0034] If T n ≤T 转 , then get T n The corresponding conversion path n is used as a conversion method, and the conversion method is outputted so as to be used as an indirect conversion method for the primary tag protocol data, and the primary tag protocol data is converted into the primary target protocol data according to the conversion path n;

[0035] If T n >T 转 , then the output queues and waits for the corresponding information channel to complete the conversion instruction, and the first-level target protocol data is obtained through the channel M1→N1 mapping;

[0036] Z2. The indirect conversion output process of the secondary tag protocol data includes:

[0037] If the information channel corresponding to the secondary tag protocol data is working, the same steps as the conversion output process of the primary tag protocol data are adopted to output the conversion path n corresponding to the secondary tag protocol, or output the instruction to queue and wait for the corresponding information channel to complete the conversion.

[0038] Furthermore, the calculation process of the conversion time of the conversion path is as follows:

[0039] Set the type of the tag protocol data to A and the type of the target protocol data to E;

[0040] The type of the tag protocol data includes the type of the primary tag protocol data or the type of the secondary tag protocol data; the type of the target protocol data includes the type of the primary target protocol data or the type of the secondary target protocol data;

[0041] The conversion path 1 is {A→B→C→E}, and the conversion path 1 indicates that the protocol data A is converted into the protocol data B, and then the protocol data B is converted into the protocol data C, and finally the protocol data C is converted into the protocol data E, so that the marked protocol data A can be converted into the target protocol data E;

[0042] Decompose the conversion path 1 into several information channels: {A→B}, {B→C}, {C→E}; calculate the conversion time period T corresponding to each information channel according to the width of the information channel AB , T BC , T CE ; and the time period for waiting for the current work of the information channel to complete. The waiting time period for {A→B} is t AB , the waiting time period of {B→C} is t BC , the waiting time period of {C→E} is t CE , establish a time axis, and AB , T BC , T CE , t BC , t AB , t CE Mark on the time axis, excluding the overlapping time, to include T AB , T BC , T CE , t BC , t AB , t CE The two end boundaries of the time range are taken as the endpoint moments, and a new time period is obtained, which is T1;

[0043] According to the above calculation method, the time periods T2 . . . Tn corresponding to {conversion path 2 . . . conversion path n} can be calculated in sequence to form a set T.

[0044] A protocol converter comprises a single chip microcomputer, and the single chip microcomputer is used for integrating the conversion system.

[0045] Compared with the prior art, the beneficial effects achieved by the present invention are:

[0046] 1. When the current information channel is converting protocol data, when the same protocol data is subsequently received, the present invention can arrange all conversion methods that can indirectly convert the protocol data, screen out the conversion method with the shortest conversion time, and convert the protocol data, so as to diversify the conversion methods, reasonably allocate and use various information channels, and greatly improve the conversion efficiency.

[0047] 2. In the process of converting protocol data, if other types of protocol data exist in a certain protocol data, the present invention can mark the protocol data, automatically identify the type of the marked protocol data, select the conversion method with the shortest conversion time, convert the marked protocol data, and reset the converted protocol data to form complete target protocol data, thereby reducing the number of errors in the conversion process, automatically repairing the loopholes of protocol data mixing, and improving the conversion accuracy of the converter. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0049] Figure 1 It is a schematic diagram of the structure of the present invention;

[0050] Figure 2 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] See also Figure 1-2 ,The present invention provides a technical solution: a conversion system, the conversion system includes a communication interface module, a protocol conversion module, a marking module and a mapping mode planning module;

[0053] The communication interface module is used to receive input protocol data, transmit the protocol data to the protocol conversion module, and send the target protocol data mapped by the protocol conversion module to the designated port;

[0054] The protocol conversion module is used to map the input protocol data into target protocol data and transmit the target protocol data to the application layer;

[0055] The marking module marks the protocol data, wherein the input protocol data is marked as primary marked protocol data; the protocol data packets that cannot be mapped in the primary marked protocol data are marked as secondary marked protocol data, the protocol types of the primary marked protocol data and the secondary marked protocol data are analyzed, and the secondary marked protocol data is extracted;

[0056] The mapping method planning module obtains the corresponding information channel according to the type of the first-level tag protocol data, analyzes the current state of the information channel, obtains the method of mapping the first-level tag protocol data, and maps the first-level tag protocol data to the first-level target protocol data; obtains the corresponding information channel according to the second-level tag protocol data, analyzes the current state of the information channel, obtains the method of mapping the second-level tag protocol data, maps the second-level tag protocol data to the second-level target protocol data, and then inserts it into the initial position of the first-level tag protocol data to form complete first-level target protocol data.

[0057] The communication interface module includes an input port and an output port, the input port is used to receive input protocol data, and the output port is used to output the mapped target protocol data to the application layer; the input port and the output port both include a ModBus interface, an RS485 interface, a CAN interface and an Ethernet interface.

[0058] The protocol conversion module includes a transmission unit, a configuration unit, an encoding unit and a decoding unit;

[0059] The transmission unit includes an information channel, which is used to convert input protocol data into target protocol data; the configuration unit obtains the type of the input protocol data and allocates the input protocol data to the corresponding information channel according to the conversion target; the encoding unit encodes the received protocol data and stores the encoded protocol data in the message area; the decoding unit decodes the protocol data in the message area and outputs it to the application layer.

[0060] The transmission unit comprises:

[0061] The information channel includes a plurality of channels M→N, wherein the channel M→N represents converting the protocol data M into the protocol data N;

[0062] The type of protocol data is obtained to form a set L={A, B, C, D, E}; wherein A, B, C, D, E represent the type of protocol data; M∈{A, B, C, D, E}; N∈{A, B, C, D, E}; and M≠N.

[0063] The marking module includes a marking unit, a recognition unit and an extraction unit;

[0064] The marking unit marks the input protocol data as first-level marked protocol data; marks the protocol data packets that cannot be mapped in the first-level marked protocol data as second-level marked protocol data;

[0065] The identification unit identifies the types of the primary tag protocol data and the secondary tag protocol data; and uses the extraction unit to extract the secondary tag protocol data, and inserts a position mark number into the primary tag protocol data.

[0066] The mapping mode planning module includes a primary planning unit and a secondary planning unit:

[0067] The first-level planning unit includes:

[0068] Obtain the primary marked protocol data M1 and the mapped target protocol data N1, and detect whether the corresponding channel M1→N1 is undergoing conversion. If the channel M1→N1 is not undergoing conversion, input the primary marked protocol data M1 into the channel M1→N1 for mapping to obtain the target protocol data N1;

[0069] If the channel M1→N1 is converting, the indirect conversion method corresponding to the shortest conversion time is output, and the first-level tag protocol data is mapped and converted according to the indirect conversion method to obtain the first-level target protocol data;

[0070] The process of outputting the indirect conversion method corresponding to the shortest conversion time is:

[0071] Z1. The indirect conversion output process of the first-level tag protocol data includes:

[0072] If the channel M1→N1 corresponding to the primary tag protocol data is working, the conversion time of obtaining the primary tag protocol data and selecting the channel M1→N1 is T 转 , calculate T according to the formula 转 =T MN +t MN ; Among them, T MN represents the conversion time of converting the primary protocol data M1 into the primary target protocol data N1; t MN Indicates the time that the first-level tag protocol data waits for the channel M1→N1 to complete the current conversion work queue;

[0073] The type of the first-level tag protocol data and the type of the first-level target protocol data are obtained, and all information channels are extracted at the same time. All conversion methods for converting the first-level tag protocol data into the type of the target protocol data are traversed to form a set U = {conversion path 1, conversion path 2 ... conversion path n}, and the conversion time of each conversion path is calculated to form a set T = {T1, T2 ... T n}, the conversion time of the conversion path is calculated as follows:

[0074] Set the type of the tag protocol data to A and the type of the target protocol data to E;

[0075] The type of the tag protocol data includes the type of the primary tag protocol data or the type of the secondary tag protocol data; the type of the target protocol data includes the type of the primary target protocol data or the type of the secondary target protocol data;

[0076] The conversion path 1 is {A→B→C→E}, and the conversion path 1 indicates that the protocol data A is converted into the protocol data B, and then the protocol data B is converted into the protocol data C, and finally the protocol data C is converted into the protocol data E, so that the marked protocol data A can be converted into the target protocol data E;

[0077] Decompose the conversion path 1 into several information channels: {A→B}, {B→C}, {C→E}; calculate the conversion time period T corresponding to each information channel according to the width of the information channel AB , T BC , T CE ; and the time period for waiting for the current work of the information channel to complete. The waiting time period for {A→B} is t AB , the waiting time period of {B→C} is t BC , the waiting time period of {C→E} is t CE , establish a time axis, and AB , T BC , T CE , t BC , t AB , t CE Mark on the time axis, excluding the overlapping time, to include T AB , T BC , T CE , t BC , t AB , t CE The two end boundaries of the time range are taken as the endpoint moments, and a new time period is obtained, which is T1;

[0078] According to the above calculation method, the time periods T2 . . . Tn corresponding to {conversion path 2 . . . conversion path n} can be calculated in sequence to form a set T.

[0079] Output the set T with the shortest conversion time n ;

[0080] If T n ≤T 转 , then get T n The corresponding conversion path n is used as a conversion method, and the conversion method is outputted so as to be used as an indirect conversion method for the primary tag protocol data, and the primary tag protocol data is converted into the primary target protocol data according to the conversion path n;

[0081] If T n >T转 , then the output queues and waits for the corresponding information channel to complete the conversion instruction, and the first-level target protocol data is obtained through the channel M1→N1 mapping;

[0082] The secondary planning unit comprises:

[0083] Acquire the secondary marked protocol data M2, and simultaneously obtain the mapped target protocol data N2, and detect whether the corresponding channel M2→N2 is undergoing conversion. If the channel M2→N2 is not undergoing conversion, input the secondary marked protocol data M2 into the channel M2→N2 for mapping, and obtain the target protocol data N2;

[0084] If channel M2→N2 is undergoing conversion, the indirect conversion method corresponding to the shortest conversion time will be output, and the secondary mark protocol data will be mapped and converted according to the indirect conversion method to obtain the secondary target conversion protocol data. The secondary target protocol data will be reset and inserted into the position mark number in the primary mark protocol data to form complete primary target protocol data.

[0085] Z2. The indirect conversion output process of the secondary tag protocol data includes:

[0086] If the information channel corresponding to the secondary tag protocol data is working, the same steps as the conversion output process of the primary tag protocol data are adopted to output the conversion path n corresponding to the secondary tag protocol, or output the instruction to queue and wait for the corresponding information channel to complete the conversion.

[0087] Embodiment 1: The input protocol data is marked as first-level marked protocol data, and the type of the first-level marked protocol data is obtained as A. It is known that it needs to be converted into first-level target protocol data E. Then, the current state of channel A→E is first detected. If channel A→E is not currently performing conversion work, the first-level marked protocol data A is directly input into channel A→E and mapped into first-level target protocol data E, and the mapped target protocol data is output to the application layer; if channel A→E is currently performing conversion work, the current moment is taken as the starting point of the time axis, and the conversion time T is obtained according to the conversion rate of the channel and the waiting time. 转 =T MN +t MN =2min30s, and then traverse to obtain other indirect conversion methods, such as conversion path 1 is {A→B→C→E}, calculate the conversion time period T of {A→B} AB The waiting time period t of {A→B} is 00:25-00:50 AB is 00:00-00:25; the conversion time period T of {B→C} is calculated AB The waiting time period t is 00:50-01:30, {B→C} ABis 00:15-00:35; the conversion time period T of {C→E} is calculated AB The waiting time period t is 01:45-02:10, {C→E} AB 00:00-01:55; mark the above time period on the time axis to get a time range of 00:00-02:10, extract the endpoint moments of the two ends of the reimbursement boundary to get a new time period of 2min10s, then T1 is 2min10s; calculate T2 as 2min15s and T3 as 3min10s in turn; select conversion path 1 corresponding to T1 as the indirect conversion method, convert protocol data A into protocol data B, then convert protocol data B into protocol data C, and finally convert protocol data C into protocol data E, so that the first-level marked protocol data A can be converted into the first-level target protocol data E.

[0088] Embodiment 2: In the process of converting the primary marked protocol data A into the target protocol data E, if a protocol data packet that cannot be mapped appears therein, the protocol data packet is marked as the secondary marked protocol data M2, and the type of the secondary marked protocol data M2 is identified as the secondary marked protocol data C. At this time, the secondary marked protocol data C needs to be converted into the secondary protocol target E. First, the current state of the channel C→E is detected. If the channel C→E is not currently performing the conversion work, the secondary marked protocol data C is directly input into the channel C→E and mapped into the secondary target protocol data E. The mapped secondary target protocol data E is reset and inserted into the primary target protocol data E to form a complete primary target protocol data, and the target protocol data is output to the application layer; if the channel C→E is currently performing the conversion work, the method for planning the conversion method in Embodiment 1 is adopted, and the indirect conversion method corresponding to the shortest conversion time is output, and the secondary marked protocol data C is mapped into the secondary target protocol data E through the conversion path of the indirect conversion, and it is reset and inserted into the primary target protocol data E.

[0089] A protocol converter comprises a single chip microcomputer, and the single chip microcomputer is used for integrating the conversion system.

[0090] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A conversion system, characterized in that: The conversion system includes a communication interface module, a protocol conversion module, a marking module and a mapping mode planning module; The communication interface module is used to receive input protocol data, transmit the protocol data to the protocol conversion module, and send the target protocol data mapped by the protocol conversion module to the designated port; The protocol conversion module is used to map the input protocol data into target protocol data and transmit the target protocol data to the application layer; The marking module marks the protocol data, wherein the input protocol data is marked as first-level marked protocol data; Marking the protocol data packets that cannot be mapped in the primary marked protocol data as secondary marked protocol data, analyzing the protocol types of the primary marked protocol data and the secondary marked protocol data, and extracting the secondary marked protocol data; The mapping mode planning module obtains the corresponding information channel according to the type of the primary tag protocol data, analyzes the current state of the information channel, obtains the mode of mapping the primary tag protocol data, and maps the primary tag protocol data to the primary target protocol data; According to the secondary tag protocol data, the corresponding information channel is obtained, the current state of the information channel is analyzed, and the method of mapping the secondary tag protocol data is obtained. After the secondary tag protocol data is mapped to the secondary target protocol data, it is inserted into the initial position of the primary tag protocol data to form a complete primary target protocol data; The communication interface module includes an input port and an output port, the input port is used to receive input protocol data, and the output port is used to output the mapped target protocol data to the application layer; The protocol conversion module includes a transmission unit, a configuration unit, an encoding unit and a decoding unit; The transmission unit includes an information channel, and the information channel is used to convert input protocol data into target protocol data; The configuration unit obtains the type of the input protocol data and allocates the input protocol data to the corresponding information channel according to the conversion target; The encoding unit encodes the received protocol data and stores the encoded protocol data in the message area; The decoding unit decodes the protocol data in the message area and outputs it to the application layer; The transmission unit comprises: The information channel includes a plurality of channels M→N, wherein the channel M→N represents converting the protocol data M into the protocol data N; Acquire the type of protocol data to form a set L = {A, B, C, D, E}; wherein A, B, C, D, E represent the type of protocol data; M∈{A, B, C, D, E}; N∈{A, B, C, D, E}; and M≠N; The marking module includes a marking unit, a recognition unit and an extraction unit; The marking unit marks the input protocol data as first-level marked protocol data; marks the protocol data packets that cannot be mapped in the first-level marked protocol data as second-level marked protocol data; The identification unit identifies the types of the primary tag protocol data and the secondary tag protocol data; and uses the extraction unit to extract the secondary tag protocol data, and inserts a position mark number into the primary tag protocol data; The mapping mode planning module includes a primary planning unit and a secondary planning unit: The first-level planning unit includes: Obtain the primary marked protocol data M1 and the mapped target protocol data N1, and detect whether the corresponding channel M1→N1 is undergoing conversion. If the channel M1→N1 is not undergoing conversion, input the primary marked protocol data M1 into the channel M1→N1 for mapping to obtain the target protocol data N1; If the channel M1→N1 is converting, the indirect conversion method corresponding to the shortest conversion time is output, and the first-level tag protocol data is mapped and converted according to the indirect conversion method to obtain the first-level target protocol data; The secondary planning unit comprises: Acquire the secondary marked protocol data M2, and simultaneously obtain the mapped target protocol data N2, and detect whether the corresponding channel M2→N2 is undergoing conversion. If the channel M2→N2 is not undergoing conversion, input the secondary marked protocol data M2 into the channel M2→N2 for mapping, and obtain the target protocol data N2; If channel M2→N2 is undergoing conversion, the indirect conversion method corresponding to the shortest conversion time will be output, and the secondary mark protocol data will be mapped and converted according to the indirect conversion method to obtain the secondary target protocol data. The secondary target protocol data will be reset and inserted into the position mark number in the primary mark protocol data to form complete primary target protocol data.

2. A conversion system according to claim 1, characterized in that: The input port and the output port both include a ModBus interface, an RS485 interface, a CAN interface and an Ethernet interface.

3. A conversion system according to claim 1, characterized in that: The process of outputting the indirect conversion method corresponding to the shortest conversion time is: Z1. The indirect conversion output process of the first-level tag protocol data includes: If the channel M1→N1 corresponding to the primary tag protocol data is working, the conversion time of obtaining the primary tag protocol data and selecting the channel M1→N1 is T 转 , calculate T according to the formula 转 =T MN +t MN ; Among them, T MN represents the conversion time of converting the primary protocol data M1 into the primary target protocol data N1; t MN Indicates the time that the first-level tag protocol data waits for the channel M1→N1 to complete the current conversion work queue; The type of the first-level tag protocol data and the type of the first-level target protocol data are obtained, and all information channels are extracted at the same time. All conversion methods for converting the first-level tag protocol data into the type of the target protocol data are traversed to form a set U = {conversion path 1, conversion path 2 ... conversion path n}, and the conversion time of each conversion path is calculated to form a set T = {T1, T2 ... T n }, output the T with the shortest conversion time in the set T n ; If T n ≤T 转 , then get T n The corresponding conversion path n is used as a conversion method, and the conversion method is outputted so as to be used as an indirect conversion method for the primary tag protocol data, and the primary tag protocol data is converted into the primary target protocol data according to the conversion path n; If T n >T 转 , then the output queues and waits for the corresponding information channel to complete the conversion instruction, and the first-level target protocol data is obtained through the channel M1→N1 mapping; Z2. The indirect conversion output process of the secondary tag protocol data includes: If the information channel corresponding to the secondary tag protocol data is working, the same steps as the conversion output process of the primary tag protocol data are adopted to output the conversion path n corresponding to the secondary tag protocol data, or output the instruction to queue and wait for the corresponding information channel to complete the conversion.

4. A protocol converter, characterized in that: The protocol converter comprises a single chip microcomputer, and the single chip microcomputer is used to integrate the conversion system according to any one of claims 1 to 3.