CN116233272A - NC-Link-based multi-source heterogeneous device protocol conversion method - Google Patents
NC-Link-based multi-source heterogeneous device protocol conversion method Download PDFInfo
- Publication number
- CN116233272A CN116233272A CN202310245657.3A CN202310245657A CN116233272A CN 116233272 A CN116233272 A CN 116233272A CN 202310245657 A CN202310245657 A CN 202310245657A CN 116233272 A CN116233272 A CN 116233272A
- Authority
- CN
- China
- Prior art keywords
- protocol
- link
- converted
- model
- data packet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/26—Special purpose or proprietary protocols or architectures
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Communication Control (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a multi-source heterogeneous device protocol conversion method based on NC-Link, which comprises the following steps: acquiring a protocol data packet to be converted corresponding to a protocol to be converted; and converting the protocol data packet to be converted in the protocol conversion into an NC-Link protocol data packet according to the improved NC-Link protocol model, wherein the protocol data conversion relation is included in the NC-Link protocol model after the protocol conversion is improved. According to the invention, the protocol data packet to be converted is converted into the NC-Link protocol data packet according to the NC-Link protocol model after the protocol data conversion relation is improved by acquiring the protocol data packet to be converted corresponding to the protocol to be converted, so that the conversion of other protocol data packets into the NC-Link protocol data packet is realized, the data loss is avoided, and the interoperability between protocols is improved.
Description
Technical Field
The invention relates to the technical field of interconnection of numerical control equipment, in particular to a multi-source heterogeneous equipment protocol conversion method based on NC-Link.
Background
With the development of the technology of the Internet of things, intelligent manufacturing becomes a great weight of the industrial 4.0 strategy. The construction of intelligent factories requires the interconnection and intercommunication of numerical control equipment. The interconnection protocol of the numerical control equipment is used as a protocol for realizing interconnection and interworking among different numerical control equipment, and is a key for realizing industrial intelligent manufacturing. Currently, the mainstream interconnection protocols of the numerical control devices include foreign interconnection communication (MT-Connect) protocols and unified architecture (Open Platform Communications Unified Architecture, OPC UA) protocols of open platform communication, and NC-Link protocols of numerical control equipment industry in china.
The NC-Link protocol adaptation and the security related technology have certain achievements, and basically realize the adaptation mode of converting the original data of the equipment into NC-Link protocol data. However, each large numerical control equipment manufacturer only supports own proprietary protocol standard, so in a modern intelligent factory, different kinds of numerical control equipment of different manufacturers may support different numerical control protocols respectively. The other protocols cannot be converted into NC-Link protocols temporarily, and if the existing adaptation method is directly applied to the other protocols, data may be lost.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a multi-source heterogeneous device protocol conversion method based on NC-Link, which aims to solve the technical problem that other protocols cannot be converted into NC-Link protocols in the prior art, and data loss can be caused by direct conversion.
In order to achieve the above purpose, the present invention provides a multi-source heterogeneous device protocol conversion method based on NC-Link, the method comprises the following steps:
acquiring a protocol data packet to be converted corresponding to a protocol to be converted;
and converting the protocol data packet to be converted into an NC-Link protocol data packet according to an improved NC-Link protocol model, wherein the improved NC-Link protocol model comprises a protocol data conversion relation.
Optionally, before the obtaining the protocol data packet to be converted corresponding to the protocol to be converted, the method further includes:
identifying the characteristics of the data packet of the protocol to be converted;
constructing a protocol data mapping relation between the protocol to be converted and the NC-Link protocol according to the identification result;
and constructing an improved NC-Link protocol model based on the protocol data mapping relation.
Optionally, the constructing a protocol data mapping relationship between the protocol to be converted and the NC-Link protocol according to the identification result includes:
constructing a node mapping relation and a function mapping relation between the protocol to be converted and the NC-Link protocol according to the identification result;
and determining a protocol data mapping relation between the protocol to be converted and the NC-Link protocol according to the node mapping relation and the function mapping relation.
Optionally, the constructing an improved NC-Link protocol model based on the protocol data mapping relationship includes:
constructing an initial NC-Link model based on a preset NC-Link model;
and constructing an improved NC-Link protocol model according to the protocol data mapping relation and the initial NC-Link model.
Optionally, before the obtaining the protocol data packet to be converted corresponding to the protocol to be converted, the method further includes:
determining a connection establishment mode through the improved NC-Link protocol model;
establishing connection with a server corresponding to a protocol to be converted based on the connection establishment mode;
correspondingly, the obtaining the protocol data packet to be converted corresponding to the protocol to be converted includes:
and acquiring a protocol data packet to be converted corresponding to the protocol to be converted through the connection.
Optionally, the determining the connection establishment mode through the modified NC-Link protocol model includes:
determining the protocol to be converted and a server address corresponding to the protocol to be converted according to protocol parameters of a method object of the improved NC-Link protocol model;
and determining a connection establishment mode according to the protocol to be converted and the server address corresponding to the protocol to be converted.
Optionally, the determining the connection establishment manner according to the protocol to be converted and the server address corresponding to the protocol to be converted includes:
determining request authentication information according to the protocol to be converted;
and determining a connection establishment mode according to the request authentication information, the protocol to be converted and a server address corresponding to the protocol to be converted, so that the server can select a corresponding security policy according to the connection establishment mode to perform identity authentication.
In addition, in order to achieve the above purpose, the present invention also provides a multi-source heterogeneous device protocol conversion device based on NC-Link, the device comprises:
the data acquisition module is used for acquiring a protocol data packet to be converted corresponding to the protocol to be converted;
the protocol conversion module is used for converting the protocol data packet to be converted into an NC-Link protocol data packet according to an improved NC-Link protocol model, wherein the improved NC-Link protocol model comprises a protocol data conversion relation.
In addition, in order to achieve the above purpose, the present invention also provides a multi-source heterogeneous device protocol conversion device based on NC-Link, the device comprises: the NC-Link based multi-source heterogeneous device protocol conversion program comprises a memory, a processor and an NC-Link based multi-source heterogeneous device protocol conversion program which is stored on the memory and can run on the processor, wherein the NC-Link based multi-source heterogeneous device protocol conversion program is configured to realize the steps of the NC-Link based multi-source heterogeneous device protocol conversion method.
In addition, in order to achieve the above object, the present invention also proposes a storage medium having stored thereon an NC-Link based multi-source heterogeneous device protocol conversion program which, when executed by a processor, implements the steps of the NC-Link based multi-source heterogeneous device protocol conversion method as described above.
The method comprises the steps of obtaining a protocol data packet to be converted corresponding to a protocol to be converted; and converting the protocol data packet to be converted into an NC-Link protocol data packet according to the improved NC-Link protocol model, wherein the improved NC-Link protocol model comprises a protocol data conversion relation. According to the invention, the to-be-converted protocol data packet is converted into the NC-Link protocol data packet according to the NC-Link protocol model after the protocol data conversion relation is improved by acquiring the to-be-converted protocol data packet corresponding to the to-be-converted protocol, so that the conversion of other protocol data packets into the NC-Link protocol data packet is realized, the data loss is avoided, and the interoperability between protocols is improved.
Drawings
FIG. 1 is a schematic structural diagram of an NC-Link-based multi-source heterogeneous device protocol conversion device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of a protocol conversion method of a multi-source heterogeneous device based on NC-Link;
FIG. 3 is a schematic flow chart of a second embodiment of a protocol conversion method of a multi-source heterogeneous device based on NC-Link;
FIG. 4 is a schematic diagram of a new protocol parameter of the NC-Link based multi-source heterogeneous device protocol conversion method of the present invention;
FIG. 5 is an exemplary diagram of the method for converting multisource heterogeneous device protocol based on NC-Link according to the present invention;
FIG. 6 is a schematic diagram of a new data type parameter added to the NC-Link based multi-source heterogeneous device protocol conversion method of the present invention;
FIG. 7 is an exemplary diagram of data type parameters of a NC-Link based multi-source heterogeneous device protocol conversion method according to the present invention;
FIG. 8 is an exemplary diagram of special identification parameters of a NC-Link based multi-source heterogeneous device protocol conversion method of the present invention;
FIG. 9 is a schematic flow chart of a third embodiment of a protocol conversion method of a multi-source heterogeneous device based on NC-Link;
FIG. 10 is a flow chart of the protocol conversion of the NC-Link protocol model after the improvement of the NC-Link based multi-source heterogeneous device protocol conversion method of the invention;
fig. 11 is a block diagram of a first embodiment of a NC-Link based multi-source heterogeneous device protocol conversion apparatus according to the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an NC-Link-based multi-source heterogeneous device protocol conversion device in a hardware operation environment according to an embodiment of the present invention.
As shown in fig. 1, the NC-Link based multi-source heterogeneous device protocol conversion device may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the architecture shown in fig. 1 does not constitute a limitation of NC-Link based multi-source heterogeneous device protocol conversion devices, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and an NC-Link based multi-source heterogeneous device protocol conversion program may be included in a memory 1005 as one storage medium.
In the NC-Link based multi-source heterogeneous device protocol conversion device shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the NC-Link based multi-source heterogeneous device protocol conversion device of the present invention may be disposed in the NC-Link based multi-source heterogeneous device protocol conversion device, and the NC-Link based multi-source heterogeneous device protocol conversion device invokes the NC-Link based multi-source heterogeneous device protocol conversion program stored in the memory 1005 through the processor 1001, and executes the NC-Link based multi-source heterogeneous device protocol conversion method provided by the embodiment of the present invention.
The embodiment of the invention provides a multi-source heterogeneous device protocol conversion method based on NC-Link, and referring to FIG. 2, FIG. 2 is a flow chart of a first embodiment of the multi-source heterogeneous device protocol conversion method based on NC-Link.
In this embodiment, the method for converting the multi-source heterogeneous device protocol based on NC-Link includes the following steps:
step S10: and acquiring a protocol data packet to be converted corresponding to the protocol to be converted.
It should be noted that, the execution body of the method of the embodiment may be a computing service device with functions of data processing, network communication and program running, such as a mobile phone, a tablet computer, a server device, etc.; the NC-Link adapter device can also be the NC-Link based multi-source heterogeneous device protocol conversion with the same or similar functions. This embodiment and the following embodiments will be described by taking NC-Link adapter as an example.
It should be noted that the protocol to be converted may be MT-Connect protocol or OPC UA protocol, or other interconnection protocols of numerical control devices other than NC-Link protocol, which is not limited herein.
It may be understood that the protocol data packet to be converted may be a data packet encapsulated in a data format of the protocol to be converted, and the data packet may be a model data packet describing all or part of node data of the numerical control device corresponding to the protocol to be converted.
Taking the MT-Connect protocol as an example, the MT-Connect protocol packet may be a model packet describing the numerical control device corresponding to the MT-Connect protocol by using the extensible markup language 11ML (E11 tensible Markup Language). The 11ML language is mainly divided into a Header element and a device element, wherein the Header element is a description Header of an 11ML data packet and is used for recording basic information such as creation time, version number, execution standard and the like of the data packet; the Devices element contains one or more Devices elements, which are used to describe Device information, and is composed of four sub-elements such as Components, dataItems. The Components element is used for describing the structure information of the numerical control equipment, and the corresponding Components element is included according to the number of Components of the numerical control equipment to be described. The Component element is used for representing the components of the device, and the number and types of the sub-elements contained in the Component element are different according to the types of the components. MT-Connect makes unified specification on the types, semantics and sub-elements contained in the Component elements by adopting a mode of making a data dictionary. The DataItems are used for representing data that can be acquired by the device and its components, and can be further divided into sampling data (Sample), events (Event) and conditions (Condition) according to the data types. Modeling the digital control equipment by adopting unified grammar and structure to form a model data packet corresponding to the MT-Connect protocol.
Taking OPC UA protocol as an example, an OPC UA protocol packet may be a packet describing a numerical control device by using an object-oriented technique. The protocol maps the numerical control equipment into a corresponding object model, wherein the object model consists of a variable, a method and an event, and an OPC UA protocol data packet is formed by the object model. The variable is used for recording current or historical data of the numerical control equipment, the method is used for controlling the numerical control equipment, and the event is used for alarming abnormal states of the numerical control equipment. In the OPC UA protocol, objects are formed of nodes, and the nodes are connected by references (references) to form a mesh structure, and the network formed by this connection is also called an address space (address space). When the OPC UA client needs to acquire the data of the designated component or node of the numerical control equipment, a request is sent to the OPC UA server, the OPC UA server searches from top to bottom from the initial node of the address space, the designated node of the OPC UA client is found, and information is returned and sent to the OPC UA client by taking the node as a unit. The OPC UA protocol converts the numerical control device model into the operation of the node address space, so that a unified data structure and transmission mode can be adopted to operate the numerical control device.
It may be understood that the obtaining the protocol data packet to be converted may be by sending a request to a server corresponding to the protocol to be converted, so that the server corresponding to the protocol to be converted feeds back the protocol data packet to be converted. Or subscribing the designated node of the numerical control device to the server corresponding to the protocol to be converted through the message subscription and publishing technology, so that the server corresponding to the protocol to be converted publishes the protocol data packet to be converted comprising the data of the designated node.
Step S20: and converting the protocol data packet to be converted into an NC-Link protocol data packet according to an improved NC-Link protocol model, wherein the improved NC-Link protocol model comprises a protocol data conversion relation.
It can be understood that the NC-Link protocol is a numerical control equipment industry interconnection communication protocol developed and customized by the chinese machine tool industry association, and the protocol comprehensively uses the characteristics of MT-Connect and OPC UA, and is a bidirectional control protocol capable of reading data of a numerical control device and controlling the numerical control device. In the definition of the numerical control equipment model, the NC-Link refers to a method for hierarchically describing the numerical control equipment by MT-Connect, and establishes a definition specification of the numerical control equipment model. Unlike MT-Connect, NC-Link uses JSON format to describe digital devices. When describing the numerical control equipment and the components thereof, the NC-Link equipment model definition file is simpler and the volume is smaller because the start and end labels do not need to be added. In addition, in the data acquisition, the corresponding message returned by the NC-Link only contains the content of the queried data item, and does not return an 11ML document like MT-Connect. The NC-Link has smaller bandwidth pressure to the system when data transmission is carried out, and the real-time performance of the system is improved. NC-Link uses OPC UA as a reference in a communication mechanism, and adopts a communication mode of combining Publish/Subscribe (Publish/Subscribe) and Request/Response (Request/Response). The interface in NC-Link protocol accomplishes the corresponding task through the communication mode. In the NC-Link protocol, there are 4 common interfaces, namely model detection, data query, data distribution and data sampling. The model detection interface is used for acquiring a model file of the appointed numerical control equipment, the data query interface is used for querying the current value of the appointed data item, the data issuing interface is used for setting the value of the appointed data item, and the data sampling interface is used for continuously acquiring data of the appointed sampling channel. The NC-Link makes unified specification for the instruction names and the parameter formats of the interfaces, so that manufacturers can develop NC-Link application systems more conveniently and quickly, and the development difficulty of industrial intelligent application is reduced.
It is worth to say that, the NC-Link protocol model after improvement may be an initial model constructed based on the numerical control device model definition specification of the NC-Link protocol, then the protocol data packet to be converted is parsed, the description of the numerical control device is mapped to the initial model according to the description of the protocol data packet to be converted, and because the data storage formats of different protocols are different, the protocol data conversion relationship is established according to the one-to-one correspondence of the objects or attributes representing similar meanings in different formats, and the NC-Link protocol model after improvement is generated according to the protocol data conversion relationship.
It can be understood that the conversion of the protocol data packet to be converted into the NC-Link protocol data packet according to the modified NC-Link protocol model may be the conversion of the protocol data packet to be converted into the data packet conforming to the NC-Link protocol data format according to the protocol data conversion relationship.
In a first embodiment, a protocol data packet to be converted corresponding to a protocol to be converted is disclosed; and converting the protocol data packet to be converted into an NC-Link protocol data packet according to the improved NC-Link protocol model, wherein the improved NC-Link protocol model comprises a protocol data conversion relation. According to the embodiment, the to-be-converted protocol data packet is converted into the NC-Link protocol data packet according to the NC-Link protocol model after the improvement of the protocol data conversion relation by acquiring the to-be-converted protocol data packet corresponding to the to-be-converted protocol, so that the conversion of other protocol data packets into the NC-Link protocol data packet is realized, data loss is avoided, and the interoperability between protocols is improved.
Referring to fig. 3, fig. 3 is a flow chart of a second embodiment of the NC-Link based multi-source heterogeneous device protocol conversion method according to the present invention.
Further, before obtaining a to-be-converted protocol data packet corresponding to the to-be-converted protocol, an improved NC-Link protocol model needs to be constructed according to node data of numerical control equipment of the to-be-converted protocol. Therefore, based on the first embodiment, the present embodiment further includes, before the step S10:
step S01: and identifying the characteristics of the data packet of the protocol to be converted.
It will be appreciated that the packet characteristics may be characteristics identifying the protocol type of the packet of the current protocol to be converted, and the packet characteristics may be identified according to the characteristics of the structured data of the protocol to be converted. For example, the header portion of an 11ml data packet of the MT-Connect protocol records information such as creation time, version number, execution standard, etc. of the data packet, and an endpoint connected when the OPC UA protocol server starts a service identifies information of the OPC UA service, etc., and the protocol type to which the current data packet belongs can be obtained by identifying the above features.
Step S02: and constructing a protocol data mapping relation between the protocol to be converted and the NC-Link protocol according to the identification result.
It can be understood that the identification result may be a protocol type to which the data packet of the protocol to be converted belongs, and after determining the protocol type of the data packet, the protocol data mapping relationship may be constructed by performing one-to-one mapping according to the data format of the protocol to be converted and the data format of the NC-Link protocol. For example, the NC-Link protocol model may describe a numerical control Device in a json object format, and may be composed of a Device object, a data object, a sampling channel object, and a method object, and if the identified protocol is the MT-Connect protocol, the format of a data packet of the protocol to be converted is in a format of 11ML language, and includes a Header and Devices part, where the Devices part includes a plurality of Device elements for describing information of the numerical control Device, each of the Device elements is composed of four sub-elements such as Components, dataItems for describing detailed data of each node of the numerical control Device. Then, the protocol data mapping relationship may be that each field in the data structure of the MT-Connect protocol corresponds to a specified field in the data structure of the NC-Link protocol, and specifically, the mapping relationship between the fields may be set according to the similarity of meanings in the data structures of the NC-Link protocol and the protocol to be converted, which is not limited herein.
Further, in order to make the mapping relation of the converted protocol data more accurate and improve the reliability of the improved NC-Link protocol model, the step S02 includes: constructing a node mapping relation and a function mapping relation between the protocol to be converted and the NC-Link protocol according to the identification result; and determining a protocol data mapping relation between the protocol to be converted and the NC-Link protocol according to the node mapping relation and the function mapping relation.
It will be appreciated that the nodes may be individual components of a numerically controlled device, such as a plurality of cutters, drills, baffles, etc. on a numerically controlled machine. The description of the nodes by the data structure in the data packet may include the node identifier, the node name, the data type of the node, whether the attributes can be changed, and because the data structure described by different protocols for the nodes is different, the mapping relationship between the to-be-converted protocol and the attribute with similar meaning in the data structure of the NC-Link protocol may be established according to the meaning of each attribute of the data structure, and may be that a plurality of fields of the to-be-converted protocol are mapped into one or a plurality of designated fields of the NC-Link protocol, i.e. the node mapping relationship is formed.
It should be understood that after the node of the protocol to be converted is mapped to the node of the NC-Link protocol according to the node mapping relationship, operations such as reading and writing may be performed on the converted node, so that a function of reading and writing corresponding to the converted node may be constructed, that is, the constructed function and the node of the protocol to be converted form a corresponding function mapping relationship.
Further, in order to construct a more complete modified NC-Link protocol model, the step S02 further includes: constructing an initial NC-Link model based on a preset NC-Link model; and constructing an improved NC-Link protocol model according to the protocol data mapping relation and the initial NC-Link model.
It can be appreciated that the preset NC-Link model may be a model customized by a developer according to NC-Link protocol numerical control device model specifications. The description may be in the format of JSON objects, including root objects, device objects, component objects, data objects, sampling channel objects, and method objects.
The root objects configs are arrays of data objects or method objects, describe a plurality of configuration information of the root objects, are the outermost layer objects of a preset NC-Link model, and describe a plurality of configuration information of the root objects. For example, method objects to describe the manner in which numerical control machine tool data:
{ "id": "METHOD001", "name": "ftpcall", "type": "METHOD", "description": "," args ": {" protocol ":" FTP "," address ":"10.10.565.1.21"," user ":" user111"," password ":"1111 "}. The device object is used to describe the configuration, components and available data items of the numerically controlled machine tool or its accessories. Component objects are used to describe component information in a device object, which may contain other component objects. The data objects are used to describe various parameters in the numerically controlled machine tool and all sampable data in a preset NC-Link model file, for example, { "id": "010305", "name": "FEED rate", "type": "feed_override",... The sampling channel object is used to describe the current sampable data and sampling period; the method object is used to describe the currently defined method.
It should be noted that, the initial NC-Link model may be based on a preset NC-Link model, and parameters for describing the protocol to be converted and the corresponding numerical control device are added.
Specifically, since the preset NC-Link model provides an access method for the method interface of the original data of the numerical control machine tool through the/args parameter of the method object under the root object, the structured data of other protocols such as the MT-Connect protocol or the OPC UA protocol cannot be identified and provided. Therefore, as shown in fig. 4, a new protocol/protocol parameter is added to a method object of the preset NC-Link model, and is used for marking the protocol type supported by the NC-Link model file, where the value of the parameter may be a protocol name such as "NC-Link", "MT-Connect" or "OPC UA".
Meanwhile, according to the protocol/protocol parameters, the/args parameters correspond to different values, as shown in fig. 5, for example, when the protocol/protocol is MT-Connect, the parameters/args may at least include an internal parameter field such as protocol, address, port, operation, which is used for describing the MT-Connect interface access method and parameters; when the protocol/protocols is OPC UA, the parameters/args may at least include an internal parameter field such as protocol, address, port, which is used to describe an interface access method and parameters of OPC UA services.
In addition, in the preset NC-Link model, the data object may be used as a basic unit for describing node information, and in order to adapt to the node identifier when the protocol to be converted is converted into the NC-Link protocol, as shown in fig. 6, in the data object of the preset NC-Link model, the definition of the data type/datatype may be modified, and a special identifier/identity parameter may be newly added.
Specifically, as shown in fig. 7, when the protocol/protocol in the method object is MT-Connect, the data type/datatype of the data object may be Samples, events, condition or other custom type, which is used to identify the MT-Connect node data type during NC-Link adaptation. When the protocol/protocol in the method object is OPC UA, the data type/datatype of the data object may be ua_types_int32, ua_types_flow, ua_types_string, ua_types_BOOLean, ua_types_dataime, or other custom TYPES for identifying OPC UA node data TYPES during NC-Link adaptation.
Meanwhile, because the identification and query modes of the MT-Connect and OPC UA protocols on the nodes are inconsistent with the NC-Link protocol, the special identification/identity is newly added to provide the nodes corresponding to the parameter identifications MT-Connect and OPC UA when the NC-Link is matched, as shown in fig. 8, when the protocol/protocol in the method object is MT-Connect, the special identification/identity of the data object can at least contain mtId parameters, and optionally contain mtLocate parameters and other custom parameters. When the protocol/protocol in the method object is OPC UA, the special Identifier/identity of the data object may at least include namespace, identifierType and Identifier parameters, and optionally include other parameters.
It should be understood that the initial NC-Link model is obtained after the above-described modification parameters and new parameters are performed on the basis of the preset NC-Link model. According to protocol/protocol parameters of a method object of an improved NC-Link model and special identification/identity parameters of a data object, constructing a node mapping relation and a function mapping relation between a data packet of MT-Connect, OPC UA protocol or other protocols and the NC-Link protocol, and constructing a model according to the protocol data mapping relation and an initial NC-Link model, namely the improved NC-Link protocol model.
Step S03: and constructing an improved NC-Link protocol model based on the protocol data mapping relation.
It can be understood that the modified NC-Link protocol model may be a model generated by constructing an initial model based on a numerical control device model definition specification of the NC-Link protocol, and mapping data of a protocol to be converted to the initial model based on a protocol data mapping relationship.
In a second embodiment, identifying the characteristics of a data packet of a protocol to be converted is disclosed; constructing a protocol data mapping relation between the protocol to be converted and the NC-Link protocol according to the identification result; and constructing an improved NC-Link protocol model based on the protocol data mapping relation. In the embodiment, the data packet characteristics of the protocol to be converted are firstly identified to determine the protocol type to which the data packet belongs, a protocol data mapping relation is constructed according to the protocol type, then an improved NC-Link protocol model is constructed according to the protocol data mapping relation, and before the data packet of the protocol to be converted corresponding to the protocol to be converted is acquired, the improved NC-Link protocol model is constructed to realize the protocol conversion.
Referring to fig. 9, fig. 9 is a flow chart of a third embodiment of the NC-Link based multi-source heterogeneous device protocol conversion method according to the present invention.
Further, a server and a connection establishment method of the protocol to be converted need to be determined, and after connection is established with the server, a data packet of the protocol to be converted corresponding to the protocol to be converted is acquired. Therefore, based on the first embodiment, the present embodiment further includes, before the step S10:
step S04: and determining a connection establishment mode through the improved NC-Link protocol model.
It can be understood that, the protocol/protocol parameters in the method object of the improved NC-Link protocol model can determine the protocol type of the numerical control device described in the current model, and different protocols correspond to different servers and different connection modes, and can be used for external access by opening a service through a port, or can be connected with a server through a remote desktop.
Further, the protocol to be converted and the server address corresponding to the protocol to be converted may be determined before determining the connection establishment mode. Thus, the step S04 includes: determining the protocol to be converted and a server address corresponding to the protocol to be converted according to protocol parameters of a method object of the improved NC-Link protocol model; and determining a connection establishment mode according to the protocol to be converted and the server address corresponding to the protocol to be converted.
It will be appreciated that, from the protocol/protocol parameters in the method object of the modified NC-Link protocol model, the protocol type to which the numerical control device described in the current model belongs may be determined, and different values of the protocol/protocol parameters correspond to different/args parameters, and information of services that the protocol can access is described in the/args parameters, for example, when the protocol/protocol is MT-Connect, the parameter/args is { "protocol": "HTTP", "address": "10.10.56.1", "port": "probe", "operation": "GET" }. Therefore, according to the improved NC-Link protocol model, the affiliated protocol is MT-Connect, the server address is address 10.10.56.1, the port number is probe, and the connection establishment mode can be determined by the server address and the port number.
Further, in consideration of security issues when establishing a connection between different protocols, the request authentication information may be sent for authentication before establishing the connection, so that it is safer for the server corresponding to the protocol to be converted to establish the connection. Therefore, the step S04 further includes: determining request authentication information according to the protocol to be converted; and determining a connection establishment mode according to the request authentication information, the protocol to be converted and a server address corresponding to the protocol to be converted, so that the server can select a corresponding security policy according to the connection establishment mode to perform identity authentication.
It can be understood that, since the servers of different protocols set corresponding security policies to perform identity verification, malicious access and attack are avoided, for example, MT-Connect implements the security policies through external SSL (secure socket layer secure socket protocol), OPC UA may have various security policies selected, for example, basic128sa15, basic256Sha256, aes128_sha256_rsaoaep, etc., and the server performs security policy selection and identity authentication during the process of establishing a protocol connection. Therefore, the security policy of the protocol can be determined according to the protocol to be converted, corresponding request authentication information containing identity information is set according to the security policy, and the connection establishment mode is determined according to the request authentication information, the protocol to be converted and the server address corresponding to the protocol to be converted.
Step S05: and establishing connection with a server corresponding to the protocol to be converted based on the connection establishment mode.
The present embodiment is described herein with reference to a specific example, as shown in fig. 10, taking MT-Connect protocol data packet, OPC UA protocol data packet, and NC-Link protocol data packet as examples, and performing a complete flow of protocol conversion based on an improved NC-Link protocol model, where feature recognition is performed first according to the data packet of the protocol to be converted, and modeling is performed according to different protocols after the protocol type is identified, so as to obtain an improved NC-Link protocol model; and establishing connection with a protocol to be converted according to the improved NC-Link protocol model to obtain data, performing protocol conversion, performing operations such as node data reading and writing on the digital control equipment.
Further, after the connection is established with the server corresponding to the protocol to be converted, the server may be subscribed to the data of the designated node in the numerical control device, and the sampling frequency may be set so that the server issues the data of the designated node according to the sampling frequency. For example, a cutter node is arranged on the numerical control equipment, the node id is 000001, the operation comprises cutting, the operation is performed by adjusting the offset, the value of the offset in the preset time is 30-40-30, the sampling data of the node is subscribed, the sampling frequency is set to be 1 second for 1 time, and then 1 data packet comprising the node data is received every second.
In addition, the sampling data can be written by calling a functional interface provided by the numerical control equipment of the protocol to be converted, the modified data packet can be analyzed by receiving the modified data packet sent by the proxy to obtain the node and the specific numerical value to be modified, and the control of the node of the numerical control machine tool can be realized by calling the functional interface.
In a third embodiment, determining a connection establishment mode through an improved NC-Link protocol model is disclosed; and establishing connection with a server corresponding to the protocol to be converted based on the connection establishment mode. According to the embodiment, the connection establishment mode is determined to establish connection with the server corresponding to the protocol to be converted according to the improved NC-Link protocol model, and the data packet of the protocol to be converted corresponding to the protocol to be converted is acquired after the connection establishment mode is established with the server, so that the connection establishment between the NC-Link protocol model and the server is realized.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium is stored with an NC-Link-based multi-source heterogeneous device protocol conversion program, and the NC-Link-based multi-source heterogeneous device protocol conversion program realizes the steps of the NC-Link-based multi-source heterogeneous device protocol conversion method when being executed by a processor.
Fig. 11 is a block diagram of a first embodiment of a NC-Link based multi-source heterogeneous device protocol conversion apparatus according to the present invention.
As shown in fig. 11, the NC-Link-based multi-source heterogeneous device protocol conversion apparatus according to the embodiment of the present invention includes:
the data acquisition module 1101 is configured to acquire a protocol data packet to be converted corresponding to a protocol to be converted;
the protocol conversion module 1102 is configured to convert the to-be-converted protocol data packet into an NC-Link protocol data packet according to an improved NC-Link protocol model, where the improved NC-Link protocol model includes a protocol data conversion relationship.
The embodiment obtains the protocol data packet to be converted corresponding to the protocol to be converted; and converting the protocol data packet to be converted into an NC-Link protocol data packet according to the improved NC-Link protocol model, wherein the improved NC-Link protocol model comprises a protocol data conversion relation. According to the invention, the to-be-converted protocol data packet is converted into the NC-Link protocol data packet according to the NC-Link protocol model after the protocol data conversion relation is improved by acquiring the to-be-converted protocol data packet corresponding to the to-be-converted protocol, so that the conversion of other protocol data packets into the NC-Link protocol data packet is realized, the data loss is avoided, and the interoperability between protocols is improved.
In an embodiment, the data obtaining module 1101 is further configured to identify a feature of a data packet of the protocol to be converted; constructing a protocol data mapping relation between the protocol to be converted and the NC-Link protocol according to the identification result; and constructing an improved NC-Link protocol model based on the protocol data mapping relation.
In an embodiment, the data obtaining module 1101 is further configured to construct a node mapping relationship and a function mapping relationship between the protocol to be converted and the NC-Link protocol according to the identification result; and determining a protocol data mapping relation between the protocol to be converted and the NC-Link protocol according to the node mapping relation and the function mapping relation.
In one embodiment, the data obtaining module 1101 is further configured to construct an initial NC-Link model based on a preset NC-Link model; and constructing an improved NC-Link protocol model according to the protocol data mapping relation and the initial NC-Link model.
In an embodiment, the data obtaining module 1101 is further configured to determine a connection establishment manner through the modified NC-Link protocol model; establishing connection with a server corresponding to a protocol to be converted based on the connection establishment mode; correspondingly, the obtaining the protocol data packet to be converted corresponding to the protocol to be converted includes: and acquiring a protocol data packet to be converted corresponding to the protocol to be converted through the connection.
In an embodiment, the data obtaining module 1101 is further configured to determine the protocol to be converted and a server address corresponding to the protocol to be converted according to a protocol parameter of a method object of the modified NC-Link protocol model; and determining a connection establishment mode according to the protocol to be converted and the server address corresponding to the protocol to be converted.
In an embodiment, the data obtaining module 1101 is further configured to determine request authentication information according to the protocol to be converted; and determining a connection establishment mode according to the request authentication information, the protocol to be converted and a server address corresponding to the protocol to be converted, so that the server can select a corresponding security policy according to the connection establishment mode to perform identity authentication.
Other embodiments of the NC-Link based multi-source heterogeneous device protocol conversion apparatus or the implementation method of the present invention can refer to the above method embodiments, and are not redundant here.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. read-only memory/random-access memory, magnetic disk, optical disk), comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (10)
1. The NC-Link-based multi-source heterogeneous device protocol conversion method is characterized by comprising the following steps of:
acquiring a protocol data packet to be converted corresponding to a protocol to be converted;
and converting the protocol data packet to be converted into an NC-Link protocol data packet according to an improved NC-Link protocol model, wherein the improved NC-Link protocol model comprises a protocol data conversion relation.
2. The NC-Link based multi-source heterogeneous device protocol conversion method according to claim 1, wherein before obtaining the to-be-converted protocol data packet corresponding to the to-be-converted protocol, further comprises:
identifying the characteristics of the data packet of the protocol to be converted;
constructing a protocol data mapping relation between the protocol to be converted and the NC-Link protocol according to the identification result;
and constructing an improved NC-Link protocol model based on the protocol data mapping relation.
3. The NC-Link based multi-source heterogeneous device protocol conversion method according to claim 2, wherein the constructing the protocol data mapping relationship between the protocol to be converted and the NC-Link protocol according to the identification result includes:
constructing a node mapping relation and a function mapping relation between the protocol to be converted and the NC-Link protocol according to the identification result;
and determining a protocol data mapping relation between the protocol to be converted and the NC-Link protocol according to the node mapping relation and the function mapping relation.
4. The NC-Link based multi-source heterogeneous device protocol conversion method according to claim 2, wherein the constructing an improved NC-Link protocol model based on the protocol data mapping relationship comprises:
constructing an initial NC-Link model based on a preset NC-Link model;
and constructing an improved NC-Link protocol model according to the protocol data mapping relation and the initial NC-Link model.
5. The NC-Link based multi-source heterogeneous device protocol conversion method according to claim 1, wherein before obtaining the to-be-converted protocol data packet corresponding to the to-be-converted protocol, further comprises:
determining a connection establishment mode through the improved NC-Link protocol model;
establishing connection with a server corresponding to a protocol to be converted based on the connection establishment mode;
correspondingly, the obtaining the protocol data packet to be converted corresponding to the protocol to be converted includes:
and acquiring a protocol data packet to be converted corresponding to the protocol to be converted through the connection.
6. The NC-Link based multi-source heterogeneous device protocol conversion method according to claim 5, wherein the determining the connection establishment mode by the modified NC-Link protocol model comprises:
determining the protocol to be converted and a server address corresponding to the protocol to be converted according to protocol parameters of a method object of the improved NC-Link protocol model;
and determining a connection establishment mode according to the protocol to be converted and the server address corresponding to the protocol to be converted.
7. The NC-Link based multi-source heterogeneous device protocol conversion method according to claim 6, wherein determining the connection establishment method according to the protocol to be converted and the server address corresponding to the protocol to be converted comprises:
determining request authentication information according to the protocol to be converted;
and determining a connection establishment mode according to the request authentication information, the protocol to be converted and a server address corresponding to the protocol to be converted, so that the server can select a corresponding security policy according to the connection establishment mode to perform identity authentication.
8. An NC-Link based multi-source heterogeneous device protocol conversion apparatus, wherein the apparatus comprises:
the data acquisition module is used for acquiring a protocol data packet to be converted corresponding to the protocol to be converted;
the protocol conversion module is used for converting the protocol data packet to be converted into an NC-Link protocol data packet according to an improved NC-Link protocol model, wherein the improved NC-Link protocol model comprises a protocol data conversion relation.
9. An NC-Link based multi-source heterogeneous device protocol conversion device, wherein the device comprises: memory, a processor and an NC-Link based multi-source heterogeneous device protocol conversion program stored on the memory and executable on the processor, the NC-Link based multi-source heterogeneous device protocol conversion program configured to implement the steps of the NC-Link based multi-source heterogeneous device protocol conversion method according to any one of claims 1 to 7.
10. A storage medium, wherein an NC-Link based multi-source heterogeneous device protocol conversion program is stored thereon, which when executed by a processor, implements the steps of the NC-Link based multi-source heterogeneous device protocol conversion method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310245657.3A CN116233272A (en) | 2023-03-14 | 2023-03-14 | NC-Link-based multi-source heterogeneous device protocol conversion method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310245657.3A CN116233272A (en) | 2023-03-14 | 2023-03-14 | NC-Link-based multi-source heterogeneous device protocol conversion method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116233272A true CN116233272A (en) | 2023-06-06 |
Family
ID=86582321
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310245657.3A Pending CN116233272A (en) | 2023-03-14 | 2023-03-14 | NC-Link-based multi-source heterogeneous device protocol conversion method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116233272A (en) |
-
2023
- 2023-03-14 CN CN202310245657.3A patent/CN116233272A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108667807B (en) | Protocol self-adaption method and system based on monitoring cloud platform and gateway | |
US6772205B1 (en) | Executing applications on a target network device using a proxy network device | |
US20070129820A1 (en) | Integrated fieldbus data server architecture | |
US20030023601A1 (en) | System and method for intercommunication among disparate communication networks | |
US20070011291A1 (en) | Grid automation bus to integrate management frameworks for dynamic grid management | |
US20070067440A1 (en) | Application splitting for network edge computing | |
JPH11511874A (en) | Apparatus and method for providing simple and secure management of a remote server | |
JPH10301960A (en) | Method and device for voice interaction on network using parameter interaction definition item | |
US20050076327A1 (en) | Server-side wireless development tool | |
CN110912782B (en) | Data acquisition method, device and storage medium | |
CN113039498A (en) | Method for commissioning field devices in an industrial system network | |
US20060123019A1 (en) | Management of component members using tag attributes | |
WO2007001121A1 (en) | Device management system and method for setting configuration-value therein | |
US7237222B1 (en) | Protocol for controlling an execution process on a destination computer from a source computer | |
US20220030090A1 (en) | Selective address space aggregation | |
KR20030028574A (en) | Information processing apparatus and method | |
CN113381875B (en) | Method for acquiring configuration data | |
US7907619B2 (en) | Method, system and program product for adapting to protocol changes | |
CN116233272A (en) | NC-Link-based multi-source heterogeneous device protocol conversion method | |
WO2003019304A1 (en) | Foundation fieldbus server providing device information using a live-list-based dynamic directory | |
JP7107046B2 (en) | Control system, search device and search program | |
US7499936B2 (en) | Generic SNMP proxy | |
CN114827293B (en) | Edge intelligent gateway management method and edge intelligent gateway | |
CN116743886A (en) | Industrial control equipment data acquisition system based on Internet of things | |
CN112130817A (en) | Multi-version interface implementation method, system, device and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |