WO2018214168A1 - 数据传输方法和装置 - Google Patents

数据传输方法和装置 Download PDF

Info

Publication number
WO2018214168A1
WO2018214168A1 PCT/CN2017/086206 CN2017086206W WO2018214168A1 WO 2018214168 A1 WO2018214168 A1 WO 2018214168A1 CN 2017086206 W CN2017086206 W CN 2017086206W WO 2018214168 A1 WO2018214168 A1 WO 2018214168A1
Authority
WO
WIPO (PCT)
Prior art keywords
protocol
target
data
receiving device
data receiving
Prior art date
Application number
PCT/CN2017/086206
Other languages
English (en)
French (fr)
Inventor
于禾
袁勇
张海涛
Original Assignee
西门子公司
于禾
袁勇
张海涛
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 西门子公司, 于禾, 袁勇, 张海涛 filed Critical 西门子公司
Priority to US16/615,683 priority Critical patent/US11343317B2/en
Priority to EP17910845.1A priority patent/EP3618378A4/en
Priority to CN201780089064.5A priority patent/CN110495149B/zh
Priority to PCT/CN2017/086206 priority patent/WO2018214168A1/zh
Publication of WO2018214168A1 publication Critical patent/WO2018214168A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a data transmission method and apparatus.
  • the Internet of Things can use various communication technologies to connect sensors, controllers, devices, etc., to form objects and objects, thereby realizing information, remote management and intelligent networks.
  • the middleware device responsible for continuing data collection in the Internet of Things and the service device responsible for data analysis processing can connect to the Internet of Things device that communicates by using multiple protocols, and the protocol can be: Transmission Control Protocol (TCP). /Internet Protocol (IP), Object Linking and Embedding (OLE) (OLE for Process Control, OPC) protocol, OPC Unified Architecture (OPC UA) protocol, S7 Protocol, Modbus protocol, etc. Therefore, the middleware device or the service device functions as a data receiving device, and needs to maintain multiple protocols, and receives data packets for each protocol by using corresponding protocols.
  • TCP Transmission Control Protocol
  • IP Internet Protocol
  • OPC Object Linking and Embedding
  • OPC Unified Architecture OPC Unified Architecture
  • the data receiving device in the Internet of Things needs to maintain the corresponding protocol for receiving IoT devices using each protocol. Therefore, in the process of deployment, expansion or maintenance of the Internet of Things, the data receiving device needs to adaptively adjust the protocol maintained by itself according to the protocol used by the connected IoT device, resulting in poor flexibility of protocol usage, thereby improving data reception.
  • the device maintains multiple protocol complexities.
  • the embodiments of the present invention provide a data transmission method and apparatus, which are used to solve the problem of poor flexibility in protocol usage in the prior art.
  • an embodiment of the present invention provides a data transmission method, where the method includes:
  • the data receiving device acquires information of a target protocol adopted by the target Internet of Things device connected to the target input port, where the target input port is an input port of the data receiving device;
  • the data receiving device determines, in a plurality of protocols, the target protocol corresponding to the information of the target protocol
  • the data receiving device does not need to configure the target protocol for the target Internet of Things device in advance, but can adaptively determine the target protocol according to the information of the target protocol adopted by the target Internet of Things device. Therefore, the data receiving device can be improved by the solution.
  • the flexibility of the use of the medium protocol can reduce the complexity of maintaining multiple protocols for the data receiving device.
  • the data receiving device acquires information about the target protocol used by the target Internet of Things device connected to the target input port, including:
  • the data receiving device acquires a connection model, wherein the connection model includes information of a protocol adopted by an Internet of Things device connected to each input port of the data receiving device;
  • the data receiving device acquires, in the connection model, information of the target protocol used by a target Internet of Things device connected to the target input port.
  • the data receiving device can accurately acquire information of the target protocol adopted by the target Internet of Things device connected to the target input port.
  • the data receiving device determines, in the multiple protocols, the target protocol corresponding to the information of the target protocol, including:
  • the target protocol model in a predetermined protocol model of the multiple protocols according to the information of the target protocol, where the protocol model of any protocol is a template for generating any one of the protocols;
  • the data receiving device instantiates the target protocol model to obtain the target protocol.
  • the data receiving device can adaptively determine the target protocol by configuring a target protocol for the target Internet of Things device in advance, and adaptively determining the target protocol through a preset protocol model of multiple protocols.
  • the flexibility of the use of protocols in the receiving device can reduce the complexity of maintaining multiple protocols for the data receiving device.
  • the method further includes:
  • the data receiving device encapsulates the data according to a protocol used by the service device to obtain a second data packet
  • the data receiving device sends the second data packet to the service device.
  • the receiving device may implement sending the decapsulated data to the service device.
  • the target protocol is any one of the following: a transmission control protocol TCP/Internet Protocol IP, a user process controlled object connection and embedded OPC protocol, an OPC unified architecture UA protocol, an S7 protocol, and a Modbus protocol.
  • the embodiment of the present invention further provides a data receiving device, where the device includes:
  • An acquiring module configured to acquire information about a target protocol used by a target IoT device connected to the target input port, where the target input port is an input port of the data receiving device;
  • a processing module configured to determine, in the multiple protocols, the target protocol corresponding to the information about the target protocol acquired by the acquiring module;
  • a communication module configured to receive, by using the target input port, a first data packet, where the first data packet is sent by the target Internet of Things device;
  • the processing module is further configured to decapsulate the first data packet received by the communication module according to the target protocol, to obtain data.
  • the data receiving device does not need to configure the target protocol for the target Internet of Things device in advance, but can adaptively determine the target protocol according to the information of the target protocol adopted by the target Internet of Things device. Therefore, the protocol in the data receiving device can be improved by the solution.
  • the flexibility of use can reduce the complexity of maintaining multiple protocols for data receiving devices.
  • the acquiring module is specifically configured to:
  • connection model includes information of a protocol adopted by an IoT device connected to each input port of the data receiving device;
  • connection model information of the target protocol adopted by a target Internet of Things device connected to the target input port is obtained.
  • the data receiving device can accurately acquire information of the target protocol adopted by the target Internet of Things device connected to the target input port.
  • the processing module is configured to: when determining the target protocol corresponding to the information of the target protocol in multiple protocols, specifically:
  • the data receiving device can adaptively determine the target protocol by configuring the target protocol for the target Internet of Things device in advance, and adaptively determining the target protocol through a preset protocol model of multiple protocols. Therefore, the data receiving device can be improved by the solution.
  • the flexibility of the use of the medium protocol can reduce the complexity of maintaining multiple protocols for the data receiving device.
  • the processing module is further configured to: after obtaining the data, encapsulate the data according to a protocol used by the service device, to obtain a second data packet;
  • the communication module is further configured to send the second data packet obtained by the processing module to the service device.
  • the receiving device can implement sending the decapsulated data to the service device.
  • the target protocol is any one of the following: a transmission control protocol TCP/Internet Protocol IP, a user process controlled object connection and embedded OPC protocol, an OPC unified architecture UA protocol, an S7 protocol, and a Modbus protocol.
  • the embodiment of the present invention further provides a data receiving device, where the device includes:
  • At least one memory for storing a computer program
  • At least one port for transmitting and receiving data
  • At least one processor for invoking a computer program stored in the at least one memory to perform a function of transmitting and receiving data based on the at least one port, performing any one of the first aspect or the first aspect The method provided.
  • an embodiment of the present invention further provides a computer readable medium, where the computer readable medium stores computer instructions, when the computer instruction is invoked by a processor, causing the processor to perform as the first Aspect or method provided by any of the possible implementations of the first aspect.
  • the data receiving device acquires the information of the target protocol used by the target Internet of Things device connected to the target input port of the user, the target protocol is determined, and the target Internet of Things is determined according to the target protocol.
  • the device decapsulates the first data packet sent by the target input port to obtain data.
  • the data receiving device does not need to configure the target protocol for the target IoT device in advance, but can adaptively determine the target protocol according to the information of the target protocol adopted by the target IoT device, and thus, the data receiving can be improved by the solution.
  • the flexibility of the use of protocols in the device can reduce the complexity of maintaining multiple protocols for data receiving devices.
  • FIG. 1 is a schematic structural diagram of a data transmission system according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a data transmission method according to an embodiment of the present invention.
  • FIG. 3 is a structural diagram of a data receiving device according to an embodiment of the present disclosure.
  • FIG. 4 is a structural diagram of a data receiving device according to an embodiment of the present invention.
  • 101 data receiving device 102: internet of things device 103: service device
  • the embodiment of the invention provides a data transmission method and device, which are used to solve the problem of poor flexibility in protocol usage in the prior art.
  • the problem since the principles of the method and the device for solving the problem are similar, the implementation of the device and the method can be referred to each other, and the repeated description is not repeated.
  • the data receiving device acquires the information of the target protocol used by the target Internet of Things device connected to the target input port of the user, the target protocol is determined, and the target Internet of Things device is adopted according to the target protocol.
  • the first data packet sent by the target input port is decapsulated to obtain data.
  • the data receiving device does not need to configure the target protocol for the target IoT device in advance, but can adaptively determine the target protocol according to the information of the target protocol adopted by the target IoT device, and thus, the data receiving can be improved by the solution.
  • the flexibility of the use of protocols in the device can reduce the complexity of maintaining multiple protocols for data receiving devices.
  • IoT devices devices that provide data connectivity in the Internet of Things, or data generation devices. IoT devices are also different in different scenarios.
  • the Internet of Things device can be a handheld device, an in-vehicle device, a wearable device, a computing device, or the like in a conventional IoT device.
  • the Internet of Things device can be various sensors, thermometers, various machines, and the like in industrial IoT devices.
  • the IoT device when the IoT device sends data to other devices in the Internet of Things, the corresponding protocol is required to encapsulate the data. Obviously, the protocols used by different IoT devices may be different.
  • a data receiving device which is a device for receiving data of an IoT device in an IoT device, such as a data collection gateway, a convergence device having a data aggregation function, and a server for implementing a data service function.
  • the data receiving device is a data collection gateway or a convergence device that also needs to upload the received data to a device (such as a server)
  • the data receiving device may also be referred to as a middleware.
  • the protocol defines the format in which the communicating parties use the data for transmission, and the method by which the communicating parties process the data.
  • the communication sender needs to encapsulate the data to be sent into a data packet by using a protocol to implement data transmission.
  • the communication receiver also needs to receive the data packet, and only the data packet can be decapsulated by the protocol. Get the data sent by the sender of the communication.
  • connection model can be deployed in the data receiving device.
  • the connection model includes information of a protocol used by the IoT device connected to each input port of the data receiving device, that is, the connection model specifies a correspondence between each input port and a protocol adopted by the IoT device connected to the input port. relationship.
  • the connection model further includes: device information (for example, device identifier, IP address, and the like) of the IoT device connected to each input port, that is, the connection model further defines each input port and the input port. Correspondence of device information of IoT devices.
  • the data receiving device can determine: the current network topology of the Internet of Things, and need to connect to the data.
  • the protocol adopted by the IoT device that sends the data to the device and the device information of the connected IoT device.
  • connection model may be set by the user according to the network topology of the actual IoT site, and deployed to the data receiving device.
  • the protocol model is a template for generating a protocol and is stored in the data receiving device.
  • the protocol model of a protocol is an abstraction of the methods or rules that are used when processing data using devices that use the protocol.
  • the data receiving device can instantiate a protocol model of a protocol to obtain a specific protocol.
  • the protocol model and protocol are implemented by software, the protocol model may be a class, and the specific protocol is an object.
  • the data transmission system includes: a data receiving device 101, and at least one Internet of Things device 102 (an Internet of Things device as shown in the figure) 102-a, Internet of Things device 102-b).
  • Each IoT device 102 is configured to generate or collect data and transmit the data to the data receiving device 101. After the IoT device 102 generates or collects the data to be sent, the data needs to be encapsulated into a data packet by using a protocol that is adopted by each device, thereby implementing data transmission.
  • the data receiving device 101 is connected to at least one IoT device 102 in the data transmission system, and receives the data packet sent by each IoT device 102, and decapsulates the received data packet through a corresponding protocol to obtain a corresponding data packet. data.
  • the data receiving device 101 includes a plurality of input ports, and each of the input ports can be connected to an IoT device 102. Thus, the data receiving device 101 can receive the data packet of the IoT device 102 through the input port.
  • the Internet of Things device 102-a adopting the S7 protocol is connected to the input port Port1 of the data receiving device 101, and the Internet of Things device 102-b using the OPC protocol is connected to the input port Port2 of the data receiving device 101.
  • the IoT device 102-a encapsulates the data to be sent Data1 into the data packet of the S7 protocol and the data packet of the S7 protocol, after the data 1 is to be sent.
  • the data receiving device 101 is sent to the data receiving device 101; and the IoT device 102-b encapsulates the data to be sent into the data packet of the OPC protocol and the data packet of the S7 protocol through the OPC protocol after the data data1 is to be transmitted. It is sent to the data receiving device 101.
  • the data receiving device 101 receives the data packet of the S7 protocol sent by the Internet of Things device 102-a through the port 1, and decapsulates the data packet of the S7 protocol through the S7 protocol, and obtains the data Data1 of the Internet of Things device 102-a.
  • the data receiving device 101 receives the data message of the OPC protocol sent by the Internet of Things device 102-b through the port 2, and decapsulates the data packet of the OPC protocol through the OPC protocol, and obtains the data of the Internet of Things device 102-b. Data2.
  • the data transmission system further includes a service device 103.
  • the data receiving device 101 may further send the obtained data to the service device 103.
  • the data receiving device 101 also The protocol used by the service device 103 needs to be determined, and the obtained data is encapsulated into a data packet by using the determined protocol, and the encapsulated data packet is sent to the service device 103.
  • Example 1 in the case where the data receiving device 101 determines that the service device 103 adopts TCP/IP, after the data receiving device 101 obtains Data1 and Data2, Data1 and Data2 may be encapsulated into TCP/IP through TCP/IP. The data packet is sent to the service device 103 by the encapsulated TCP/IP data packet.
  • an embodiment of the present invention provides a data transmission method.
  • the method is applicable to the data transmission system shown in FIG. 1.
  • the data receiving device 101 involved in the method may be data in the data transmission system.
  • Receiving device 101 receives data from the data transmission system.
  • the flow of the method will be described by taking the data receiving device 101 as an example.
  • the method shown in Figure 2 includes the following steps:
  • Step 201 The data receiving device 101 acquires information of a target protocol adopted by the target IoT device 102 connected to the target input port, and the target input port is an input port of the data receiving device 101.
  • the information of the target protocol is the identifier of the target protocol, the semantic description information, and the like, and the information that can represent the target protocol.
  • the data receiving device 101 can perform step 201 by using the following implementation manners:
  • the data receiving device 101 can obtain, by using an instruction input by the user, information about the target protocol used by the target Internet of Things device 102 connected to the target input port;
  • the data receiving device 101 can acquire information about the target protocol used by the target Internet of Things device 102 connected to the target input port sent by the service device 103;
  • a third implementation manner the data receiving device 101 acquires a connection model, where the connection model includes information of a protocol used by the Internet of Things device 102 connected to each input port of the data receiving device 101; the data receiving device 101 is in the In the connection model, information of the target protocol adopted by the target Internet of Things device 102 connected to the target input port is obtained.
  • connection model includes information of a protocol adopted by the IoT device 102 connected to each input port of the data receiving device 101
  • the data receiving device 101 acquires a connection of any one of the plurality of input ports of the plurality of input ports.
  • the third implementation manner described above can be adopted when the information of the protocol used by the networked device 102 is used.
  • connection model can be set for the user according to the network topology of the actual Internet of Things site, and deployed to the data receiving device 101.
  • connection model may include not only the information of the protocol adopted by the Internet of Things device 102 connected to each input port of the data receiving device 101, but also the device information of the IoT device 102 connected to each input port (for example: device identification, The IP address, etc., that is, the connection model also specifies the correspondence between each input port and the device information of the IoT device 102 that connects the input port.
  • the data receiving device 101 is in the process after acquiring the connection model. Before the step 201, the data receiving device 101 verifies the accuracy or enforceability of the connection model.
  • connection port model of the data receiving device 101 is specified in the connection model, and the Internet of Things device 102 adopting the S7 protocol is connected, and the IP address of the IoT device 102 is XXX.XXX.XXXX, then the data receiving device 101 can Through Port3, an authentication request encapsulated by the S7 protocol with the destination address XXX.XXX.XXXX is sent. If the data receiving device 101 receives the verification response returned by the Internet of Things device 102, the verification succeeds, otherwise the verification fails.
  • connection model By setting the connection model, in the case where the Internet of Things is re-routed or the field network environment is changed, the Internet of Things administrator does not need to adjust or configure the protocol to be used for each data receiving device 101 in the Internet of Things, and the data receiving device 101
  • the network topology of the Internet of Things can be obtained, as well as the protocol used by each IoT device 102 connected, thereby reducing labor costs and improving the efficiency of the Internet of Things.
  • Step 202 The data receiving device 101 determines, in a plurality of protocols, the target protocol corresponding to the information of the target protocol.
  • the data receiving device 101 can perform step 202 by using the following steps:
  • the data receiving device 101 determines, according to the information of the target protocol, a target protocol model in a preset protocol model of the multiple protocols, where a protocol model of any protocol is a template for generating any one of the protocols;
  • the data receiving device 101 instantiates the target protocol model to obtain the target protocol.
  • the data receiving device 101 when the data receiving device 101 saves the protocol model of the multiple protocols, the data of the protocol corresponding to each protocol model is saved correspondingly, that is, the data receiving device 101 stores information of multiple protocol models and protocols. Corresponding relationship, in this way, the data receiving device 101 can accurately obtain the target protocol model corresponding to the information of the target protocol directly through the above correspondence.
  • the target protocol model is an abstraction of the method or rule adopted when processing data by the device adopting the target protocol. Therefore, the data receiving device 101 needs to instantiate the target protocol model to obtain the target protocol.
  • the target protocol may be any one of the following: TCP/IP, OPC protocol, OPC UA protocol, S7 protocol, Modbus protocol, and the like.
  • the data receiving device 101 stores a protocol model of multiple protocols, such as a TCP/IP model, an OPC protocol model, an OPC UA protocol model, an S7 protocol model, a Modbus protocol model, and the like.
  • a protocol model of multiple protocols such as a TCP/IP model, an OPC protocol model, an OPC UA protocol model, an S7 protocol model, a Modbus protocol model, and the like.
  • the data receiving device 101 can still determine the protocol model of each protocol when acquiring information of a plurality of different protocols, thereby obtaining each protocol, and improving the efficiency of the data receiving device 101 to determine a specific protocol.
  • a plurality of protocol models may be stored in the data receiving device 101, facilitating the data receiving device 101 to perform management such as adding, modifying, or deleting a plurality of stored protocol models.
  • Step 203 The data receiving device 101 decapsulates the first data packet received through the target input port according to the target protocol to obtain data, where the first data packet is sent by the target Internet of Things device 102.
  • the data end device can obtain the data sent by the target Internet of Things device 102.
  • the method further includes:
  • the data receiving device 101 encapsulates the data according to a protocol used by the service device 103 to obtain a second data packet.
  • the data receiving device 101 sends the second data message to the service device 103.
  • connection model further includes information about a protocol used by the service device 103 that the data receiving device 101 outputs the port connection. Therefore, before the data receiving device 101 encapsulates the data according to the protocol used by the service device 103, the method further includes:
  • the protocol used by the service device 103 is determined by the information of the protocol adopted by the service device 103.
  • For the specific determination process refer to the process of determining the target protocol in the foregoing step 202, and details are not described herein again.
  • the data receiving device 101 may determine the target protocol used by the Internet of Things device 102 connected to each input port by using the foregoing method, and then, after receiving the data packet through each input port, according to the corresponding protocol. Decapsulating the received data message to obtain data sent by each IoT device 102.
  • the data receiving device acquires the information of the target protocol used by the target IoT device connected to the target input port of the user, the target protocol is determined, and the target object is determined according to the target protocol.
  • the network device decapsulates the first data packet sent by the target input port to obtain data.
  • the data receiving device does not need to configure the target protocol for the target IoT device in advance, but can adaptively determine the target protocol according to the information of the target protocol adopted by the target IoT device, and thus, the data receiving can be improved by the solution.
  • the flexibility of the use of protocols in the device can reduce the complexity of maintaining multiple protocols for data receiving devices.
  • the embodiment of the present invention further provides an optional implementation manner of the data receiving device involved in the foregoing method embodiment.
  • the data receiving device 101 may include: an acquiring module. 301, a processing module 302, and a communication module 303, wherein
  • the obtaining module 301 is configured to acquire information about a target protocol used by the target Internet of Things device 102 connected to the target input port, where the target input port is an input port of the data receiving device;
  • the processing module 302 is configured to determine, in the multiple protocols, the target protocol corresponding to the information about the target protocol acquired by the obtaining module 301.
  • the communication module 303 is configured to receive, by using the target input port, a first data packet, where the first data packet is the target Transmitted by the Internet of Things device 102;
  • the processing module 302 is further configured to decapsulate the first data packet received by the communication module 303 according to the target protocol to obtain data.
  • the obtaining module 301 is specifically configured to:
  • connection model includes information of a protocol adopted by the IoT device 102 connected to each input port of the data receiving device;
  • connection model information of the target protocol adopted by the target Internet of Things device 102 connected to the target input port is obtained.
  • the processing module 302 is configured to: when determining the target protocol corresponding to the information of the target protocol in multiple protocols, specifically:
  • the target protocol model is instantiated to obtain the target protocol.
  • the optional processing module 302 is further configured to: after obtaining the data, encapsulate the data according to a protocol used by the service device 103 to obtain a second data packet;
  • the communication module 303 is further configured to send the second data packet obtained by the processing module 302 to the service device 103.
  • the target agreement is any of the following:
  • Transmission Control Protocol TCP/Internet Protocol IP User Process Control Object Connection and Embedded OPC Protocol, OPC Unified Architecture UA Protocol, S7 Protocol, Modbus Protocol.
  • An embodiment of the present invention provides a data receiving device, after obtaining information about a target protocol used by a target Internet of Things device connected to a target input port of the user, determining the target protocol, and according to the target protocol, The target IoT device decapsulates the first data packet sent by the target input port to obtain data.
  • the data receiving device does not need to configure the target protocol for the target IoT device in advance, but can adaptively determine the target protocol according to the information of the target protocol adopted by the target IoT device, and thus, the data receiving can be improved by the solution.
  • the flexibility of the use of protocols in the device can reduce the complexity of maintaining multiple protocols for data receiving devices.
  • the division of the module in the foregoing embodiment of the present invention is schematic, and can be regarded as a logical function division. In actual implementation, there may be another division manner.
  • the modules in the embodiment of the present invention may be integrated into one processing module, or each module may exist separately, or two or more modules may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional units.
  • the data receiving device 101 may further include: at least one memory 401, at least one processor 402, and an interface 403, where
  • the at least one memory 401, the at least one processor 402, and the interface 403 are connected to each other by a bus 404; the bus 404 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard structure (Extended Industry) Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry Standard Architecture
  • the bus 404 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 4, but it does not mean that there is only one bus or one type of bus.
  • At least one port 403 for communicating with other devices in the data transmission system (eg, the Internet of Things device 102, the service device 103, etc.).
  • the at least one port 403 may include an input port for receiving data packets sent by the IoT device 102, and an output port for transmitting data packets to the service device 103.
  • the at least one processor 402 is configured to implement the data transmission method as shown in FIG. 2, including:
  • determining the target protocol corresponding to the information of the target protocol In a plurality of protocols, determining the target protocol corresponding to the information of the target protocol
  • the first data packet received through the target input port is decapsulated to obtain data, and the first data packet is sent by the target Internet of Things device 102.
  • the at least one processor 402 is configured to: when acquiring information about the target protocol used by the target Internet of Things device 102 connected to the target input port, specifically:
  • connection model includes information of a protocol adopted by the IoT device 102 connected to each input port of the data receiving device;
  • connection model information of the target protocol adopted by the target Internet of Things device 102 connected to the target input port is obtained.
  • the at least one processor 402 is specifically configured to:
  • the target protocol model is instantiated to obtain the target protocol.
  • the at least one processor 402 is further configured to:
  • the data is encapsulated according to a protocol used by the service device 103 to obtain a second data packet;
  • the second data packet is sent to the service device 103 through an output port of the at least one port.
  • the at least one memory 401 is configured to store a computer program.
  • the program can include program code, the program code including computer operating instructions.
  • the at least one memory 401 may include at least one random access memory (RAM), and may also include at least one non-volatile memory, such as at least one magnetic disk.
  • At least one of the processors 402 calls the computer program stored in the at least one memory 401 to implement the above functions, thereby implementing the data transmission method as shown in FIG. 2.
  • An embodiment of the present invention provides a data receiving device, after obtaining information about a target protocol used by a target Internet of Things device connected to a target input port of the user, determining the target protocol, and according to the target protocol, The target IoT device decapsulates the first data packet sent by the target input port to obtain data.
  • the data receiving device does not need to configure the target protocol for the target IoT device in advance, but can adaptively determine the target protocol according to the information of the target protocol adopted by the target IoT device, and thus, the data receiving can be improved by the solution.
  • the flexibility of the use of protocols in the device can reduce the complexity of maintaining multiple protocols for data receiving devices.
  • Embodiments of the present invention also provide a computer readable medium storing computer instructions for causing a machine to perform a data transfer method as described herein.
  • a system or apparatus may be provided with a computer readable medium having stored thereon software program code for implementing the functions of any of the above-described embodiments, and a computer of the system or apparatus (or a Central Processing Unit (CPU) or a Micro Processor Unit (MPU)) reads and executes program code stored in a storage medium.
  • CPU Central Processing Unit
  • MPU Micro Processor Unit
  • the program code itself read from the storage medium can implement the functions of any of the above embodiments, and thus the program code and the storage medium storing the program code constitute a part of the embodiment of the present invention.
  • Storage medium embodiments for providing program code include floppy disk, hard disk, magneto-optical disk, optical disk (such as Compact Disc Read-Only Memory (CD-ROM), recordable optical disk (Compact Disk-Recordable, CD-R) ), rewritable disc (Compact Disk-ReWritable, CD-RW), digital video disc-read only memory (DVD-ROM), digital versatile disc-random memory (Digital Versatile Disc-Random Access Memory, DVD- RAM), rewritable digital versatile disc (Digital Versatile Disc ⁇ ReWritable, DVD ⁇ RW), etc., magnetic tape, nonvolatile memory card, and read-only memory (ROM).
  • the program code can be downloaded from the server computer by the communication network.
  • the program code read out from the storage medium is written into a memory provided in an expansion board inserted into the computer or written in a memory set in an extension unit connected to the computer, and then based on the program code.
  • the instructions cause a CPU or the like mounted on the expansion board or the expansion unit to perform part and all of the actual operations, thereby realizing the functions of any of the above embodiments.
  • system structure described in the foregoing embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by at least two physical entities, or may be at least Some of the two separate devices are implemented together.
  • the hardware unit can be implemented mechanically or electrically.
  • a hardware unit may include permanently dedicated circuits or logic (such as a dedicated processor, Field-Programmable Gate Array (FPGA) or Application Specific Inter-Equipped Circuits (ASIC)). Complete the appropriate action.
  • the hardware unit may also include programmable logic or circuitry (such as a general purpose processor or other programmable processor) that can be temporarily set by software to perform the corresponding operations.
  • programmable logic or circuitry such as a general purpose processor or other programmable processor
  • a specific implementation mechanical mode, or dedicated permanent circuit, or temporarily set circuit

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明实施例提供一种数据传输方法和装置,用于解决现有技术中协议使用灵活性较差的问题。该方法包括:数据接收设备获取到自身的一个目标输入端口的信息和该目标输入端口连接的目标物联网设备采用的目标协议的信息后,确定目标输入端口和目标协议,并根据目标协议,对该目标物联网设备通过该目标输入端口发送的第一数据报文进行解封装,得到数据。在该方案中,数据接收设备无需预先为目标物联网设备配置目标协议,而是可以自适应地根据目标物联网设备采用的目标协议的信息确定目标协议,因此,通过该方案,可以提高数据接收设备中协议的使用灵活性,从而可以降低数据接收设备维护多个协议的复杂度。

Description

数据传输方法和装置 技术领域
本发明涉及通信技术领域,尤其涉及数据传输方法和装置。
背景技术
目前,随着通信技术的发展,物联网成为新一代信息技术的趋势。物联网可以利用各种通信技术,将传感器、控制器、设备等连在一起,形成物与物相连,从而实现信息化、远程管理控制和智能化的网络。
在某些物联网(例如工业物联网)中,由于物联网设备的生产厂商、物联网设备的类型等差异,会导致物联网中数据传输的差异,即物联网中会存在多种数据传输协议实现数据传输。因此,物联网中负责继续数据汇集的中间件设备、负责数据分析处理的服务设备可以连接采用多个协议进行通信的物联网设备,所述协议可以为:传输控制协议(Transmission Control Protocol,TCP)/因特网协议(Internet Protocol,IP)、用于过程控制的对象连接与嵌入(Object Linking andEmbedding,OLE)(OLE for Process Control,OPC)协议、OPC统一架构(OPC Unified Architecture,OPC UA)协议、S7协议、Modbus协议等。因此中间件设备或服务设备作为数据接收设备,需要维护多种协议,并针对每种协议的数据报文,采用相应的协议接收。
由于传统的控制层和数据层的紧密耦合,导致物联网中的数据接收设备需要针对使用每种协议的物联网设备,需要维护相应的协议以便接收数据。因此,在物联网部署、扩展或维护的过程中,数据接收设备均需要根据连接的物联网设备使用的协议,适应性调整自身维护的协议,造成协议使用灵活性较差,进而提高了数据接收设备维护多个协议复杂度。
发明内容
有鉴于此,本发明实施例提供一种数据传输方法和装置,用以解决现有技术中协议使用灵活性较差的问题。
第一方面,本发明实施例提供了一种数据传输方法,所述方法包括:
数据接收设备获取连接目标输入端口的目标物联网设备采用的目标协议的信息,所述目标输入端口为所述数据接收设备的一个输入端口;
所述数据接收设备在多个协议中,确定所述目标协议的信息所对应的所述目标协议;
所述数据接收设备根据所述目标协议,对通过所述目标输入端口接收的第一数据报文进 行解封装,得到数据,所述第一数据报文为所述目标物联网设备发送的。
通过上述方法,数据接收设备无需预先为目标物联网设备配置目标协议,而是可以自适应地根据目标物联网设备采用的目标协议的信息确定目标协议,因此,通过该方案,可以提高数据接收设备中协议的使用灵活性,从而可以降低数据接收设备维护多个协议的复杂度。
可选的,数据接收设备获取连接所述目标输入端口的目标物联网设备采用的所述目标协议的信息,包括:
所述数据接收设备获取连接模型,其中,所述连接模型中包含连接所述数据接收设备每个输入端口的物联网设备采用的协议的信息;
所述数据接收设备在所述连接模型中,获取连接所述目标输入端口的目标物联网设备采用的所述目标协议的信息。
通过上述方法,所述数据接收设备可以准确地获取连接所述目标输入端口的目标物联网设备采用的所述目标协议的信息。
可选的,所述数据接收设备在多个协议中,确定所述目标协议的信息所对应的所述目标协议,包括:
所述数据接收设备根据所述目标协议的信息,在预设的所述多个协议的协议模型中确定目标协议模型,其中,任一协议的协议模型为生成所述任一协议的模板;
所述数据接收设备对所述目标协议模型进行实例化,得到所述目标协议。
通过上述方法,所述数据接收设备可以无需预先为目标物联网设备配置目标协议,而是通过预设的多个协议的协议模型,自适应地确定目标协议,因此,通过该方案,可以提高数据接收设备中协议的使用灵活性,从而可以降低数据接收设备维护多个协议的复杂度。
可选的,在所述数据接收设备得到所述数据之后,所述方法还包括:
所述数据接收设备根据服务设备使用的协议,对所述数据进行封装,得到第二数据报文;
所述数据接收设备将所述第二数据报文发送给所述服务设备。
通过上述方法,所述接收设备可以实现将解封装得到的数据发送给服务设备。
可选的,所述目标协议为以下任一项:传输控制协议TCP/因特网协议IP、用户过程控制的对象连接与嵌入OPC协议、OPC统一架构UA协议、S7协议、Modbus协议。
第二方面,本发明实施例还提供了一种数据接收设备,该设备包括:
获取模块,用于获取连接目标输入端口的目标物联网设备采用的目标协议的信息,所述目标输入端口为所述数据接收设备的一个输入端口;
处理模块,用于在多个协议中,确定所述获取模块获取的所述目标协议的信息所对应的所述目标协议;
通信模块,用于通过所述目标输入端口接收第一数据报文,所述第一数据报文为所述目标物联网设备发送的;
所述处理模块,还用于根据所述目标协议,对所述通信模块接收的所述第一数据报文进行解封装,得到数据。
这样,数据接收设备无需预先为目标物联网设备配置目标协议,而是可以自适应地根据目标物联网设备采用的目标协议的信息确定目标协议,因此,通过该方案,可以提高数据接收设备中协议的使用灵活性,从而可以降低数据接收设备维护多个协议的复杂度。
可选的,所述获取模块,具体用于:
获取连接模型,其中,所述连接模型中包含连接所述数据接收设备每个输入端口的物联网设备采用的协议的信息;
在所述连接模型中,获取连接所述目标输入端口的目标物联网设备采用的所述目标协议的信息。
这样,所述数据接收设备可以准确地获取连接所述目标输入端口的目标物联网设备采用的所述目标协议的信息。
可选的,所述处理模块在多个协议中,确定所述目标协议的信息所对应的所述目标协议时,具体用于:
根据所述目标协议的信息,在预设的所述多个协议的协议模型中确定目标协议模型,其中,任一协议的协议模型为生成所述任一协议的模板;
对所述目标协议模型进行实例化,得到所述目标协议。
这样,所述数据接收设备可以无需预先为目标物联网设备配置目标协议,而是通过预设的多个协议的协议模型,自适应地确定目标协议,因此,通过该方案,可以提高数据接收设备中协议的使用灵活性,从而可以降低数据接收设备维护多个协议的复杂度。
可选的,所述处理模块,还用于在得到所述数据之后,根据服务设备使用的协议,对所述数据进行封装,得到第二数据报文;
所述通信模块,还用于将所述处理模块得到的所述第二数据报文发送给所述服务设备。
这样,所述接收设备可以实现将解封装得到的数据发送给服务设备。
可选的,所述目标协议为以下任一项:传输控制协议TCP/因特网协议IP、用户过程控制的对象连接与嵌入OPC协议、OPC统一架构UA协议、S7协议、Modbus协议。
第三方面,本发明实施例还提供了一种数据接收设备,所述设备包括:
至少一个存储器,用于存储计算机程序;
至少一个端口,用于发送和接收数据;
至少一个处理器,用于调用所述至少一个存储器中存储的计算机程序,以基于所述至少一个端口发送和接收数据的功能执行如第一方面或第一方面中的任一种可能的实现方式提供的方法。
第四方面,本发明实施例还提供了一种计算机可读介质,所述计算机可读介质上存储有计算机指令,所述计算机指令在被处理器调用时,使所述处理器执行如第一方面或第一方面中任一种可能的实现方式提供的方法。
本发明实施例提供的技术方案中,数据接收设备获取连接自身的目标输入端口的目标物联网设备采用的目标协议的信息后,确定该目标协议,并根据所述目标协议,对该目标物联网设备通过该目标输入端口发送的第一数据报文进行解封装,得到数据。在该方案中,数据接收设备无需预先为目标物联网设备配置目标协议,而是可以自适应地根据目标物联网设备采用的目标协议的信息确定目标协议,因此,通过该方案,可以提高数据接收设备中协议的使用灵活性,从而可以降低数据接收设备维护多个协议的复杂度。
附图说明
图1为本发明实施例提供的一种数据传输系统的架构图;
图2为本发明实施例提供的一种数据传输方法的流程图;
图3为本发明实施例提供的一种数据接收设备的结构图;
图4为本发明实施例提供的一种数据接收设备的结构图。
附图标记列表:
101:数据接收设备         102:物联网设备     103:服务设备
201:获取目标协议的信息   202:确定目标协议   203:对第一数据报文进行解封装
301:获取模块              302:处理模块              303:通信模块
401:至少一个存储器               402:至少一个处理器
403:至少一个端口                 404:总线
具体实施方式
为了使本发明实施例的目的、技术方案和优点更加清楚明白,以下参照附图本发明实施例进一步详细说明。其中,后续描述的实施例仅仅是本发明实施例的一部分,而非全部的实施例。
本发明实施例提供一种数据传输方法和装置,用以解决现有技术中协议使用灵活性较差 的问题。其中,由于方法及装置解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。
在本发明实施例中,数据接收设备获取连接自身的目标输入端口的目标物联网设备采用的目标协议的信息后,确定该目标协议,并根据所述目标协议,对该目标物联网设备通过该目标输入端口发送的第一数据报文进行解封装,得到数据。在该方案中,数据接收设备无需预先为目标物联网设备配置目标协议,而是可以自适应地根据目标物联网设备采用的目标协议的信息确定目标协议,因此,通过该方案,可以提高数据接收设备中协议的使用灵活性,从而可以降低数据接收设备维护多个协议的复杂度。
以下对本发明实施例中的部分用语进行解释说明,以便于本领域技术人员理解。
1)、物联网设备,为物联网中的提供数据连通性的设备,或数据生成设备。在不同的场景中,物联网设备也不同。例如物联网设备可以为传统的物联网设备中的手持式设备、车载设备、可穿戴设备、计算设备等。又例如物联网设备可以为工业物联网设备中的各种传感器、温度计、以及各种机器等。
其中,该物联网设备在向物联网中的其他设备发送数据时,均需要采用相应的协议对数据进行封装。显然,不同的物联网设备采用的协议可能不同。
2)、数据接收设备,为物联网设备中用于接收物联网设备的数据的设备,例如数据采集网关等,具有数据汇聚功能的汇聚设备,以及实现数据服务功能的服务器等。可选的,当数据接收设备为还需要向上一层设备(如服务器)上传接收的数据的数据采集网关或汇聚设备时,所述数据接收设备还可以为称为中间件。
3)、协议,为通信双方必须遵循的规则和约定。协议定义了通信双方传输数据使用的格式,以及通信双方处理数据的方法。通信发送方需要将待发送的数据采用协议封装成数据报文,才能实现数据传输,相应的,通信接收方同样需要接收到数据报文后,只有采用该协议对数据报文进行解封装,才能得到通信发送方发送的数据。
目前,由于物联网设备的生产厂商、物联网设备的类型等差异,导致物联网中存在多种协议,例如,TCP/IP、OPC协议、OPC UA协议、S7协议、Modbus协议等等。
4)、连接模型,可以部署在数据接收设备中。其中,该连接模型中包含连接数据接收设备每个输入端口的物联网设备采用的协议的信息,即连接模型规定了每个输入端口与连接该输入端口的物联网设备采用的协议的信息的对应关系。可选的,连接模型中还包含:每个输入端口连接的物联网设备的设备信息(例如:设备标识、IP地址等),即该连接模型还规定了每个输入端口与连接该输入端口的物联网设备的设备信息的对应关系。
通过该连接模型,数据接收设备可以确定:当前物联网的网络拓扑情况、需要向数据接 收设备发送数据的物联网设备采用的协议,以及连接的物联网设备的设备信息等。
可选的,连接模型可以为用户根据实际物联网现场的网络拓扑情况设置,并部署到数据接收设备中的。
5)、协议模型,为生成协议的模板,保存在数据接收设备中。某协议的协议模型是对采用该协议的设备在处理数据时采用的方法或规则的抽象。所述数据接收设备可以对某协议的协议模型进行实例化,得到具体的协议。可选的,在通过软件实现协议模型和协议时,协议模型可以为类,而具体的协议为对象。
为了更加清晰的描述本发明实施例的技术方案,下面结合附图,对本发明实施例进行具体说明。
图1示出了本发明实施例的一种可能的数据传输系统的架构,在该数据传输系统中,包括:数据接收设备101、至少一个物联网设备102(如图中所示的物联网设备102-a、物联网设备102-b)。
每个物联网设备102,用于生成或采集数据,并将数据传输给数据接收设备101。其中,在每个物联网设备102生成或采集到待发送的数据后,需要通过各自采用的协议,将数据封装为数据报文,从而实现数据的传输。
数据接收设备101,连接数据传输系统中的至少一个物联网设备102,并接收每个物联网设备102发送的数据报文,并通过相应的协议对接收的数据报文进行解封装,得到相应的数据。其中,数据接收设备101中包含多个输入端口,每个输入端口可以连接一个物联网设备102,这样,数据接收设备101可以通过输入端口接收物联网设备102的数据报文。
例1,采用S7协议的物联网设备102-a连接数据接收设备101的输入端口Port1,采用OPC协议的物联网设备102-b连接数据接收设备101的输入端口Port2。
在上述场景中,那么物联网设备102-a在存在待发送的数据1后,通过S7协议,将该待发送的数据Data1封装为S7协议的数据报文,并将该S7协议的数据报文发送给数据接收设备101;而物联网设备102-b在存在待发送的数据Data1后,通过OPC协议,将该待发送的数据封装为OPC协议的数据报文并将该S7协议的数据报文发送给数据接收设备101。
数据接收设备101通过Port1接收物联网设备102-a发送的该S7协议的数据报文,并通过S7协议,对该S7协议的数据报文进行解封装,得到物联网设备102-a的数据Data1;数据接收设备101通过Port2接收物联网设备102-b发送的该OPC协议的数据报文,并通过OPC协议,对该OPC协议的数据报文进行解封装,得到物联网设备102-b的数据Data2。
可选的,该数据传输系统中还包括服务设备103,数据接收设备101得到物联网设备发送的数据后,还可以将得到的数据发送给该服务设备103。当然,所述数据接收设备101也 需要确定服务设备103采用的协议,并通过确定的协议,将得到的数据封装为数据报文,并将封装好的数据报文发送给该服务设备103。
继续以例1为例,在数据接收设备101确定服务设备103采用TCP/IP的情况下,在数据接收设备101得到Data1和Data2后,可以将Data1和Data2通过TCP/IP封装为TCP/IP的数据报文,并将封装后的TCP/IP的数据报文发送给服务设备103。
参阅图2所示,本发明实施例提供了一种数据传输方法,该方法适用于如图1所示的数据传输系统中,本方法涉及的数据接收设备101可以为该数据传输系统中的数据接收设备101。下面,以数据接收设备101执行该方法为例,对该方法的流程加以说明。图2所示的方法包括如下步骤:
步骤201:数据接收设备101获取连接目标输入端口的目标物联网设备102采用的目标协议的信息,该目标输入端口为该数据接收设备101的一个输入端口。
可选的,该目标协议的信息为该目标协议的标识、语义描述信息等唯一可以表示该目标协议的信息。
可选的,该数据接收设备101可以通过以下几种实现方式,执行步骤201:
第一种实现方式:该数据接收设备101可以通过用户输入的指令,得到连接该目标输入端口的目标物联网设备102采用的该目标协议的信息;
第二种实现方式:该数据接收设备101可以获取服务设备103发送的连接该目标输入端口的目标物联网设备102采用的该目标协议的信息;
第三种实现方式:该数据接收设备101获取连接模型,其中,该连接模型中包含连接该数据接收设备101每个输入端口的物联网设备102采用的协议的信息;该数据接收设备101在该连接模型中,获取连接该目标输入端口的目标物联网设备102采用的该目标协议的信息。
由于该连接模型中包含连接该数据接收设备101每个输入端口的物联网设备102采用的协议的信息,因此,该数据接收设备101在获取自身多个输入端口中任一个输入端口的连接的物联网设备102采用的协议的信息时,均可以采用上述第三种实现方式。
通过前序中对连接模型的描述可知,连接模型可以为用户根据实际物联网现场的网络拓扑情况设置,并部署到数据接收设备101中的。且该连接模型不仅可以包含连接数据接收设备101每个输入端口的物联网设备102采用的协议的信息,还可以包含:每个输入端口连接的物联网设备102的设备信息(例如:设备标识、IP地址等),即该连接模型还规定了每个输入端口与连接该输入端口的物联网设备102的设备信息的对应关系。
因此,为了保证数据接收设备101可以根据该连接模型,准确地确定每个输入端口连接的物联网设备102采用的协议,因此,该数据接收设备101在获取到该连接模型之后,在执 行步骤201之前,该数据接收设备101对该连接模型的准确性或可实施性进行验证。
例如,该连接模型中规定了数据接收设备101的输入端口Port3,连接采用S7协议的物联网设备102,且该物联网设备102的IP地址为XXX.XXX.XXXX,那么该数据接收设备101可以通过Port3,发送一个目的地址为XXX.XXX.XXXX的通过S7协议封装的验证请求,若该数据接收设备101接收到该物联网设备102返回的验证响应后,说明验证成功,否则验证失败。
通过设置该连接模型,在物联网重新布网或更改现场网络环境的情况下,无需物联网管理员对物联网中的每个数据接收设备101调整或配置需要使用的协议,数据接收设备101即可得到物联网的网络拓扑情况,以及连接的每个物联网设备102使用的协议情况,因此可以降低人力成本,并提高物联网布网效率。
步骤202:该数据接收设备101在多个协议中,确定该目标协议的信息所对应的该目标协议。
可选的,该数据接收设备101可以通过以下步骤,执行步骤202:
该数据接收设备101根据该目标协议的信息,在预设的该多个协议的协议模型中确定目标协议模型,其中,任一协议的协议模型为生成该任一协议的模板;
该数据接收设备101对该目标协议模型进行实例化,得到该目标协议。
可选的,该数据接收设备101在保存多种协议的协议模型时,也相应的保存了每个协议模型对应的协议的信息,即该数据接收设备101保存了多个协议模型和协议的信息的对应关系,这样,该数据接收设备101可以直接通过上述对应关系,准确地得到该目标协议的信息所对应的所述目标协议模型。
通过前序中对协议模型的描述可知,该目标协议模型为对采用该目标协议的设备在处理数据时采用的方法或规则的抽象。因此,该数据接收设备101需要对该目标协议模型进行实例化,才可以得到该目标协议。
可选的,该目标协议可以为以下任意一项:TCP/IP、OPC协议、OPC UA协议、S7协议、Modbus协议等。
可选的,该数据接收设备101中存储有多种协议的协议模型,例如,TCP/IP模型、OPC协议模型、OPC UA协议模型、S7协议模型、Modbus协议模型等。这样,该数据接收设备101可以在获取到多种不同的协议的信息的情况下,依然可以确定每种协议的协议模型,从而得到每种协议,提高该数据接收设备101确定具体协议的效率。
另外,可以将多种协议模型存储在该数据接收设备101中,便于该数据接收设备101对存储的多种协议模型进行添加、修改或删除等管理。
步骤203:该数据接收设备101根据该目标协议,对通过该目标输入端口接收的第一数据报文进行解封装,得到数据,该第一数据报文为该目标物联网设备102发送的。
通过步骤203,该数据结束设备可以得到该目标物联网设备102发送的数据。
可选的,在数据接收系统中还包括服务设备103的情况下,在步骤203之后,所述方法还包括:
该数据接收设备101根据服务设备103使用的协议,对该数据进行封装,得到第二数据报文;
该数据接收设备101将该第二数据报文发送给该服务设备103。
可选的,上述连接模型中还包含该数据接收设备101输出端口连接的服务设备103采用的协议的信息。因此,该数据接收设备101在根据服务设备103使用的协议,对该数据进行封装之前,还包括:
通过该服务设备103采用的协议的信息,确定该服务设备103使用的协议。其中,在本步骤中,具体的确定过程可以参见上述步骤202中确定该目标协议的过程,此处不再赘述。
需要说明的是,该数据接收设备101可以采用上述方法,确定连接每个输入端口的物联网设备102采用的目标协议,进而在通过每个输入端口接收到数据报文后,可以根据相应的协议,对接收的数据报文进行解封装,从而得到每个物联网设备102发送的数据。
采用本发明实施例提供的数据传输方法,数据接收设备获取连接自身的目标输入端口的目标物联网设备采用的目标协议的信息后,确定该目标协议,并根据所述目标协议,对该目标物联网设备通过该目标输入端口发送的第一数据报文进行解封装,得到数据。在该方案中,数据接收设备无需预先为目标物联网设备配置目标协议,而是可以自适应地根据目标物联网设备采用的目标协议的信息确定目标协议,因此,通过该方案,可以提高数据接收设备中协议的使用灵活性,从而可以降低数据接收设备维护多个协议的复杂度。
基于以上实施例,本发明实施例还提供了一种对上述方法实施例涉及到的数据接收设备的一种可选的实现方式,参阅图3所示,该数据接收设备101可以包括:获取模块301、处理模块302以及通信模块303,其中,
获取模块301,用于获取连接目标输入端口的目标物联网设备102采用的目标协议的信息,该目标输入端口为该数据接收设备的一个输入端口;
处理模块302,用于在多个协议中,确定该获取模块301获取的该目标协议的信息所对应的该目标协议;
通信模块303,用于通过该目标输入端口接收第一数据报文,该第一数据报文为该目标 物联网设备102发送的;
该处理模块302,还用于根据该目标协议,对该通信模块303接收的该第一数据报文进行解封装,得到数据。
可选的,该获取模块301,具体用于:
获取连接模型,其中,该连接模型中包含连接该数据接收设备每个输入端口的物联网设备102采用的协议的信息;
在该连接模型中,获取连接该目标输入端口的目标物联网设备102采用的该目标协议的信息。
可选的,该处理模块302在多个协议中,确定该目标协议的信息所对应的该目标协议时,具体用于:
根据该目标协议的信息,在预设的该多个协议的协议模型中确定目标协议模型,其中,任一协议的协议模型为生成该任一协议的模板;
对该目标协议模型进行实例化,得到该目标协议。
可选的该处理模块302,还用于在得到该数据之后,根据服务设备103使用的协议,对该数据进行封装,得到第二数据报文;
该通信模块303,还用于将该处理模块302得到的该第二数据报文发送给该服务设备103。
可选的,该目标协议为以下任一项:
传输控制协议TCP/因特网协议IP、用户过程控制的对象连接与嵌入OPC协议、OPC统一架构UA协议、S7协议、Modbus协议。
本发明实施例提供了一种数据接收设备,该数据接收设备获取连接自身的目标输入端口的目标物联网设备采用的目标协议的信息后,确定该目标协议,并根据所述目标协议,对该目标物联网设备通过该目标输入端口发送的第一数据报文进行解封装,得到数据。在该方案中,数据接收设备无需预先为目标物联网设备配置目标协议,而是可以自适应地根据目标物联网设备采用的目标协议的信息确定目标协议,因此,通过该方案,可以提高数据接收设备中协议的使用灵活性,从而可以降低数据接收设备维护多个协议的复杂度。
需要说明的是,上述本发明实施例中对模块的划分是示意性的,可视为是一种逻辑功能划分,实际实现时可以有另外的划分方式。在本发明实施例中的各模块可以集成在一个处理模块中,也可以是各个模块单独存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
上述数据接收设备101的另一种实现方式可参阅图4所示,该数据接收设备101可以包括:至少一个存储器401、至少一个处理器402,以及接口403,其中,
该至少一个存储器401、该至少一个处理器402以及该接口403,通过总线404相互连接;该总线404可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该总线404可以分为地址总线、数据总线、控制总线等。为便于表示,图4中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
至少一个端口403,用于与数据传输系统中的其他设备(例如物联网设备102、服务设备103等)进行通信交互。其中,该至少一个端口403中可以包括输入端口和输出端口,输入端口用于接收物联网设备102发送的数据报文,输出端口用于向服务设备103发送数据报文。
该至少一个处理器402,用于实现如图2所示的数据传输方法,包括:
获取连接该至少一个端口403中的目标输入端口的目标物联网设备102采用的目标协议的信息,该目标输入端口为该数据接收设备的一个输入端口;
在多个协议中,确定该目标协议的信息所对应的该目标协议;
根据该目标协议,对通过该目标输入端口接收的第一数据报文进行解封装,得到数据,该第一数据报文为该目标物联网设备102发送的。
可选的,该至少一个处理器402在获取连接该目标输入端口的目标物联网设备102采用的该目标协议的信息时,具体用于:
获取连接模型,其中,该连接模型中包含连接该数据接收设备每个输入端口的物联网设备102采用的协议的信息;
在该连接模型中,获取连接该目标输入端口的目标物联网设备102采用的该目标协议的信息。
可选的,该至少一个处理器402在该数据接收设备在多个协议中,确定该目标协议的信息所对应的该目标协议时,具体用于:
根据该目标协议的信息,在预设的该多个协议的协议模型中确定目标协议模型,其中,任一协议的协议模型为生成该任一协议的模板;
对该目标协议模型进行实例化,得到该目标协议。
可选的,该至少一个处理器402,还用于:
在得到该数据之后,根据服务设备103使用的协议,对该数据进行封装,得到第二数据报文;
通过该至少一个端口中的输出端口,将该第二数据报文发送给该服务设备103。
可选的,该至少一个存储器401,用于存储计算机程序。具体地,该程序可以包括程序代码,该程序代码包括计算机操作指令。该至少一个存储器401可能包含至少一个随机存取存储器(Random Access Memory,RAM),也可能还包括至少一个非易失性存储器(non-volatile memory),例如是至少一个磁盘。其中至少一个处理器402调用至少一个存储器401中存储的计算机程序,可以实现上述功能,从而实现如图2所示的数据传输方法。
本发明实施例提供了一种数据接收设备,该数据接收设备获取连接自身的目标输入端口的目标物联网设备采用的目标协议的信息后,确定该目标协议,并根据所述目标协议,对该目标物联网设备通过该目标输入端口发送的第一数据报文进行解封装,得到数据。在该方案中,数据接收设备无需预先为目标物联网设备配置目标协议,而是可以自适应地根据目标物联网设备采用的目标协议的信息确定目标协议,因此,通过该方案,可以提高数据接收设备中协议的使用灵活性,从而可以降低数据接收设备维护多个协议的复杂度。
本发明实施例还提供了一种计算机可读介质,该计算机可读介质上存储用于使一机器执行如本文所述的数据传输方法的计算机指令。具体地,可以提供配有该计算机可读介质的系统或者装置,在该计算机可读介质上存储着实现上述实施例中任一实施例的功能的软件程序代码,且使该系统或者装置的计算机(或中央处理器(Central Processing Unit,CPU)或微处理器(Micro Processor Unit,MPU))读出并执行存储在存储介质中的程序代码。
在这种情况下,从存储介质读取的程序代码本身可实现上述实施例中任何一项实施例的功能,因此程序代码和存储程序代码的存储介质构成了本发明实施例的一部分。
用于提供程序代码的存储介质实施例包括软盘、硬盘、磁光盘、光盘(如只读光盘驱动器(Compact Disc Read-Only Memory,CD-ROM)、可录光盘(Compact Disk-Recordable,CD-R)、可擦写光盘(Compact Disk-ReWritable,CD-RW)、数字视盘(Digital Video Disc-Read Only Memory,DVD-ROM)、数字多功能光盘随机存储器(Digital Versatile Disc-Random Access Memory,DVD-RAM)、可重写型数字多功能光盘(Digital Versatile Disc±ReWritable,DVD±RW)等)、磁带、非易失性存储卡和只读存储器(Read-Only Memory,ROM)。可选择地,可以由通信网络从服务器计算机上下载程序代码。
此外,应该清楚的是,不仅可以通过执行计算机所读出的程序代码,而且可以通过基于程序代码的指令使计算机上操作的操作系统等来完成部分或者全部的实际操作,从而实现上述实施例中任意一项实施例的功能。
此外,可以理解的是,将由存储介质读出的程序代码写到插入计算机内的扩展板中所设置的存储器中或者写到与计算机相连接的扩展单元中设置的存储器中,随后基于程序代码的 指令使安装在扩展板或者扩展单元上的CPU等来执行部分和全部实际操作,从而实现上述实施例中任一实施例的功能。
需要说明的是,上述各流程和各系统结构图中不是所有的步骤和模块都是必须的,可以根据实际的需要忽略某些步骤或模块。各步骤的执行顺序不是固定的,可以根据需要进行调整。上述各实施例中描述的系统结构可以是物理结构,也可以是逻辑结构,即,有些模块可能由同一物理实体实现,或者,有些模块可能分由至少两个物理实体实现,或者,可以由至少两个独立设备中的某些部件共同实现。
以上各实施例中,硬件单元可以通过机械方式或电气方式实现。例如,一个硬件单元可以包括永久性专用的电路或逻辑(如专门的处理器,现场可编程门阵列(Field-Programmable Gate Array,FPGA)或专用集成电路(Application Specific Intergrated Circuits,ASIC)等)来完成相应操作。硬件单元还可以包括可编程逻辑或电路(如通用处理器或其它可编程处理器),可以由软件进行临时的设置以完成相应操作。具体的实现方式(机械方式、或专用的永久性电路、或者临时设置的电路)可以基于成本和时间上的考虑来确定。
上文通过附图和优选实施例对本发明实施例进行了详细展示和说明,然而本发明实施例不限于这些已揭示的实施例,基与上述实施例本领域技术人员可以知晓,可以组合上述不同实施例中的代码审核手段得到本发明更多的实施例,这些实施例也在本发明实施例的保护范围之内。

