Information processing method and device between Internet of Things equipment and cloud platform

By determining its communication protocol with IoT devices, analyzing and converting information, the effective connection and secure interaction between IoT devices and cloud platforms are achieved, and the integration and communication problems caused by non-standard protocols are solved.

CN119484582APending Publication Date: 2025-02-18AGRICULTURAL BANK OF CHINA
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411667686.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

IoT devices use non-standard protocols to communicate with cloud platforms, resulting in system integration and communication problems. How to achieve effective connection and secure interaction between IoT devices and cloud platforms.

Method used

By establishing a connection with IoT devices, determining their communication protocols, receiving original information, parsing and converting the protocol, encapsulating it into a target protocol, and sending it to the cloud platform for processing.

Benefits of technology

It realizes information interaction between IoT devices and cloud platforms, ensures effective connection and secure interaction between devices and cloud platforms, and solves the compatibility problems caused by non-standard protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484582A_ABST
    Figure CN119484582A_ABST
Patent Text Reader

Abstract

The invention discloses an information processing method and device between Internet of Things equipment and a cloud platform. Establishing connection with the Internet of Things equipment, determining a communication protocol adopted by the Internet of Things equipment, and obtaining an original protocol; receiving first original information sent by the Internet of Things equipment, and analyzing the first original information based on the original protocol to obtain first analysis data; performing protocol conversion on the first analysis data to obtain first target information; wherein the first target information is packaged through a target protocol; and establishing connection with a cloud platform, and sending the first target information to the cloud platform for processing. According to the information processing method between the Internet of Things equipment and the cloud platform provided by the embodiment of the invention, information interaction between the Internet of Things equipment and the cloud platform is realized, and effective connection and secure interaction between the Internet of Things equipment and the cloud platform are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of Internet of Things technology, and in particular, to a method, apparatus, device and storage medium for information processing between an Internet of Things device and a cloud platform. Background Art

[0002] With the rapid advancement of Internet technology, the Internet of Things (IoT) has gradually become a core component of the modern science and technology field. IoT devices have been widely infiltrated into multiple industries, such as environmental monitoring, smart home, industrial control, and healthcare, becoming an important technology application.

[0003] However, the diversity and dispersion of IoT devices have brought a series of challenges, especially in terms of the diversity of device communication protocols. Many IoT devices use their own customized protocols, proprietary protocols or non-standard protocols. These non-standard protocol devices have brought considerable difficulties to the integration and communication of the overall system. Therefore, how to solve these challenges to achieve effective connection between IoT devices and cloud platforms has become an urgent problem to be solved. Summary of the invention

[0004] The embodiments of the present invention provide a method and apparatus for information processing between an IoT device and a cloud platform, so as to realize information interaction between the IoT device and the cloud platform and ensure effective connection and secure interaction between the IoT device and the cloud platform.

[0005] In a first aspect, an embodiment of the present invention provides a method for processing information between an IoT device and a cloud platform, including:

[0006] Establishing a connection with an IoT device and determining the communication protocol used by the IoT device to obtain an original protocol;

[0007] Receiving first original information sent by the IoT device, and parsing the first original information based on the original protocol to obtain first parsed data;

[0008] Performing protocol conversion on the first parsed data to obtain first target information; wherein the first target information is encapsulated by a target protocol;

[0009] A connection is established with the cloud platform, and the first target information is sent to the cloud platform for processing.

[0010] In a second aspect, an embodiment of the present invention further provides an information processing device between an IoT device and a cloud platform, including:

[0011] A connection module, used to establish a connection with an IoT device and determine the communication protocol used by the IoT device to obtain an original protocol;

[0012] A first parsing module, configured to receive first original information sent by the IoT device, and parse the first original information based on the original protocol to obtain first parsed data;

[0013] A protocol conversion module, used to perform protocol conversion on the first parsed data to obtain first target information; wherein the first target information is encapsulated by a target protocol;

[0014] The first target information sending module is used to establish a connection with the cloud platform and send the first target information to the cloud platform for processing.

