Data processing method, protocol conversion card, system and storage medium

By determining the access path on the main device side, and abstracted into the equipment parameter pointer in the protocol conversion card, the problem of establishing an address mapping table occupying memory in the protocol conversion card, realizing the effect of reducing the memory occupation and increasing the response speed.

CN119342112APending Publication Date: 2025-01-21CHANGSHA SUNYE ELECTRIC CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310896565.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-20
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, the protocol conversion card occupies a large memory space when establishing an address mapping table, resulting in a large memory consumption.

Method used

After determining the access path on the main device side, after receiving the access path of the protocol conversion card, it abstracts it into the equipment parameter pointer, obtains the parameter address of the device through the analysis of the access path requested by the main device, and reads and write with the device for communication. Operation, return the result to the main device, no need to establish an address mapping table.

Benefits of technology

Reduces the memory footprint of the protocol conversion card and improves system stability and response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342112A_ABST
    Figure CN119342112A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, a protocol conversion card, a system and a storage medium, and the method comprises the steps: analyzing aperiodic object type message data sent by a main device, and obtaining an access path and a service type; determining a parameter address of the slave device according to the access path; the parameter address and the service type are sent to the slave device, so that the slave device executes operation corresponding to the service type based on the parameter address, the access path can be determined at the master device end, and after the protocol conversion card receives the access path, the access path is abstracted into a slave device parameter pointer. According to the protocol conversion card, the parameter address of the slave device is obtained by analyzing the access path requested by the master device, then communication with the slave device is performed to perform read-write operation, and the operation result is returned to the master device, so that an address mapping table does not need to be established, and the memory occupied space of the protocol conversion card is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial communications, and in particular to a data processing method, a protocol conversion card, a system and a storage medium. Background Art

[0002] Common Industrial Protocol (CIP) is a communication protocol used in industrial automation. As an application layer communication protocol of the protocol conversion card, it is used to realize data conversion between the master device and the slave device to achieve the effect of non-periodic communication. In the related technology, the manufacturer can customize an object class, establish an address mapping table in the protocol conversion card, abstract all the slave device parameters into data in the object class and save them in the memory of the protocol conversion card, and register the access path of the slave device parameters to the object class during initialization to access the parameters of the slave device. However, building an address mapping table in the protocol conversion card will occupy a large memory space and consume a lot of memory. Summary of the invention

[0003] The embodiments of the present application provide a data processing method, a protocol conversion card, a system and a storage medium, aiming to reduce the memory space occupied by the protocol conversion card.

[0004] The present application embodiment provides a data processing method, which is applied to a protocol conversion card, wherein one end of the protocol conversion card is connected to a master device and the other end is connected to a slave device. The data processing method includes:

[0005] Parse the message data of the non-periodic object class sent by the master device to obtain the access path and service type;

[0006] Determine a parameter address of a slave device according to the access path;

[0007] The parameter address and the service type are sent to the slave device, so that the slave device performs an operation corresponding to the service type based on the parameter address.

[0008] Optionally, the step of determining a parameter address of a slave device according to the access path includes:

[0009] Obtaining instance values ​​and attribute values ​​according to the access path;

[0010] When the instance value is within the instance value range and the attribute value is within the attribute value range, the instance value and the attribute value are converted into a parameter address of the slave device.

[0011] Optionally, after the step of sending the parameter address and the service type to the slave device, the method further includes:

[0012] Receive a response result corresponding to the operation performed by the slave device;

[0013] Converting the response result into message data of a non-periodic object class;

[0014] The converted message data of the non-periodic object class is fed back to the master device.

[0015] Optionally, the step of converting the response result into message data of a non-periodic object class includes:

[0016] When the response result is that the operation is successful, generating message data of the non-periodic object class according to the operation success status code;

[0017] When the response result is an operation failure, the message data of the non-periodic object class is generated according to the operation failure status code.

[0018] Optionally, before the step of parsing the message data of the aperiodic object class sent by the master device to obtain the access path and the service type, the method further includes:

[0019] Construct custom acyclic object class ranges;

[0020] And, register the read service callback function and the write service callback function;

[0021] and, set instance value range and set attribute value range.

[0022] The present application provides a data processing method, which is applied to a master device. The data processing method includes:

[0023] Determine custom acyclic object classes, service types, instance values, attribute values, and data;

[0024] The access path is obtained by combining the custom aperiodic object class, service type, instance value, attribute value and data;

[0025] According to the access path, message data of a non-periodic object class is generated, and the message data of the non-periodic object class is sent to a protocol conversion card.

[0026] Optionally, the step of determining the custom aperiodic object class, service type, instance value, attribute value and data includes:

[0027] Determine a custom acyclic object class based on the custom acyclic object class range, and register a service type in the custom acyclic object class;

[0028] Determining an instance value based on an instance value range, and determining an attribute value based on an attribute value range;

[0029] The data is determined according to a service code corresponding to the service type.

[0030] In addition, to achieve the above object, the present invention also provides a protocol conversion system, comprising:

[0031] A master device, configured to determine a custom aperiodic object class, a service code, an instance value, an attribute value, and data; obtain an access path by combining the custom aperiodic object class, the service code, the instance value, the attribute value, and the data; generate message data of the aperiodic object class according to the access path, and send the message data of the aperiodic object class to a protocol conversion card;

[0032] A protocol conversion card, the protocol conversion card is used to parse the message data of the non-periodic object class sent by the master device to obtain the access path and service type; determine the parameter address of the slave device according to the access path; and send the parameter address and the service type to the slave device;

[0033] A slave device performs an operation corresponding to the service type based on the parameter address.

[0034] In addition, to achieve the above-mentioned purpose, the present invention also provides a protocol conversion card comprising: a memory, a processor, and a data processing program stored in the memory and executable on the processor, wherein the steps of the above-mentioned data processing method are implemented when the data processing program is executed by the processor.

[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a data processing program, and when the data processing program is executed by a processor, the steps of the above-mentioned data processing method are implemented.

[0036] A technical solution of a data processing method, a protocol conversion card, a system and a storage medium provided in an embodiment of the present application first parses the message data of the non-periodic object class sent by the master device to obtain the access path and the service type; then determines the parameter address of the slave device according to the access path; finally, sends the parameter address and the service type to the slave device, so that the slave device performs the operation corresponding to the service type based on the parameter address. Compared with the problem that the existing technology requires setting an address mapping table in the protocol conversion card, which leads to a large memory footprint, the present application can determine the access path on the master device side, and after receiving the access path, the protocol conversion card abstracts the access path into a slave device parameter pointer. The parameter address of the slave device is obtained by parsing the access path requested by the master device, and then communicating with the slave device to perform read and write operations, and then the operation results are returned to the master device, without the need to establish an address mapping table, thereby reducing the memory footprint of the protocol conversion card. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a flowchart of a first embodiment of a data processing method of the present invention;

[0038] Figure 2 It is a flowchart of a second embodiment of a data processing method of the present invention;

[0039] Figure 3 It is a flowchart of a third embodiment of a data processing method of the present invention;

[0040] Figure 4 It is a structural schematic diagram of the protocol conversion card of the present invention.

[0041] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. The above-mentioned drawings are only an embodiment diagram, not the entire invention. DETAILED DESCRIPTION

[0042] At present, different communication protocols can be used for communication between the master device and the slave device. A protocol conversion card is set between the master device and the slave device to realize the protocol data conversion between the master device and the slave device, so as to realize the effect of non-periodic communication. In the related technology, the manufacturer can customize an object class, and by establishing an address mapping table in the protocol conversion card, all the slave device parameters are abstracted into data in the object class and stored in the memory of the protocol conversion card, and the access path of the slave device parameters is registered in the object class during initialization. The parameters in the slave device are accessed in a non-periodic manner through the combination of the specified service + object class + instance + attribute + data. Among them, the service represents the operation on the data, such as a read operation or a write operation, and the combination of the object class + instance + attribute is equivalent to an access path, through which the master device can access the corresponding parameters of the slave device. Generally, the instance is fixed to 1, the attribute 1 represents the first slave device parameter, and the attribute n represents the nth slave device parameter. When the protocol conversion card receives a read request or write request from a custom non-periodic object class, it will first determine whether the read request or write request is allowed. If it is allowed, it will then traverse the access path to see if it exists. If it exists, it will then perform address mapping conversion and convert it into the parameter address of the slave device to communicate with the slave device. After obtaining the operation result, it will convert the operation result into the communication format of the master device and return it to the master device, thus completing the communication process.

[0043] However, through analysis of the relevant technologies, the relevant technologies have the following defects:

[0044] First, the CIP standard application class has limitations. It can only access some parameters of the slave device, and it is impossible for the master device to access any parameters of the slave device through non-periodic communication. To address this problem, this application adds a custom non-periodic object class to enable the master device to access any parameters of the slave device. The custom non-periodic object class of this application can be any one of 100 to 127. The master device sends a read / write request to the protocol conversion card according to the specified combination path of the custom non-periodic object class, and can access any parameter of the slave device.

[0045] Second, building an address mapping table in the protocol conversion card will take up a large amount of memory space and consume a lot of memory. To address this problem, the present application can determine the access path on the master device side, and after receiving the access path, the protocol conversion card abstracts the access path into a slave device parameter pointer. The parameter address of the slave device is obtained by parsing the access path requested by the master device, and then communicating with the slave device to perform read and write operations, and then the operation results are returned to the master device. There is no need to establish an address mapping table, thereby reducing the memory space occupied by the protocol conversion card. Specifically, the present application registers read services and write services in the newly added custom non-periodic object class, and only specifies the value range of instances and attributes, and does not register the paths of instances and attributes, that is, avoids making address mapping tables, thereby reducing memory consumption.

[0046] Third, it is necessary to traverse the path to see if it exists. If it does, address mapping conversion is performed, which results in a longer non-periodic response time. To address this problem, when using non-periodic communication, the master device needs to send a request according to the specified rules, so that the protocol conversion card can parse the access path of the custom non-periodic object class + instance + attribute into a pointer, and the content pointed to is the parameter of the slave device. Thus, the protocol conversion card can access any parameter of the slave device without traversing the slave device parameters, which can shorten the non-periodic response. In addition, the increase in the parameters of the slave device does not affect the firmware of the protocol conversion card, thereby improving the stability of the system.

[0047] In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0048] First embodiment