Claims (12)

  1. 数据传输方法,其特征在于,所述方法包括:
    数据接收设备(101)获取连接目标输入端口的目标物联网设备(102)采用的目标协议的信息,所述目标输入端口为所述数据接收设备(101)的一个输入端口;
    所述数据接收设备(101)在多个协议中,确定所述目标协议的信息所对应的所述目标协议;
    所述数据接收设备(101)根据所述目标协议,对通过所述目标输入端口接收的第一数据报文进行解封装,得到数据,所述第一数据报文为所述目标物联网设备(102)发送的。
  2. 如权利要求1所述的方法,其特征在于,数据接收设备(101)获取连接所述目标输入端口的目标物联网设备(102)采用的所述目标协议的信息,包括:
    所述数据接收设备(101)获取连接模型,其中,所述连接模型中包含连接所述数据接收设备(101)每个输入端口的物联网设备(102)采用的协议的信息;
    所述数据接收设备(101)在所述连接模型中,获取连接所述目标输入端口的目标物联网设备(102)采用的所述目标协议的信息。
  3. 如权利要求1所述的方法,其特征在于,所述数据接收设备(101)在多个协议中,确定所述目标协议的信息所对应的所述目标协议,包括:
    所述数据接收设备(101)根据所述目标协议的信息,在预设的所述多个协议的协议模型中确定目标协议模型,其中,任一协议的协议模型为生成所述任一协议的模板;
    所述数据接收设备(101)对所述目标协议模型进行实例化,得到所述目标协议。
  4. 如权利要求1所述的方法,其特征在于,在所述数据接收设备(101)得到所述数据之后,所述方法还包括:
    所述数据接收设备(101)根据服务设备(103)使用的协议,对所述数据进行封装,得到第二数据报文;
    所述数据接收设备(101)将所述第二数据报文发送给所述服务设备(103)。
  5. 如权利要求1-4任一项所述的方法,其特征在于,所述目标协议为以下任一项:
    传输控制协议TCP/因特网协议IP、用户过程控制的对象连接与嵌入OPC协议、OPC统一架构UA协议、S7协议、Modbus协议。
  6. 一种数据接收设备(101),其特征在于,包括:
    获取模块(301),用于获取连接目标输入端口的目标物联网设备(102)采用的目标协议的信息,所述目标输入端口为所述数据接收设备(101)的一个输入端口;
    处理模块(302),用于在多个协议中,确定所述获取模块(301)获取的所述目标协议的信息所对应的所述目标协议;
    通信模块(303),用于通过所述目标输入端口接收第一数据报文,所述第一数据报文为所述目标物联网设备(102)发送的;
    所述处理模块(302),还用于根据所述目标协议,对所述通信模块(303)接收的所述第一数据报文进行解封装,得到数据。
  7. 如权利要求6所述的设备,其特征在于,所述获取模块(301),具体用于:
    获取连接模型,其中,所述连接模型中包含连接所述数据接收设备(101)每个输入端口的物联网设备(102)采用的协议的信息;
    在所述连接模型中,获取连接所述目标输入端口的目标物联网设备(102)采用的所述目标协议的信息。
  8. 如权利要求6所述的设备,其特征在于,所述处理模块(302)在多个协议中,确定所述目标协议的信息所对应的所述目标协议时,具体用于:
    根据所述目标协议的信息,在预设的所述多个协议的协议模型中确定目标协议模型,其中,任一协议的协议模型为生成所述任一协议的模板;
    对所述目标协议模型进行实例化,得到所述目标协议。
  9. 如权利要求6所述的设备,其特征在于,
    所述处理模块(302),还用于:
    在得到所述数据之后,根据服务设备(103)使用的协议,对所述数据进行封装,得到第二数据报文;
    所述通信模块(303),还用于:
    将所述处理模块(302)得到的所述第二数据报文发送给所述服务设备(103)。
  10. 如权利要求6-9任一项所述的设备,其特征在于,所述目标协议为以下任一项:
    传输控制协议TCP/因特网协议IP、用户过程控制的对象连接与嵌入OPC协议、OPC统一架构UA协议、S7协议、Modbus协议。
  11. 数据接收设备(101),其特征在于,所述设备包括至少一个存储器(401)、至少一个处理器(402)和至少一个端口(403),其中:
    所述至少一个存储器(401),用于存储计算机程序;
    所述至少一个端口(403),用于发送和接收数据;
    所述至少一个处理器(402),用于调用所述至少一个存储器(401)中存储的计算机程序,以基于所述至少一个端口(403)发送和接收数据的功能执行如权利要求1-5中任一项所述的方法。
  12. 一种计算机可读介质,其特征在于,所述计算机可读介质上存储有计算机指令,所 述计算机指令在被处理器调用时,使所述处理器执行如权利要求1-5中任一项所述的方法。
PCT/CN2017/086206 2017-05-25 2017-05-26 数据传输方法和装置 WO2018214168A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US16/615,683 US11343317B2 (en) 2017-05-25 2017-05-26 Data transmission method and device
EP17910845.1A EP3618378A4 (en) 2017-05-26 2017-05-26 DATA TRANSMISSION PROCESS AND APPARATUS
CN201780089064.5A CN110495149B (zh) 2017-05-26 2017-05-26 数据传输方法和装置
PCT/CN2017/086206 WO2018214168A1 (zh) 2017-05-26 2017-05-26 数据传输方法和装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/086206 WO2018214168A1 (zh) 2017-05-26 2017-05-26 数据传输方法和装置

Publications (1)

Publication Number Publication Date
WO2018214168A1 true WO2018214168A1 (zh) 2018-11-29

Family

ID=64395184

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/086206 WO2018214168A1 (zh) 2017-05-25 2017-05-26 数据传输方法和装置

Country Status (3)

Country Link
EP (1) EP3618378A4 (zh)
CN (1) CN110495149B (zh)
WO (1) WO2018214168A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110225076A (zh) * 2019-04-16 2019-09-10 深圳壹账通智能科技有限公司 文件交互方法、装置、电子设备及存储介质
CN113381999A (zh) * 2021-06-08 2021-09-10 杭州昊美科技有限公司 通信方法、装置及电子设备
CN114666356A (zh) * 2020-12-04 2022-06-24 中国联合网络通信集团有限公司 数据采集网关的控制方法、装置和存储介质
WO2024067882A1 (en) * 2022-09-29 2024-04-04 Wuhan United Imaging Healthcare Co., Ltd. Methods, systems, and devices for data transmission

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114697355B (zh) * 2020-12-28 2024-05-07 比亚迪股份有限公司 一种数据处理方法及物联网网关设备
CN113783893A (zh) * 2021-09-29 2021-12-10 远景智能国际私人投资有限公司 数据传输方法、装置及系统
CN115086444A (zh) * 2022-06-02 2022-09-20 广联达科技股份有限公司 数据传输方法、装置、电子设备及系统

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060067209A1 (en) * 2004-07-29 2006-03-30 Modius, Inc. Universal configurable device gateway
CN101582895A (zh) * 2009-06-18 2009-11-18 重庆邮电大学 基于epa的嵌入式工业无线wia-pa网关
CN101741819A (zh) * 2008-11-21 2010-06-16 上海电机学院 一种协议转换网关
CN102059256A (zh) * 2010-11-26 2011-05-18 首钢总公司 一种用于高线轧机的设备运行和工艺量状态监测系统
CN104345717A (zh) * 2014-10-17 2015-02-11 武汉华大优能信息有限公司 一种基于物联网的智能远程数据采集系统
CN106533886A (zh) * 2016-12-09 2017-03-22 重庆邮电大学 基于IPv6协议的全互联制造网络架构及管理方法

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7194550B1 (en) * 2001-08-30 2007-03-20 Sanera Systems, Inc. Providing a single hop communication path between a storage device and a network switch
US9473380B1 (en) * 2013-06-13 2016-10-18 Narus, Inc. Automatic parsing of binary-based application protocols using network traffic
IN2013MU02890A (zh) * 2013-09-05 2015-07-03 Tata Consultancy Services Ltd
US9572020B2 (en) * 2013-09-19 2017-02-14 Honeywell International Inc. Apparatus and method supporting wireless communications between devices using different application protocols in industrial control and automation systems
US10693906B2 (en) * 2015-09-24 2020-06-23 Saudi Arabian Oil Company Providing secure data transfer between networks

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060067209A1 (en) * 2004-07-29 2006-03-30 Modius, Inc. Universal configurable device gateway
CN101741819A (zh) * 2008-11-21 2010-06-16 上海电机学院 一种协议转换网关
CN101582895A (zh) * 2009-06-18 2009-11-18 重庆邮电大学 基于epa的嵌入式工业无线wia-pa网关
CN102059256A (zh) * 2010-11-26 2011-05-18 首钢总公司 一种用于高线轧机的设备运行和工艺量状态监测系统
CN104345717A (zh) * 2014-10-17 2015-02-11 武汉华大优能信息有限公司 一种基于物联网的智能远程数据采集系统
CN106533886A (zh) * 2016-12-09 2017-03-22 重庆邮电大学 基于IPv6协议的全互联制造网络架构及管理方法

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BAI HUADONG: "Development and Application of EtherNet-Modbus Protocol Conversion Module", LOW VOLTAGE APPARATUS, 30 September 2009 (2009-09-30), pages 39 - 41, XP055648015, ISSN: 1001-5531 *
See also references of EP3618378A4 *
WU ET AL: "Application of Multiplex Protocol Gateway on Upgrading PLC System", ELECTRIC DRIVE, vol. 38, no. 8, 31 August 2008 (2008-08-31), pages 69 - 71, XP055648014, ISSN: 1001-2095 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110225076A (zh) * 2019-04-16 2019-09-10 深圳壹账通智能科技有限公司 文件交互方法、装置、电子设备及存储介质
CN114666356A (zh) * 2020-12-04 2022-06-24 中国联合网络通信集团有限公司 数据采集网关的控制方法、装置和存储介质
CN114666356B (zh) * 2020-12-04 2023-07-25 中国联合网络通信集团有限公司 数据采集网关的控制方法、装置和存储介质
CN113381999A (zh) * 2021-06-08 2021-09-10 杭州昊美科技有限公司 通信方法、装置及电子设备
WO2024067882A1 (en) * 2022-09-29 2024-04-04 Wuhan United Imaging Healthcare Co., Ltd. Methods, systems, and devices for data transmission

Also Published As

Publication number Publication date
EP3618378A1 (en) 2020-03-04
CN110495149A (zh) 2019-11-22
EP3618378A4 (en) 2020-09-09
CN110495149B (zh) 2022-04-08

Similar Documents

Publication Publication Date Title
WO2018214168A1 (zh) 数据传输方法和装置
US11343317B2 (en) Data transmission method and device
CN108055202B (zh) 一种报文处理设备和方法
TWI746506B (zh) 用於網路的負載均衡、控制及網路交互的方法和裝置
US8645567B2 (en) Method and system for packet filtering for local host-management controller pass-through communication via network controller
EP2297648B1 (en) Network controller based pass-through communication mechanism between local host and management controller
WO2018040529A1 (zh) 一种报文处理方法、设备及系统
EP2696538A1 (en) Method, system and controlling bridge for obtaining port extension topology information
CN107580768B (zh) 报文传输的方法、装置和系统
US11497077B2 (en) Method and apparatus for port management of ethernet bridges
WO2018210225A1 (zh) 一种自动实现ioam封装的方法及装置、存储介质
CN109412922B (zh) 一种传输报文的方法、转发设备、控制器及系统
CN113810206B (zh) 一种网络自动化编排管理方法、实体、控制器及电子设备
WO2018188663A1 (zh) 信息通告方法及装置
WO2018085973A1 (zh) 一种网络切片的管理方法、单元和系统
CN111835764B (zh) 一种arp防欺骗方法、隧道端点以及电子设备
CN110326262B (zh) 将无线设备抽象为虚拟以太网接口
TW202014017A (zh) 標準化網路協定的精確時間同步
US20170289318A1 (en) Implementing logical endpoints in internet-enabled devices
CN103973753A (zh) 一种数据处理的方法与设备
CN110661850B (zh) 一种边缘计算方法、系统、计算机设备和存储介质
US11411797B2 (en) Device management method and related device
US20220312211A1 (en) System and device for verifying function of radio base station
CN115866544A (zh) 分流方法、代理网关和分流系统
CN105049239A (zh) 接口连接关系的识别方法和系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17910845

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017910845

Country of ref document: EP

Effective date: 20191126