[0015] The embodiment of the present invention discloses a method and apparatus for information processing between an IoT device and a cloud platform, including: establishing a connection with an IoT device and determining the communication protocol adopted by the IoT device to obtain an original protocol; receiving a first original message sent by the IoT device, and parsing the first original message based on the original protocol to obtain first parsed data; performing protocol conversion on the first parsed data to obtain first target information; wherein the first target information is encapsulated by a target protocol; establishing a connection with a cloud platform, and sending the first target information to the cloud platform for processing. The information processing method between an IoT device and a cloud platform provided by the embodiment of the present invention is used to realize information interaction between an IoT device and a cloud platform, and ensure effective connection and secure interaction between the IoT device and the cloud platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a flow chart of an information processing method between an Internet of Things device and a cloud platform in Embodiment 1 of the present invention;

[0017] Figure 2 It is a structural schematic diagram of an information processing device between an Internet of Things device and a cloud platform in Embodiment 2 of the present invention;

[0018] Figure 3 It is a structural schematic diagram of an electronic device in Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0019] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0020] In order to solve the problem of IoT devices using non-standard protocols to communicate with cloud platforms, the main existing solutions can be roughly summarized into two categories: IoT device-side adaptation and cloud platform-side adaptation.

[0021] 1. IoT device adaptation: The core idea of ​​this solution is to modify or add code directly on the IoT device so that the device can support the standard protocol required to communicate with the cloud platform. For example, the device may originally use a customized, non-standard protocol. Developers can implement a standard protocol (such as MQTT) on the device so that the device can communicate directly with the cloud platform.

[0022] 2. Cloud platform adaptation: Another solution is to add or modify code directly on the cloud platform so that the cloud platform can support non-standard protocols used by devices. For example, the cloud platform may originally only support the Message Queuing Telemetry Transport (MQTT) protocol, and developers can implement support for non-standard protocols used by devices on the cloud platform.

[0023] IoT device adaptation: Modifying device code requires sufficient development resources and a deep understanding of the internal structure of the device. In addition, if the number of devices is large or the device types are diverse, modifying the code of all devices may take a lot of time and resources. Finally, modifying the device code may affect the stability and security of the device.

[0024] Cloud platform adaptation: First, modifications to the cloud platform may affect the stability and performance of the platform. Second, since there may be many non-standard protocols used by devices, the cloud platform needs to support all of these protocols, which may require a lot of development resources. Finally, modifications to the cloud platform may need to undergo rigorous auditing and testing, which may take a lot of time.

[0025] Embodiment 1

[0026] Figure 1 A flowchart of an information processing method between an IoT device and a cloud platform is provided in Embodiment 1 of the present invention. This embodiment is applicable to information processing between an IoT device and a cloud platform. The method can be executed by an information processing device between the IoT device and the cloud platform. The device can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc.

[0027] The solution in this embodiment includes two parts: one is a gateway program developed in Java language based on the Netty framework, and the other is a small device that can run the gateway program.

[0028] The gateway program can receive and parse IoT device messages of non-standard protocols, convert these messages into standard protocols, and finally send these messages to the cloud platform through standard protocols. The configuration of the small device includes the following: (1) Processor: The device can be configured with a quad-core processor to support the Ubuntu operating system and Java runtime environment. The processor can provide sufficient computing power to process the relevant logic of the gateway program. (2) Memory: The small device is configured with 8GB of memory to cache data and programs when the gateway program is running. Such memory capacity is sufficient to run the gateway program and process a large number of device messages. (3) Disk storage: The device uses 64GB eMMC Flash for storage. This storage device is used to store the operating system, gateway program and its related configuration files, log files, etc. In addition, the read and write speed of eMMC Flash is fast, which can meet the data reading and writing requirements of the gateway program. (4) Network interface: The small device has an Ethernet interface and can be connected to the network via a wired method. At the same time, the device also supports wireless connection methods such as Wi-Fi and Bluetooth, allowing the device to run in a wireless environment. (5) Operating system: The device runs the Ubuntu operating system based on the ARM architecture. Ubuntu is an open source Linux distribution with rich software support and can run Java programs. (6) Power supply: The device is powered by a 5V / 3A power adapter. The power supply can provide stable voltage and current to ensure the normal operation of the device. (7) Dimensions: The size of the small device is designed to be 120mm*90mm*40mm, which is convenient for deployment in various environments. (8) Environmental requirements: The small device can operate in an ambient temperature of -20℃ to 60℃, meeting the operating requirements of most environments.

[0029] like Figure 1 As shown, the method specifically comprises the following steps:

[0030] S110, establishing a connection with the IoT device and determining the communication protocol adopted by the IoT device to obtain the original protocol.

[0031] In this embodiment, the IoT device is connected to the small device through an adapter of the corresponding protocol (such as a wireless network card, a wired network card, Bluetooth, a serial port, etc.). The original protocol can be MQTT, Modbus, Bluetooth Low Energy (BLE), Controller Area Network (CAN), Extensible Messaging and Presence Protocol (XMPP), Open Charge Point Protocol (OCPP), Socket.

[0032] Optionally, the method of establishing a connection with an IoT device and determining the communication protocol adopted by the IoT device may be: receiving a connection request sent by the IoT device; establishing a network connection with the network device based on a network address; authenticating the IoT device based on authentication information to obtain an authentication result; if the authentication result is passed, determining the communication protocol adopted by the IoT device based on the device identification.

[0033] The connection request includes authentication information, network address and device identification. In this embodiment, the connection process involves steps such as device identification, network connection, protocol identification, and device authentication.

[0034] For device identification: When the IoT device tries to establish a connection, the small device must first perform a device identification process. The identification process may include but is not limited to obtaining basic information such as the device MAC address, IP address, and device model, which can help the small device identify the type of IoT device it is trying to access. For network connection: The IoT device will then establish a stable network connection with the small device. The connection can be through a wired network, a wireless network, Bluetooth, CAN, Modbus, etc. This process may involve the configuration of network parameters, including but not limited to IP address, subnet mask, default gateway, etc. For device authentication: In order to ensure the legitimacy of the IoT device, the small device needs to authenticate the IoT device. This process may include but is not limited to: password authentication, digital certificate authentication, hardware ID matching, and other methods. Only devices that have successfully authenticated can further communicate with the small device. For protocol identification: After the IoT device successfully accesses the network and passes the authentication, the small device needs to identify the specific communication protocol used by the device. This process can be completed based on the device's initial handshake information, the device's model information, and the device's pre-registered protocol information.

[0035] Through the above steps, the IoT device successfully established a stable and secure network connection with the small device, and obtained the communication protocol of the IoT device, laying the foundation for subsequent message reception and parsing.

[0036] S120, receiving first original information sent by the IoT device, and parsing the first original information based on an original protocol to obtain first parsed data.

[0037] Optionally, a first original information sent by an IoT device is received, and the first original information is parsed based on an original protocol to obtain first parsed data in the following manner: verifying the integrity and / or consistency of the first original information; if the verification passes, decoding the first original information; parsing the decoded first original information based on the original protocol to obtain first parsed data; and formatting the first parsed data according to a preset format conversion rule to obtain first parsed data after the format conversion.

[0038] In this embodiment, after establishing a connection with an IoT device, its message will be received and parsed. The specific process includes: message reception, message decoding, message parsing, and data format conversion.

[0039] For message reception: After the IoT device successfully establishes a network connection, the gateway program starts to receive messages. These messages may include device status updates, data transmission, command responses, etc. The gateway program will perform preliminary checks on the received messages, such as checking the integrity and consistency of the messages, and then store them in its internal buffer. For message decoding: The received messages are generally encoded, including but not limited to BASE64, hexadecimal encoding (HEX) and other encoding methods. Therefore, the gateway program needs to decode the received messages. This process requires the gateway program to determine and be able to handle the specific encoding method used by the IoT device. For message parsing: After the message decoding is completed, the gateway program needs to parse the message according to the communication protocol used by the device. This process involves splitting the message according to the format and structure specified by the protocol, and extracting the various parts of the message, such as commands, parameters, data, etc. For data format conversion: In the process of message parsing, some data format conversion operations are involved. For example, some data needs to be converted from binary to decimal, or some text data needs to be converted from one character encoding (such as GBK) to another character encoding (such as UTF-8). Through the above steps, the gateway program receives and parses the messages sent by the IoT devices and obtains data that can be further processed. This provides the necessary input information for subsequent protocol conversion and message sending.

[0040] S130, performing protocol conversion on the first parsed data to obtain first target information.

[0041] The first target information is encapsulated by a target protocol. Exemplarily, the target protocol may be the MQTT protocol.

[0042] Optionally, the first parsed data may be subjected to protocol conversion to obtain the first target information by: obtaining a data structure mapping relationship between the original protocol and the target protocol; converting the data structure of the first parsed data based on the data structure mapping relationship; and assembling the first parsed data after the data structure conversion according to the target protocol to obtain the first target information.

[0043] In this embodiment, after receiving and parsing the message, the parsed data needs to be converted into a protocol supported by the cloud platform. This process mainly includes two steps: message mapping and message construction.

[0044] For message mapping: When the message of the original protocol is parsed, the gateway program needs to map the parsed data to the message format of the target protocol. This involves the conversion of data types, data structures, commands, etc., in order to comply with the protocol specifications of the cloud platform. For message construction: According to the target protocol, the gateway program needs to construct a new message of the target protocol. For example, assuming that the target protocol is the MQTT protocol, the constructed message includes the following main parts: (1) Fixed header: This part includes the message type (such as CONNECT, PUBLISH, SUBSCRIBE, etc.), the quality level of the message (QoS level), reserved bits and remaining length, etc. (2) Variable header: The content of this part depends on the message type of the fixed header. For example, for the PUBLISH message, the variable header contains the topic name and the message identifier. (3) Payload: This part contains the actual application message. Its content depends on the message type of the fixed header and the specific content of the variable header. Through the above steps, the gateway program successfully converts the message of the original protocol into the message of the target protocol, providing a basis for sending subsequent messages to the cloud platform.

[0045] S140, establishing a connection with the cloud platform, and sending the first target information to the cloud platform for processing.

[0046] In this embodiment, after constructing the message of the target protocol, the message needs to be sent to the cloud platform. If it is the first time to send, it is necessary to establish a connection with the cloud platform first. Optionally, the way to establish a connection with the cloud platform can be: obtaining connection-related information of the cloud platform; establishing a connection with the cloud platform based on the connection-related information; negotiating a connection with the cloud platform to obtain a negotiation result; if the negotiation result is a successful negotiation, periodically sending heartbeat information to the cloud platform to maintain the connection with the cloud platform.

[0047] The connection related information includes: network address, port information, authentication information. In this embodiment, the connection process with the cloud platform mainly includes the following steps: cloud platform information configuration, connection establishment, connection negotiation, and connection maintenance.

[0048] Specifically, for cloud platform information configuration: In order to connect to a specific cloud platform, the gateway program needs to pre-configure relevant information about the cloud platform, including the address of the cloud platform (such as URL or IP address), port, and related authentication information (such as username and password, or digital certificate). For connection establishment: The gateway program uses the pre-configured information to try to establish a connection with the cloud platform. This process may involve multiple network protocols, such as TCP / IP, SSL / TLS, etc., as well as possible authentication processes. If the connection establishment fails, the gateway program needs to be able to handle the corresponding errors and try to re-establish the connection. For connection negotiation: Once the network connection is established, the gateway program needs to negotiate the connection of the target protocol. This includes sending a CONNECT message to the cloud platform and receiving a CONNACK message from the cloud platform. If the negotiation fails, for example, because the CONNACK message returned by the cloud platform indicates that the connection is rejected, the gateway program needs to be able to handle the corresponding errors. For connection maintenance: After the connection is established and the connection negotiation is successful, the gateway program needs to maintain the active state of the connection. This includes sending MQTT's PINGREQ and PINGREESP messages to detect the active state of the connection, and handling corresponding network problems and errors. Through the above steps, the gateway program successfully establishes a connection with the cloud platform and is ready to send the converted MQTT message.

[0049] Optionally, the first target information may be sent to the cloud platform for processing by: writing the first target information into a queue according to priority; reading the first target information from the queue according to priority; and sending the read first target information to the cloud platform for processing.

[0050] In this embodiment, sending the first target information to the cloud platform for processing mainly includes the following steps: message queuing and management, message sending, sending confirmation processing, error and exception handling.

[0051] Specifically, for message queuing and management: After the messages of IoT devices are converted into messages of the target protocol, these messages will be added to Netty's event loop. Netty's event loop is responsible for managing all messages to be sent, including sorting them according to their priority and handling possible network delays so that messages can be sent when the network is available. For message sending: When the event loop is ready for I / O operations, Netty extracts MQTT messages from the queue of messages to be sent, encodes them into bytes using the encoder of its processing pipeline, and then sends them to the established connection. This process can handle the sending of messages at various QoS levels. For sending confirmation processing: In Netty's processing pipeline, once the sending is completed and the confirmation message is received from the cloud platform, a new event will be triggered, and the processor with this event is responsible for processing these confirmation messages. For example, if the QoS level of an MQTT message is 1 or 2, after receiving the PUBACK, PUBREC, or PUBCOMP message from the cloud platform, the corresponding processor needs to remove the message from the queue to be sent. For error and exception handling: The Netty framework provides a processing mechanism for network errors and exceptions. If errors or exceptions are encountered during the message sending process, such as network interruption or message timeout, Netty's processing pipeline can capture these exceptions and then handle them through the configured exception handler, such as re-establishing the connection, resending the message, recording the error log, etc. In this embodiment, with the help of the Netty framework, the network management program can effectively send the messages received from the IoT device to the cloud platform for processing.

[0052] Optionally, after sending the first target information to the cloud platform for processing, the following steps are also included: receiving second original information sent by the cloud platform; performing protocol conversion on the second original information to obtain second target information; sending the second target information to the Internet of Things device, so that the Internet of Things device executes the operation corresponding to the second target information.

[0053] The second original information is encapsulated by the target protocol; the second target information is encapsulated by the original protocol. In this embodiment, receiving the message sent by the cloud platform mainly includes the following steps: message queuing and management, confirmation processing of message reception, and error and exception processing.

[0054] Specifically, for message queuing and management, after receiving the second original information sent by the cloud platform, these messages will be added to Netty's event loop. Netty's event loop is responsible for managing all messages to be sent and handling possible network delays so that messages can be sent when the network is available. For confirmation processing of message reception: For messages that require feedback to the cloud platform (such as messages with QoS level 1 or 2), the Netty message processor will create a corresponding confirmation message and then add it to the message queue to be sent, waiting for Netty's event loop to send it. For error and exception handling: The Netty framework provides a processing mechanism for network errors and exceptions. If errors or exceptions are encountered during message sending, such as network interruption or message timeout, Netty's processing pipeline can capture these exceptions and then handle them through the configured exception handler, such as re-establishing the connection, resending the message, and recording the error log.

[0055] Optionally, the second original information is subjected to protocol conversion, and the method for obtaining the second target information may be: decoding the second original information; parsing the decoded second original information based on the target protocol to obtain second parsed data; obtaining the data structure mapping relationship between the original protocol and the target protocol; converting the data structure of the second parsed data based on the data structure mapping relationship; encapsulating the second parsed data after the data structure conversion to obtain the second target information.

[0056] In this embodiment, the protocol conversion of the second original information mainly includes the following steps: message parsing, protocol mapping search, data conversion, and device instruction generation.

[0057] Specifically, for message parsing: when receiving a message of the target protocol from the cloud platform, the gateway program will decode it into a data format that can be processed by the program, and then process it according to its message type. For example, if it is a PUBLISH type message, its subject name and payload will be parsed, and then related operations will be performed. For protocol mapping search: for each received message of the target protocol, the gateway program will find the corresponding non-standard protocol in the protocol mapping table based on the context information of the current connection. The protocol mapping table contains the mapping relationship from the target protocol to the original protocol of a certain device. For data conversion: based on the mapping relationship found, the gateway program converts the data content of the message of the target protocol into the original protocol format. This may require operations such as encoding, formatting or reordering the data. For device instruction generation: the converted non-standard protocol is encapsulated into device instructions, which may contain information such as device address, function code and data content, and can be recognized and executed by the device. After the above steps, the gateway program converts the message received from the cloud platform into the device instruction of the original protocol that the device can understand.

[0058] Optionally, the process of sending the second target information to the IoT device may be: constructing a data packet based on the second target information and determining a communication interface; and sending the data packet to the IoT device through the communication interface.

[0059] In this embodiment, sending the second target information to the IoT device mainly includes the following steps: data packet creation, communication interface selection, data transmission, transmission confirmation, error and exception handling.

[0060] Specifically, for data packet creation: create a device data packet according to the device instructions generated above. This data packet is usually created according to the specifications of the non-standard protocol and may contain information such as the device address, function code, data length, data content and checksum. For communication interface selection: the gateway program selects the corresponding communication module according to the communication interface of the IoT device (such as Ethernet, Bluetooth, CAN, etc.). For data transmission: the gateway program sends the device data packet to the IoT device through the selected communication module. The transmission process may involve operations such as data packaging, physical layer encoding and transmission. For transmission confirmation: for non-standard protocols that require confirmation, the gateway program will wait for the confirmation message of the IoT device. If the confirmation message is not received within the specified time, the gateway program will try to resend the data packet. For error and exception handling: if there is an exception such as a communication module failure, a physical connection disconnection, or no response from the device, the gateway program will capture it and perform appropriate processing, such as resending, recording an error log, or sending an error report to the cloud platform. After the above steps, the gateway program can send the cloud platform's message to the IoT device in the form of a non-standard protocol, so that the device can receive and execute the corresponding instructions.

[0061] This embodiment has the following advantages: (1) Compatibility: The method and apparatus of this patent can convert the messages of IoT devices with non-standard protocols into the standard MQTT protocol and then forward them to the MQTT cloud platform. This solves the problem in the prior art that IoT devices using non-standard protocols cannot be seamlessly integrated with the cloud platform, and significantly improves the compatibility of IoT devices with the cloud platform. (2) Flexibility: By running a gateway program on a small device, it is possible to access various IoT devices with non-standard protocols, and it can be flexibly deployed at any required location in the device network. Regardless of whether the IoT device uses a wired or wireless connection, it can be connected to the cloud platform through a small device, which greatly enhances the flexibility of the system. (3) Low cost: Compared with existing technical solutions, such as modifying the IoT device code or modifying the cloud platform code, the method and apparatus provided by this patent can eliminate the need for large-scale transformation of existing IoT devices and cloud platforms, greatly reducing the complexity and cost of system integration. (4) High performance: Through a small device with a higher configuration, the gateway program can be better run, larger-scale IoT device data can be processed, and higher performance requirements can be met. (5) Openness: Small devices can run the open source Ubuntu operating system, which is more open and customizable, making it easier to optimize the system and expand its functionality.

[0062] The technical solution of this embodiment is to establish a connection with an IoT device and determine the communication protocol adopted by the IoT device to obtain the original protocol; receive the first original information sent by the IoT device, and parse the first original information based on the original protocol to obtain the first parsed data; perform protocol conversion on the first parsed data to obtain the first target information; wherein the first target information is encapsulated by the target protocol; establish a connection with a cloud platform, and send the first target information to the cloud platform for processing. The information processing method between the IoT device and the cloud platform provided in the embodiment of the present invention is to realize the information interaction between the IoT device and the cloud platform, and ensure the effective connection and secure interaction between the IoT device and the cloud platform.

[0063] Embodiment 2

[0064] Figure 2 is a schematic diagram of the structure of an information processing device between an Internet of Things device and a cloud platform provided in Embodiment 2 of the present invention, such as Figure 2 As shown, the device comprises:

[0065] The connection module 210 is used to establish a connection with an IoT device and determine the communication protocol used by the IoT device to obtain an original protocol;

[0066] A first parsing module 220, configured to receive first original information sent by the IoT device, and parse the first original information based on the original protocol to obtain first parsed data;