[0049] like Figure 1As shown, in the first embodiment of the present application, the data processing method of the present application is applied to a protocol conversion card, which is used to convert different types of protocols so that the master device can communicate with the slave device. Among them, the corresponding communication method between the master device and the protocol conversion card can be RS485 communication, CAN communication or Ethernet communication, etc., and the corresponding communication method between the slave device and the protocol conversion card can be RS485 communication, CAN communication, Ethernet communication or SPI communication, etc. Since the corresponding communication methods between the master device and the protocol conversion card, and between the protocol conversion card and the slave device may be different, therefore, in order to achieve normal communication between the master device and the slave device, it is necessary to convert the data format of the master device into a data format that can be recognized by the slave device through the protocol conversion card. The data processing method of the present application comprises the following steps:

[0050] Step S110, parsing the message data of the non-periodic object class sent by the master device to obtain the access path and service type.

[0051] The non-periodic communication in this application is to communicate only when needed. The data of non-periodic communication is some data that does not need to be processed in real time, such as configuration data, alarm information, etc.

[0052] Optionally, the master device can be a host computer such as a computer, a mobile phone or other devices, or an embedded device or other devices. This application takes the master device as an example of a host computer. One end of the protocol conversion card is connected to the master device, and the other end is connected to the slave device. Optionally, a control application of the slave is installed on the host computer, and a configuration interface can be displayed on the host computer, and the access path of the slave is configured based on the configuration interface. The message data includes but is not limited to a custom non-periodic object class, a service type, an instance value, an attribute value and data. Among them, the service type includes a read type and a write type, and the service codes corresponding to different service types are different, and the data corresponding to different service types are different.

[0053] Optionally, when access to the slave is required, the access path can be configured in the configuration interface, and the access path is sent to the protocol conversion card in the form of a message. After receiving the message data of the non-periodic object class sent by the host, the protocol conversion card parses the message data of the non-periodic object class to obtain the access path.

[0054] Step S120: determining a parameter address of a slave device according to the access path.

[0055] Optionally, the access path is converted into a parameter address of the slave device for communication with the slave device. Specifically, the access path is abstracted into a pointer, and the content pointed to by the pointer is the parameter of the slave device. Optionally, the instance value and the attribute value are obtained according to the access path, and when the instance value is within the instance value range and the attribute value is within the attribute value range, the instance value and the attribute value are converted into the parameter address of the slave device.

[0056] Specifically, the present application does not check whether the instance value and the attribute value are registered in the custom non-periodic object class in the callback function. It only determines whether the instance value and the attribute value are within the corresponding value range, that is, whether the instance value is within the instance value range, and whether the attribute value is within the attribute value range. If the instance value is within the instance value range and the attribute value is within the attribute value range, the instance value and the attribute value are directly converted into the Modbus parameter address of the slave device or into the CANOPEN parameter address of the slave device, and converted into the communication protocol of the slave device together with the read service or the write service.

[0057] Step S130: sending the parameter address and the service type to the slave device, so that the slave device performs an operation corresponding to the service type based on the parameter address.

[0058] Optionally, the slave device of the present application may be a frequency converter to obtain other devices.

[0059] Optionally, after the access path is abstracted into a parameter address, the parameter address and the service type are sent to the slave device. Assuming that the current service type is a read service, the slave device reads the data on the parameter address when receiving the read service. Assuming that the current service type is a write service, the data is written to the parameter address of the slave device, so that the master device can read the data of the slave device or write the data to the slave device.

[0060] Optionally, after the step of sending the parameter address and the service type to the slave device, a response result corresponding to the operation performed by the slave device is received; the response result is converted into message data of the aperiodic object class; and the converted message data of the aperiodic object class is fed back to the master device. Specifically, after receiving the aperiodic read and write command from the protocol conversion card, the slave device performs a read and write operation on the corresponding address and returns the operation result to the protocol conversion card.

[0061] Optionally, when the response result is that the operation is successful, the message data of the non-periodic object class is generated according to the operation success status code; when the response result is that the operation fails, the message data of the non-periodic object class is generated according to the operation failure status code. The protocol conversion card is based on the result returned from the slave device. If successful, the operation success status code is OK, and if failed, the operation failure status code is a specific error code, such as error code. The operation success status code or the operation failure status code is converted into the message data of the non-periodic object class and returned to the main device. Assuming that the current communication mode is Ethernet, the operation success status code or the operation failure status code is converted into the message data of the non-periodic format adapted to the Ethernet communication mode and returned to the main device.

[0062] Optionally, the protocol conversion card detects whether the response result sent by the slave device is received; if so, the response result is converted into first non-periodic data, and the first non-periodic data is fed back to the master device; if not, it is determined whether the slave device has a response timeout according to the response duration of the response result, and if so, the response timeout result is converted into second non-periodic data, and the second non-periodic data is fed back to the master device, and if not, it returns to execute the detection of whether the response result sent by the slave device is received. If the slave device does not reply to the non-periodic command within the specified time, the protocol conversion card will convert the timeout result into message data in a non-periodic format, and return the timeout error code to the master device, so that the master device prompts the reply timeout.

[0063] Optionally, the present application creates a new custom non-periodic object class to implement non-periodic access of the master device to any parameter of the slave device. The custom non-periodic object class of the present application can be any one of 100 to 127. The master device sends a read / write request to the protocol conversion card according to the specified combination path of the custom non-periodic object class, and can access any parameter of the slave device. Optionally, only two services are registered in the initialization of the custom non-periodic object class, namely the method callback functions of the read service 0x0E and the write service 0x10, to implement the parsing and processing of the CIP application layer non-periodic message. Do not register the path from the device's parameters to the instance value + attribute value, that is, do not make an address mapping table, thereby reducing memory consumption.

[0064] Among them, the write service callback function of the write service 0x10 of this application is SetAttributeSingle(), and the read service callback function of the read service 0x0E is GetAttributeSingle().

[0065] According to the above technical solution, the present embodiment can determine the access path on the master device side. After receiving the access path, the protocol conversion card abstracts the access path into a slave device parameter pointer. The parameter address of the slave device is obtained by parsing the access path requested by the master device, and then communicating with the slave device to perform read and write operations, and then the operation results are returned to the master device. There is no need to establish an address mapping table, which reduces the memory space occupied by the protocol conversion card. Specifically, the present application registers read services and write services in the newly added custom non-periodic object class, and only specifies the value range of instances and attributes, and does not register the paths of instances and attributes, that is, avoids making address mapping tables, thereby reducing memory consumption.

[0066] Second embodiment

[0067] Reference Figure 2 In a second embodiment of the present application, the data processing method of the present application is applied to a master device, and the data processing method comprises the following steps:

[0068] Step S210, determining the custom aperiodic object class, service type, instance value, attribute value and data.

[0069] Optionally, the value range of the user-defined non-periodic object class is 100 to 127. The service type includes a read type or a write type. Each service type has a corresponding service code.

[0070] Optionally, based on the range of the custom non-periodic object class, a custom non-periodic object class can be determined, and a service type can be registered in the custom non-periodic object class; the instance value can be determined based on the instance value range, and the attribute value can be determined based on the attribute value range; and the data can be determined according to the service code corresponding to the service type.

[0071] For example, in an application scenario using Ethernet communication, when the master device performs aperiodic reading and writing of the slave station modbus address to the slave device by means of service code + object class + instance value + attribute value + data value, the service code 0x0E indicates a read service, i.e., reading a slave device parameter, and the service code 0x10 indicates a write service, i.e., writing a parameter to the slave device, and the value range of the custom aperiodic object class is 100 to 127. In this embodiment, the custom aperiodic object class is 100, the instance value is fixed to 0, the attribute value is the function code address of the slave device to be accessed, when the service code is 0x0E, the data value is 0, and when the service code is 0x10, the data value is the parameter value to be written.

[0072] For example, in an application scenario using Ethernet communication, when the master device performs non-periodic reading and writing of the slave station canopen address to the slave device by means of service code + object class + instance value + attribute value + data value, the service code 0x0E indicates a read service, i.e., reading a slave device parameter, and the service code 0x10 indicates a write service, i.e., writing a parameter to the slave device, and the object class is a custom class range of 100 to 127. In this embodiment, the custom non-periodic object class used is 100, the instance value is the index address of the slave device, the attribute value is the sub-index address of the slave device, when the service code is 0x0E, the data value is 0, and when the service code is 0x10, the data value is the parameter value to be written.

[0073] Step S220, combining the custom aperiodic object class, service type, instance value, attribute value and data to obtain an access path.

[0074] Optionally, a control application of the slave is installed on the host computer, and a configuration interface can be displayed on the host computer, and the access path of the slave can be configured based on the configuration interface. The message data includes but is not limited to a custom non-periodic object class, service type, instance value, attribute value and data. After configuring the above-mentioned related parameters, the access path can be obtained.

[0075] Step S230: Generate message data of a non-periodic object class according to the access path, and send the message data of the non-periodic object class to a protocol conversion card.

[0076] Optionally, after obtaining the access path, encapsulate the access path to obtain the message data of the non-periodic object class, and send the encapsulated message data of the non-periodic object class to the protocol conversion card. After receiving the message data of the non-periodic object class, the protocol conversion card parses the message data of the non-periodic object class sent by the master device to obtain the access path and service type; determines the parameter address of the slave device according to the access path; and sends the parameter address and the service type to the slave device. The slave device receives the parameter address and service type sent by the protocol conversion card; performs the operation corresponding to the service type based on the parameter address and obtains a response result; and forwards the response result to the protocol conversion card.

[0077] Optionally, the master device can also obtain the operating data of the slave device, so as to monitor the operating status of the slave device. The operating data of the slave device can be operating temperature, operating speed or other. Alternatively, the slave device can feed back the operating data to the master device in real time, so that the master device can monitor the operating status of the slave device in real time and re-determine the corresponding read and write parameters according to the operating status of the slave device.

[0078] This application adds a custom non-periodic object class and specially designs the object class read and write service to avoid instantiation of each parameter in the object class, only specifies the value range of instance value and attribute value, and then abstracts it into a slave device parameter pointer through the combined path of object class + instance value + attribute value. In this way, the parameter address of the slave device can be obtained by parsing the combined path requested by the master device, and then communicate with the slave device to perform read and write operations, and then return the operation results to the master device.

[0079] Third embodiment

[0080] Reference Figure 3 In the third embodiment of the present application, the data processing method of the present application is applied to a slave device, and the data processing method comprises the following steps:

[0081] Step S310: receiving the parameter address and service type sent by the protocol conversion card.

[0082] Optionally, the type of the parameter address may be a modbus address or a canopen address. The service type may be a read service or a write service.

[0083] Step S320: Execute the operation corresponding to the service type based on the parameter address and obtain a response result.

[0084] Optionally, executing the operation corresponding to the service type based on the parameter address includes: when the service type is a read type, executing the read operation corresponding to the read type based on the parameter address to read the non-periodic data corresponding to the parameter address; when the service type is a write type, obtaining the data to be written corresponding to the parameter address of the slave device, and executing the write operation corresponding to the write type based on the parameter address to write the data to be written into the parameter address.

[0085] Step S330: forward the response result to the protocol conversion card.

[0086] Optionally, after reading data or writing data, a response result of a response will be generated. For example, read success, read failure, write success, write failure. The response result will be forwarded to the protocol conversion card. The protocol conversion card receives the response result corresponding to the operation performed by the slave device; converts the response result into message data of the non-periodic object class; and feeds back the converted message data of the non-periodic object class to the master device, so that the master device prompts the read and write results.

[0087] The embodiments of the present invention provide embodiments of data processing methods. It should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0088] The present application provides a protocol conversion system, comprising:

[0089] A main device is used to determine a custom non-periodic object class, service code, instance value, attribute value and data; obtain an access path by combining the custom non-periodic object class, service code, instance value, attribute value and data; generate message data of the non-periodic object class according to the access path, and send the message data of the non-periodic object class to a protocol conversion card.

[0090] Optionally, the main device is also used to determine a custom non-periodic object class based on a custom non-periodic object class range, and register a service type in the custom non-periodic object class; determine an instance value based on an instance value range, and determine an attribute value based on an attribute value range; and determine the data according to a service code corresponding to the service type.

[0091] The slave device is used to receive the parameter address and the service type sent by the protocol conversion card; perform the operation corresponding to the service type based on the parameter address and obtain a response result; and forward the response result to the protocol conversion card.

[0092] Optionally, the slave device is also used to, when the service type is a read type, perform a read operation corresponding to the read type based on the parameter address to read the non-periodic data corresponding to the parameter address; when the service type is a write type, obtain the data to be written corresponding to the parameter address of the slave device, and perform a write operation corresponding to the write type based on the parameter address to write the data to be written into the parameter address.

[0093] A protocol conversion card is used to parse the message data of the non-periodic object class sent by the master device to obtain the access path and the service type; determine the parameter address of the slave device according to the access path; and send the parameter address and the service type to the slave device so that the slave device performs the operation corresponding to the service type based on the parameter address.

[0094] Optionally, the protocol conversion card is further used to obtain an instance value and an attribute value according to the access path; when the instance value is within an instance value range and the attribute value is within an attribute value range, convert the instance value and the attribute value into a parameter address of the slave device.

[0095] Optionally, the protocol conversion card is further used to receive a response result corresponding to the operation performed by the slave device; convert the response result into message data of a non-periodic object class; and feed back the converted message data of the non-periodic object class to the master device.

[0096] Optionally, the protocol conversion card is further used to generate message data of the non-periodic object class according to the operation success status code when the response result is an operation success; and to generate message data of the non-periodic object class according to the operation failure status code when the response result is an operation failure.

[0097] The specific implementation of the protocol conversion system of the present invention is basically the same as the various embodiments of the above-mentioned data processing method, and will not be repeated here.

[0098] like Figure 4 As shown, Figure 4 It is a structural diagram of the hardware operating environment corresponding to the protocol conversion card involved in the embodiment of the present invention.

[0099] In this embodiment, the protocol conversion card includes: a memory 1002, a processor 1001, and a data processing program stored in the memory and executable on the processor, wherein:

[0100] When the processor 1001 calls the data processing program stored in the memory 1002, the following operations are performed:

[0101] Parse the message data of the non-periodic object class sent by the master device to obtain the access path and service type;

[0102] Determine a parameter address of a slave device according to the access path;

[0103] The parameter address and the service type are sent to the slave device, so that the slave device performs an operation corresponding to the service type based on the parameter address.

[0104] When the processor 1001 calls the data processing program stored in the memory 1002, it also performs the following operations:

[0105] Obtaining instance values ​​and attribute values ​​according to the access path;

[0106] When the instance value is within the instance value range and the attribute value is within the attribute value range, the instance value and the attribute value are converted into a parameter address of the slave device.

[0107] When the processor 1001 calls the data processing program stored in the memory 1002, it also performs the following operations:

[0108] Receive a response result corresponding to the operation performed by the slave device;