[0067] The protocol conversion module 230 is used to perform protocol conversion on the first parsed data to obtain first target information; wherein the first target information is encapsulated by a target protocol;

[0068] The first target information sending module 240 is used to establish a connection with the cloud platform and send the first target information to the cloud platform for processing.

[0069] Optionally, the connection module 210 is further used for:

[0070] Receiving a connection request sent by an IoT device; wherein the connection request includes authentication information, a network address, and a device identifier;

[0071] Establishing a network connection with the network device based on the network address;

[0072] Authenticate the IoT device based on the authentication information to obtain an authentication result;

[0073] If the authentication result is passed, the communication protocol adopted by the IoT device is determined based on the device identification.

[0074] Optionally, the first parsing module 220 is further configured to:

[0075] Performing integrity and / or consistency verification on the first original information;

[0076] If the verification passes, decoding the first original information;

[0077] Parsing the decoded first original information based on the original protocol to obtain first parsed data;

[0078] The first parsed data is format-converted according to a preset format conversion rule to obtain first parsed data after the parsed format conversion.

[0079] Optionally, the protocol conversion module 230 is further used to:

[0080] Acquire a data structure mapping relationship between the original protocol and the target protocol;

[0081] Converting the data structure of the first parsed data based on the data structure mapping relationship;

[0082] The first parsed data after the data structure conversion is assembled according to the target protocol to obtain the first target information.

[0083] Optionally, the first target information sending module 240 is further used to:

[0084] Obtaining connection-related information of the cloud platform; wherein the connection-related information includes: network address, port information, and authentication information;

[0085] Establishing a connection with the cloud platform based on the connection related information;

[0086] Performing connection negotiation with the cloud platform to obtain a negotiation result;

[0087] If the negotiation result is successful, heartbeat information is sent to the cloud platform at regular intervals to maintain the connection with the cloud platform.

[0088] Optionally, the first target information sending module 240 is further used to:

[0089] Writing the first target information into the queue according to the priority;

[0090] Reading the first target information from the queue according to the priority;

[0091] The read first target information is sent to the cloud platform for processing.

[0092] Optionally, the method further includes: a second original information processing module, configured to:

[0093] Receiving second original information sent by the cloud platform; wherein the second original information is encapsulated by the target protocol;

[0094] Performing protocol conversion on the second original information to obtain second target information; wherein the second target information is encapsulated by the original protocol;

[0095] The second target information is sent to the IoT device, so that the IoT device executes the operation corresponding to the second target information.

[0096] Optionally, the second original information processing module is further used to:

[0097] decoding the second original information;

[0098] Parsing the decoded first original information based on the target protocol to obtain second parsed data;

[0099] Acquire a data structure mapping relationship between the original protocol and the target protocol;

[0100] Convert the data structure of the second parsed data based on the data structure mapping relationship;

[0101] The second parsed data after the data structure conversion is encapsulated to obtain the second target information.

[0102] Optionally, the second original information processing module is further used to:

[0103] constructing a data packet based on the second target information and determining a communication interface;

[0104] The data packet is sent to the Internet of Things device through the communication interface.

[0105] The above device can execute the methods provided by all the above embodiments of the present invention, and has the corresponding functional modules and beneficial effects of executing the above methods. For technical details not described in detail in this embodiment, please refer to the methods provided by all the above embodiments of the present invention.

[0106] Embodiment 3

[0107] Figure 3 A schematic diagram of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, the connections and relationships between the components, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0108] like Figure 3 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0109] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0110] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the information processing method between the IoT device and the cloud platform.

[0111] In some embodiments, the information processing method between the IoT device and the cloud platform can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the information processing method between the IoT device and the cloud platform described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the information processing method between the IoT device and the cloud platform in any other appropriate manner (for example, by means of firmware).

[0112] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0113] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0114] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0115] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0116] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0117] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0118] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0119] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for information processing between an Internet of Things device and a cloud platform, characterized in that: include: Establishing a connection with an IoT device and determining the communication protocol used by the IoT device to obtain an original protocol; Receiving first original information sent by the IoT device, and parsing the first original information based on the original protocol to obtain first parsed data; Performing protocol conversion on the first parsed data to obtain first target information; wherein the first target information is encapsulated by a target protocol; A connection is established with the cloud platform, and the first target information is sent to the cloud platform for processing.