[0109] Converting the response result into message data of a non-periodic object class;

[0110] The converted message data of the non-periodic object class is fed back to the master device.

[0111] When the processor 1001 calls the data processing program stored in the memory 1002, it also performs the following operations:

[0112] When the response result is that the operation is successful, generating message data of the non-periodic object class according to the operation success status code;

[0113] When the response result is an operation failure, the message data of the non-periodic object class is generated according to the operation failure status code.

[0114] When the processor 1001 calls the data processing program stored in the memory 1002, it also performs the following operations:

[0115] Construct custom acyclic object class ranges;

[0116] And, register the read service callback function and the write service callback function;

[0117] and, set instance value range and set attribute value range.

[0118] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a data processing program. When the data processing program is executed by a processor, it implements the various steps of the data processing method described above and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0119] Since the storage medium provided in the embodiments of the present application is the storage medium used to implement the method of the embodiments of the present application, based on the method introduced in the embodiments of the present application, the person skilled in the art can understand the specific structure and deformation of the storage medium, so it is not repeated here. All storage media used in the methods of the embodiments of the present application belong to the scope of protection of this application.

[0120] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0121] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0122] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, TV, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0123] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A data processing method, characterized in that: Applied to a protocol conversion card, one end of the protocol conversion card is connected to a master device, and the other end is connected to a slave device, the data processing method comprises: Parse the message data of the non-periodic object class sent by the master device to obtain the access path and service type; Determine a parameter address of a slave device according to the access path; The parameter address and the service type are sent to the slave device, so that the slave device performs an operation corresponding to the service type based on the parameter address.

2. The data processing method according to claim 1, characterized in that: The step of determining the parameter address of the slave device according to the access path comprises: Obtaining instance values ​​and attribute values ​​according to the access path; When the instance value is within the instance value range and the attribute value is within the attribute value range, the instance value and the attribute value are converted into a parameter address of the slave device.

3. The data processing method according to claim 1, characterized in that: After the step of sending the parameter address and the service type to the slave device, the method further includes: Receive a response result corresponding to the operation performed by the slave device; Converting the response result into message data of a non-periodic object class; The converted message data of the non-periodic object class is fed back to the master device.

4. The data processing method according to claim 3, characterized in that: The step of converting the response result into message data of a non-periodic object class comprises: When the response result is that the operation is successful, generating message data of the non-periodic object class according to the operation success status code; When the response result is an operation failure, the message data of the non-periodic object class is generated according to the operation failure status code.

5. The data processing method according to claim 1, characterized in that: Before the step of parsing the message data of the non-periodic object class sent by the master device to obtain the access path and service type, the step further includes: Construct custom acyclic object class ranges; And, register the read service callback function and the write service callback function; and, set instance value range and set attribute value range.

6. A data processing method, characterized in that: Applied to a master device, the data processing method includes: Determine custom acyclic object classes, service types, instance values, attribute values, and data; The access path is obtained by combining the custom aperiodic object class, service type, instance value, attribute value and data; According to the access path, message data of a non-periodic object class is generated, and the message data of the non-periodic object class is sent to a protocol conversion card.

7. The data processing method according to claim 6, characterized in that: The step of determining the custom aperiodic object class, service type, instance value, attribute value and data comprises: Determine a custom acyclic object class based on the custom acyclic object class range, and register a service type in the custom acyclic object class; Determining an instance value based on an instance value range, and determining an attribute value based on an attribute value range; The data is determined according to a service code corresponding to the service type.

8. A protocol conversion card, characterized in that: Implement the steps of the data processing method as described in any one of claims 1 to 5.

9. A protocol conversion system, characterized in that: The protocol conversion system comprises: A master device, configured to determine a custom aperiodic object class, a service code, an instance value, an attribute value, and data; obtain an access path by combining the custom aperiodic object class, the service code, the instance value, the attribute value, and the data; generate message data of the aperiodic object class according to the access path, and send the message data of the aperiodic object class to a protocol conversion card; A protocol conversion card, the protocol conversion card is used to parse the message data of the non-periodic object class sent by the master device to obtain the access path and service type; determine the parameter address of the slave device according to the access path; and send the parameter address and the service type to the slave device; A slave device performs an operation corresponding to the service type based on the parameter address.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a data processing program, and when the data processing program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.