2. The method according to claim 1, characterized in that Establishing a connection with an IoT device and determining the communication protocol used by the IoT device, including: Receive a connection request sent by an IoT device; wherein the connection request includes authentication information, a network address, and a device identifier; Establishing a network connection with the network device based on the network address; Authenticate the IoT device based on the authentication information to obtain an authentication result; If the authentication result is passed, the communication protocol adopted by the IoT device is determined based on the device identification.

3. The method according to claim 1, characterized in that Receiving first original information sent by the IoT device, and parsing the first original information based on the original protocol to obtain first parsed data, including: Performing integrity and / or consistency verification on the first original information; If the verification passes, decoding the first original information; Parsing the decoded first original information based on the original protocol to obtain first parsed data; The first parsed data is format-converted according to a preset format conversion rule to obtain first parsed data after the parsed format conversion.

4. The method according to claim 1, characterized in that: Performing protocol conversion on the first parsed data to obtain first target information includes: Acquire a data structure mapping relationship between the original protocol and the target protocol; Converting the data structure of the first parsed data based on the data structure mapping relationship; The first parsed data after the data structure conversion is assembled according to the target protocol to obtain the first target information.

5. The method according to claim 1, characterized in that Establish connections with cloud platforms, including: Obtaining connection-related information of the cloud platform; wherein the connection-related information includes: network address, port information, and authentication information; Establishing a connection with the cloud platform based on the connection related information; Performing connection negotiation with the cloud platform to obtain a negotiation result; If the negotiation result is successful, heartbeat information is sent to the cloud platform at regular intervals to maintain the connection with the cloud platform.

6. The method according to claim 1, characterized in that Sending the first target information to the cloud platform for processing includes: Writing the first target information into the queue according to the priority; Reading the first target information from the queue according to the priority; The read first target information is sent to the cloud platform for processing.

7. The method according to claim 1, characterized in that After sending the first target information to the cloud platform for processing, the method further includes: Receiving second original information sent by the cloud platform; wherein the second original information is encapsulated by the target protocol; Performing protocol conversion on the second original information to obtain second target information; wherein the second target information is encapsulated by the original protocol; The second target information is sent to the IoT device, so that the IoT device executes the operation corresponding to the second target information.

8. The method according to claim 7, characterized in that Performing protocol conversion on the second original information to obtain second target information includes: decoding the second original information; Parsing the decoded first original information based on the target protocol to obtain second parsed data; Acquire a data structure mapping relationship between the original protocol and the target protocol; Convert the data structure of the second parsed data based on the data structure mapping relationship; The second parsed data after the data structure conversion is encapsulated to obtain the second target information.

9. The method according to claim 7, characterized in that: Sending the second target information to the IoT device includes: constructing a data packet based on the second target information and determining a communication interface; The data packet is sent to the Internet of Things device through the communication interface.

10. An information processing device between an Internet of Things device and a cloud platform, characterized in that: include: A connection module, used to establish a connection with an IoT device and determine the communication protocol used by the IoT device to obtain an original protocol; A first parsing module, configured to receive first original information sent by the IoT device, and parse the first original information based on the original protocol to obtain first parsed data; A protocol conversion module, used to perform protocol conversion on the first parsed data to obtain first target information; wherein the first target information is encapsulated by a target protocol; The first target information sending module is used to establish a connection with the cloud platform and send the first target information to the cloud platform for processing.

Citation Information

Patent Citations

  • Internet of Things equipment and Internet of Things server communicating method and device

    CN104394143A

  • Internet-of-things communication method, Internet-of-things communication system and Internet-of-things equipment

    CN110809263A

  • Data processing method and device, electronic equipment and computer readable medium

    CN111818136A

  • Internet of Things data processing method, device and equipment, medium and Internet of Things soft gateway

    CN115396523A

  • Security device access method and device based on open protocol

    CN118101244A