Data transmission method, device and equipment of passive equipment based on Internet of Things platform
By deploying servers at the data acquisition terminals of IoT platforms and passive devices, and using data conversion methods to transform the data to be transmitted from passive devices into a data format suitable for IoT platforms, the problem of high resource consumption of IoT platforms is solved, and more efficient data transmission and management are achieved.
Patent Information
- Application Number
- CN202511870462.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-02-06
AI Technical Summary
In existing technologies, IoT platforms need to develop separate interfaces for each type of passive device to receive its data, resulting in excessive resource consumption.
By deploying servers at the data acquisition terminals of IoT platforms and passive devices, the data conversion method is determined based on the first communication protocol type between the passive devices and the server and the second communication protocol type between the server and the IoT platform. The data to be transmitted is then converted and sent, avoiding the need to manage each interface on the IoT platform.
It reduces the resource consumption of the IoT platform and improves data transmission and management efficiency.
Smart Images

Figure CN121486468A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to a data transmission method, apparatus, and device for passive devices based on an IoT platform. Background Technology
[0002] In the field of IoT technology, passive devices need to be deployed to communicate with the IoT platform, thereby transmitting the data to be transmitted from the passive device to the IoT platform. For example, a passive device collects data and then transmits the collected data to the IoT platform.
[0003] In existing technologies, different types of passive devices are deployed, and these different types of passive devices communicate with the IoT platform using different protocols. After receiving data, the IoT platform needs to develop a separate parsing interface for each type of passive device.
[0004] However, the above approach requires developing a corresponding interface on the IoT platform for each type of passive device to receive data from them. This necessitates management of each interface by the IoT platform. Furthermore, the IoT platform also needs to process the data from the passive devices and manage the passive devices themselves, thus consuming significant resources. Summary of the Invention
[0005] This application provides a data transmission method, apparatus, and device for passive devices based on an Internet of Things (IoT) platform, which aims to reduce the resource consumption of the IoT platform.
[0006] In a first aspect, embodiments of this application provide a data transmission method for a passive device based on an Internet of Things (IoT) platform. This method is applied to a server and includes:
[0007] When it is detected that the reader in the passive device receives data to be transmitted from the passive device, the reader type of the reader is obtained; and the first communication protocol type corresponding to the reader type is determined; the first communication protocol type is the communication protocol type between the passive device and the server.
[0008] Based on the determined first communication protocol type, the data conversion method is determined; wherein, the data conversion method is the conversion method between the first communication protocol type and the second communication protocol type, and the second communication protocol type is the communication protocol type between the server and the IoT platform;
[0009] Based on the data conversion method, the data to be transmitted is converted, and the converted data is sent to the IoT platform.
[0010] In one possible implementation, determining the first communication protocol type corresponding to the reader / writer type includes:
[0011] Based on the first preset mapping relationship and the reader type, the first communication protocol type corresponding to the reader type is determined; wherein, the first preset mapping relationship represents the correspondence between the reader type and the first communication protocol type.
[0012] In one possible implementation, determining the data conversion method based on the determined first communication protocol type includes:
[0013] Based on the second preset mapping relationship and the first communication protocol type, the data conversion method is determined; wherein, the second preset mapping relationship represents the correspondence between the first communication protocol type and the data conversion method.
[0014] In one possible implementation, sending the converted data to be transmitted to the IoT platform includes:
[0015] The converted data to be transmitted is compressed to obtain compressed data to be transmitted; the compressed data to be transmitted is then sent to the IoT platform.
[0016] In one possible implementation, the converted data to be transmitted is compressed to obtain compressed data to be transmitted, including:
[0017] Based on a preset lightweight data compression algorithm, feature extraction is performed on the converted data to be transmitted to obtain high-frequency features in the converted data to be transmitted.
[0018] The high-frequency features in the converted data to be transmitted are compressed to obtain the compressed data to be transmitted.
[0019] In one possible implementation, the data to be transmitted is a registration request, wherein the registration request includes device information of a passive device; the device information is used to generate a device management method corresponding to the passive device; the method further includes:
[0020] Receive the registration result sent by the IoT platform; the registration result indicates that the passive device has been successfully registered.
[0021] In one possible implementation, the method further includes:
[0022] Receive device configuration update instructions from the IoT platform; the device configuration update instructions include the modified data acquisition frequency of the passive device and the device identifier of the passive device;
[0023] The device configuration update command is parsed based on the second communication protocol type to obtain the parsed command information;
[0024] Based on the parsed instruction information, the target reader / writer of the passive device that needs configuration update is determined;
[0025] The target first communication protocol type is determined based on the reader type of the target reader, and the parsed instruction information is sent to the target reader based on the target first communication protocol type to instruct the target reader to perform configuration update.
[0026] In one possible implementation, the method further includes:
[0027] For critical types of data to be transmitted, if a response message is received from the IoT platform within a preset time period, communication with the passive device will be disconnected; the response message indicates that the IoT platform has received the data to be transmitted.
[0028] If no response message is received from the IoT platform within a preset time period for critical types of data to be transmitted, the converted data to be transmitted will be sent to the IoT platform again.
[0029] Secondly, embodiments of this application provide a data transmission method for a passive device based on an Internet of Things (IoT) platform. This method is applied to the IoT platform and includes:
[0030] Receive the converted data to be transmitted from the server;
[0031] When the data to be transmitted is a registration request, the device management method for the passive device is generated and stored based on the device information in the registration request; wherein, the registration request includes the device information of the passive device;
[0032] When the data to be transmitted is of a critical type, a response message is sent to the server; the response message indicates that the IoT platform has received the data to be transmitted.
[0033] In one possible implementation, the method further includes:
[0034] In response to a user's device configuration request, obtain configuration update information for updating the configuration of the passive device reader / writer;
[0035] A device configuration update command is generated based on the configuration update information, and the device configuration update command is sent to the server based on the second communication protocol type.
[0036] Thirdly, embodiments of this application provide a data transmission device for a passive device based on an Internet of Things (IoT) platform, applied to a server, the device comprising:
[0037] The acquisition module is used to acquire the reader type of the reader when it is detected that the reader in the passive device receives data to be transmitted from the passive device; and to determine the first communication protocol type corresponding to the reader type; the first communication protocol type is the communication protocol type between the passive device and the server;
[0038] The first processing module is used to determine the data conversion method according to the determined first communication protocol type; wherein, the data conversion method is the conversion method between the first communication protocol type and the second communication protocol type, and the second communication protocol type is the communication protocol type between the server and the Internet of Things platform;
[0039] The second processing module is used to transform the data to be transmitted based on the data transformation method, and then send the transformed data to be transmitted to the Internet of Things platform.
[0040] In one possible implementation, the acquisition module is further configured to:
[0041] Based on the first preset mapping relationship and the reader type, the first communication protocol type corresponding to the reader type is determined; wherein, the first preset mapping relationship represents the correspondence between the reader type and the first communication protocol type.
[0042] In one possible implementation, the first processing module is further configured to:
[0043] Based on the second preset mapping relationship and the first communication protocol type, the data conversion method is determined; wherein, the second preset mapping relationship represents the correspondence between the first communication protocol type and the data conversion method.
[0044] In one possible implementation, the second processing module is further configured to:
[0045] The converted data to be transmitted is compressed to obtain compressed data to be transmitted; the compressed data to be transmitted is then sent to the IoT platform.
[0046] In one possible implementation, the second processing module is further configured to:
[0047] Based on a preset lightweight data compression algorithm, feature extraction is performed on the converted data to be transmitted to obtain high-frequency features in the converted data to be transmitted.
[0048] The high-frequency features in the converted data to be transmitted are compressed to obtain the compressed data to be transmitted.
[0049] In one possible implementation, the data to be transmitted is a registration request, wherein the registration request includes device information of a passive device; the device information is used to generate a device management method corresponding to the passive device; the device further includes a third processing module, used for:
[0050] Receive the registration result sent by the IoT platform; the registration result indicates that the passive device has been successfully registered.
[0051] In one possible implementation, the third processing module is further configured to:
[0052] Receive device configuration update instructions from the IoT platform; the device configuration update instructions include the modified data acquisition frequency of the passive device and the device identifier of the passive device;
[0053] The device configuration update command is parsed based on the second communication protocol type to obtain the parsed command information;
[0054] Based on the parsed instruction information, the target reader / writer of the passive device that needs configuration update is determined;
[0055] The target first communication protocol type is determined based on the reader type of the target reader, and the parsed instruction information is sent to the target reader based on the target first communication protocol type to instruct the target reader to perform configuration update.
[0056] In one possible implementation, the third processing module is further configured to:
[0057] For critical types of data to be transmitted, if a response message is received from the IoT platform within a preset time period, communication with the passive device will be disconnected; the response message indicates that the IoT platform has received the data to be transmitted.
[0058] If no response message is received from the IoT platform within a preset time period for critical types of data to be transmitted, the converted data to be transmitted will be sent to the IoT platform again.
[0059] Fourthly, embodiments of this application provide a data transmission device for a passive device based on an Internet of Things (IoT) platform, comprising:
[0060] The acquisition module is used to receive the converted data to be transmitted sent by the server;
[0061] The first processing module is used to generate and store the device management method for the passive device based on the device information in the registration request when the data to be transmitted is a registration request; wherein the registration request includes the device information of the passive device;
[0062] The second processing module is used to send a response message to the server when the data to be transmitted is of a critical type; the response message indicates that the IoT platform has received the data to be transmitted.
[0063] In one possible implementation, the device further includes a third processing module for:
[0064] In response to a user's device configuration request, obtain configuration update information for updating the configuration of the passive device reader / writer;
[0065] A device configuration update command is generated based on the configuration update information, and the device configuration update command is sent to the server based on the second communication protocol type.
[0066] Fifthly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0067] The memory stores instructions that the computer executes;
[0068] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect above and various possible implementations of the first aspect.
[0069] In a sixth aspect, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and various possible implementations thereof.
[0070] In a seventh aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and various possible implementations thereof.
[0071] This application provides a data transmission method, apparatus, and device for passive devices based on an IoT platform. The method, upon detecting that a reader / writer has received data to be transmitted from a passive device, obtains the type of the reader / writer and determines a first communication protocol type corresponding to that type. A data conversion method is determined based on the first communication protocol type. The data to be transmitted is converted according to the data conversion method, and the converted data is sent to the IoT platform. This application utilizes a data conversion method between a first communication protocol type and a second communication protocol type to convert the data to be transmitted from the passive device into data suitable for transmission to the IoT platform. When the communication protocol of the passive device and the communication protocol of the IoT platform are inconsistent, the data transmission method of this application can be used for data conversion and transmission, avoiding the need to develop data transmission interfaces for passive devices with multiple different protocol types on the IoT platform, thereby achieving the technical effect of reducing the resource consumption of the IoT platform. Attached Figure Description
[0072] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0073] Figure 1 A flowchart illustrating the data transmission method for passive devices based on an IoT platform provided in this application. Figure 1 ;
[0074] Figure 2A flowchart illustrating the data transmission method for passive devices based on an IoT platform provided in this application. Figure 2 ;
[0075] Figure 3 A schematic diagram of the data transmission framework for passive devices based on an Internet of Things platform provided in this application;
[0076] Figure 4 Schematic diagram of the data transmission device for passive devices based on the Internet of Things platform provided in this application Figure 1 ;
[0077] Figure 5 Schematic diagram of the data transmission device for passive devices based on the Internet of Things platform provided in this application Figure 2 ;
[0078] Figure 6 A schematic diagram of the structure of the electronic device provided in this application.
[0079] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0080] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0081] First, let me explain the terms used in this application:
[0082] Transmission Control Protocol Server (TCP Server): TCP refers to a connection-oriented transport layer communication protocol, and TCP Server refers to a program or device that listens for a specific window on the network.
[0083] Electronic Product Code (EPC): This refers to a code used to uniquely identify a physical object. The EPC area refers to the storage area for electronic product codes.
[0084] Tag Identifier (TID): This refers to the unique identifier of a chip, which is fixed during chip manufacturing. The TID area refers to the storage area for the tag identifier.
[0085] ASCII code: refers to a basic and universal character encoding standard that uses seven or eight binary digits to represent a string of length 128 or 256.
[0086] JSON format: refers to JavaScript object representation, specifically a lightweight data exchange format.
[0087] Message Queuing Telemetry Transport (MQTT) is a lightweight IoT messaging protocol that uses a publish-subscribe model.
[0088] In existing technologies, the main method for managing data from multiple passive devices based on an IoT platform is to use a reader to collect data from the passive devices; then, for the data communication protocol type of the passive devices, a corresponding communication conversion interface or data conversion interface is developed in the IoT platform to ensure that the IoT devices can receive and parse the data from the passive devices.
[0089] However, due to the different data communication protocols of different types of passive devices produced by different manufacturers in the existing technology, when transmitting data with IoT devices, IoT devices need to develop interfaces and manage each interface. At the same time, the IoT platform also needs to process the data of passive devices and manage the passive devices, which leads to the consumption of resources on the IoT platform.
[0090] To address the problems existing in the prior art, this application proposes the following technical concept: A server for data transmission conversion is deployed between the IoT platform and the data acquisition terminal of the passive device. Based on the first communication protocol type between the passive device's data and the server, and the second communication protocol type between the server and the IoT platform, the data conversion method for the data to be transmitted from the passive device is determined. This conversion method is used to convert the data to be transmitted, and the converted data is sent to the IoT platform. This avoids the need for the IoT platform to manage each interface, thus reducing the resource consumption of the IoT platform.
[0091] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0092] Figure 1 A flowchart illustrating the data transmission method for passive devices based on an IoT platform provided in this application. Figure 1 ,like Figure 1 As shown, this method is applied to a server, which is connected to multiple passive devices and an IoT platform. The method includes:
[0093] S101. When it is detected that the reader in the passive device receives the data to be transmitted from the passive device, the reader type of the reader is obtained; and the first communication protocol type corresponding to the reader type is determined.
[0094] In this step, passive devices are IoT terminal devices that do not have their own built-in power supply and rely on external power to achieve data acquisition, storage, or signal transmission. Readers / writers are IoT gateway devices with independent power supplies and active communication capabilities, specifically designed to provide power to passive devices and realize data reading, writing, format conversion, and uploading to the IoT platform. They act as a bridge between passive devices and the cloud system, with their core function being to connect the front-end sensing of passive devices with the back-end processing of the IoT platform.
[0095] It should be noted that one reader corresponds to at least one passive device, and all passive devices corresponding to the same reader use the same data communication protocol.
[0096] Optionally, the method for monitoring the reader / writer in this step can be:
[0097] a1. Set the reader's working mode to client, and specify the TCP server address and port as the network address and port of the host computer server. The server adopts a multi-threaded TCP listening mode, supports high-concurrency access, and optimizes the connection keep-alive mechanism to ensure communication stability. The server's software development kit can run on any machine with public network access.
[0098] a2. The server starts a TCP server, listens on a preset port, and waits for the reader to connect.
[0099] a3. After establishing a connection, the reader scans for the tag within its detection range and sends the passive device's raw byte stream data to the specified address port. The passive device's raw byte stream data refers to the data to be transmitted by the passive device, including information such as the EPC code, signal strength, and read timestamp.
[0100] a4. In the event of a network anomaly, the server will automatically cache the unreceived data and prioritize retrieving this data after the TCP connection is restored, ensuring data integrity.
[0101] In this step, the first communication protocol type is the communication protocol type between the passive device and the server. The first communication protocol type is the data communication protocol corresponding to the data to be transmitted by the passive device. The data to be transmitted meets the data transmission format and data parsing method of the first communication protocol type. Data parsing can be performed on the data to be transmitted based on the first communication protocol type to obtain the detailed data transmitted by the passive device, and further data processing can be performed on the detailed data.
[0102] Alternatively, one possible implementation for determining the first communication protocol type is as follows:
[0103] Based on the first preset mapping relationship and the reader type, the first communication protocol type corresponding to the reader type is determined; wherein, the first preset mapping relationship represents the correspondence between the reader type and the first communication protocol type.
[0104] In this step, the first preset mapping relationship is stored in the server, and different reader / writer types correspond to different first communication protocol types. The first communication protocol defines the byte encoding, field definitions, and verification rules of the original data to be transmitted by each passive device under that reader / writer type.
[0105] S102. Determine the data conversion method based on the determined first communication protocol type.
[0106] In this step, the data conversion method is the conversion between the first communication protocol type and the second communication protocol type, where the second communication protocol type is the communication protocol type between the server and the IoT platform.
[0107] It should be noted that the IoT platform mentioned in this step refers to a comprehensive management platform that integrates IoT and cloud computing technologies, aiming to achieve comprehensive monitoring, management, and optimization of various IoT devices. This platform provides enterprises and users with efficient and intelligent device management solutions by offering functions such as device access, data acquisition, real-time monitoring, remote control, and data analysis.
[0108] Alternatively, one possible implementation of determining the data conversion method based on the first communication protocol type is as follows:
[0109] Based on the second preset mapping relationship and the first communication protocol type, the data conversion method is determined; wherein, the second preset mapping relationship represents the correspondence between the first communication protocol type and the data conversion method.
[0110] In this step, the data conversion method refers to a way of converting the data to be transmitted from a passive device into a message that can be sent to the IoT platform.
[0111] S103. Based on the data conversion method, the data to be transmitted is converted and the converted data to be transmitted is sent to the IoT platform.
[0112] In this step, one possible implementation of converting the data to be transmitted based on the data conversion method and sending it to the IoT platform is as follows:
[0113] b1. Based on the first communication protocol type, determine the data parsing method used for parsing the data to be transmitted.
[0114] b2. Based on the data parsing method, perform data parsing on the data to be transmitted and extract key fields.
[0115] In this step, the key fields extracted include EPC area: unique device identifier, TID area: device production information, and user area: custom data.
[0116] For example, the original byte stream corresponding to the data to be transmitted from a passive device scanned by the reader is: 30 3132 33 34 35 36 37 38 39 00 00 | 88 01 20 25 11 0A 0B 0C | 00 64 41 42 53 4431 32 33. Specifically, the EPC area is 12 bytes (30 31 32 33 34 35 36 37 38 39 00 00); the TID area is 8 bytes (88 01 20 25 11 0A 0B 0C); and the user area is 9 bytes (00 64 41 42 5344 31 32 33).
[0117] The method for parsing the bytes in the EPC area is to convert the hexadecimal bytes to ASCII codes, resulting in the key field EPC code = 0123456789.
[0118] The method for parsing the bytes in the TID area is to split the fields according to the TID encoding specification of the passive device manufacturer, and obtain the key fields TID-Manufacturer Code: 34817; TID-Production Batch: 8229; TID-Production Date: May 10, 20XX; TID-Device Serial Number: 2828.
[0119] The method for parsing the bytes in the user area is to parse them according to the business-defined encoding rules to obtain the key fields: User Area - Temperature: 100; User Area - Logistics Status: Inbound; User Area - Inbound Order Number: SD123.
[0120] It should be noted that the data to be transmitted and the corresponding parsing results in this example are for illustrative purposes only and do not represent specific information in actual applications.
[0121] b3. Encapsulate the extracted key fields to obtain encapsulated data in JSON format.
[0122] b4. Generate a message for the encapsulated data according to the second communication protocol type to obtain a message to be transmitted that can be sent to the IoT platform, and send it to the IoT platform.
[0123] In this step, the second communication protocol type can be the MQTT protocol, which refers to the external communication protocol used by the IoT platform.
[0124] Alternatively, one possible implementation for sending the converted data to be transmitted to the IoT platform is as follows:
[0125] The converted data to be transmitted is compressed to obtain compressed data to be transmitted; the compressed data to be transmitted is then sent to the IoT platform.
[0126] Alternatively, one possible implementation of data compression is as follows:
[0127] c1. Based on a preset lightweight data compression algorithm, feature extraction is performed on the converted data to be transmitted to obtain high-frequency features in the converted data to be transmitted.
[0128] In this step, the converted data to be transmitted refers to the batch of structured data obtained after parsing the data to be transmitted from the passive device. Lightweight data compression algorithms can be simplified dictionary encoding and high-frequency prefix compression methods used in IoT scenarios.
[0129] For example, the method of feature extraction for the converted data to be transmitted based on a preset lightweight data compression algorithm is as follows: based on the structured data to be transmitted, extract the frequently occurring fields in the structured data to obtain the high-frequency features in the converted data to be transmitted. These high-frequency features refer to the core features that appear repeatedly and have a high proportion.
[0130] c2. Compress the high-frequency features in the converted data to be transmitted to obtain the compressed data to be transmitted.
[0131] For example, when the data to be transmitted by a passive device contains information such as the device type, identification, and manufacturer, which are carried in every transmission, this data can be replaced with a corresponding simplified code. The message transmitted to the IoT platform only needs to include the simplified code, not the actual information. Both the server and the IoT platform store the mapping relationship between the codes and the specific information. When the mapping relationship in the server is updated, it is synchronized to the IoT platform; conversely, when the mapping relationship in the IoT platform is updated, it is synchronized to the server. When the IoT platform parses the data, it can determine the specific information based on the simplified code and the mapping relationship, thereby avoiding the repeated transmission of large amounts of the same data and improving data transmission efficiency.
[0132] It should be noted that the types of data to be transmitted to the IoT platform in this step include: modification requests, key types of data to be transmitted, and registration requests for passive devices.
[0133] Optionally, when the type of data to be transmitted is a registration request for a passive device, a registration result sent by the IoT platform can be received; wherein, the registration result indicates that the passive device has been successfully registered. The registration request at this time includes the device information of the passive device; the device information is used to generate the device management method corresponding to the passive device.
[0134] When the data to be transmitted is of a critical type, if a response message is received from the IoT platform within a preset time period, communication with the passive device is disconnected; the response message indicates that the IoT platform has received the data to be transmitted. If no response message is received from the IoT platform within the preset time period, the converted data to be transmitted is sent to the IoT platform again.
[0135] Optionally, in one possible implementation, the server can also receive device configuration update instructions from the IoT platform to update the reader configuration of the passive device, specifically:
[0136] d1. Receive device configuration update instructions from the IoT platform.
[0137] In this step, the device configuration update instruction includes the modified data acquisition frequency of the passive device and the device identifier of the passive device.
[0138] d2. Based on the second communication protocol type, parse the device configuration update command to obtain the parsed command information.
[0139] In this step, the parsed instruction information contains the identifier of the passive device that needs to be configured and updated, as well as the specific configuration update requirements, including but not limited to updating the data acquisition frequency and updating the device online status determination method.
[0140] d3. Based on the parsed instruction information, determine the target reader / writer of the passive device that needs configuration update.
[0141] In this step, the target reader / writer for the passive device can be determined by using a pre-stored mapping relationship between readers / writers and passive devices.
[0142] d4. Determine the target first communication protocol type based on the target reader / writer type, and send the parsed instruction information to the target reader / writer based on the target first communication protocol type, instructing the target reader / writer to perform configuration updates.
[0143] This application provides a data transmission method for passive devices based on an IoT platform. When a reader detects that a reader has received data to be transmitted from a passive device, the method obtains the type of the reader and determines a first communication protocol type corresponding to that type. A data conversion method is then determined based on the first communication protocol type. The data to be transmitted is converted according to the data conversion method, and the converted data is sent to the IoT platform. This application utilizes a data conversion method between a first communication protocol type and a second communication protocol type to convert the data to be transmitted from the passive device into data suitable for transmission to the IoT platform. When the communication protocol of the passive device and the communication protocol of the IoT platform are inconsistent, the data transmission method of this application can be used for data conversion and transmission, avoiding the need to develop data transmission interfaces for passive devices with multiple different protocol types on the IoT platform, thereby achieving the technical effect of reducing the resource consumption of the IoT platform.
[0144] Figure 2 A flowchart illustrating the data transmission method for passive devices based on an IoT platform provided in this application. Figure 2 This is used in IoT platforms, where the IoT platform connects to a server, and the server connects to multiple passive devices. For example... Figure 2 As shown, the method includes:
[0145] S201, Receive the converted data to be transmitted sent by the server.
[0146] In this step, the IoT platform receives data packets or messages sent by the server according to the second communication protocol type. The IoT platform parses the received data packets and messages according to the second communication protocol type to obtain the corresponding converted data to be transmitted.
[0147] S202. When the data to be transmitted is a registration request, generate and store the device management method for the passive device based on the device information in the registration request.
[0148] In this step, the registration request includes device information for passive devices.
[0149] Alternatively, one possible implementation of the device management method for generating passive devices is as follows:
[0150] S2021. Create a generic protocol service based on the device information and build a configuration file.
[0151] In this step, the configuration file includes authentication information for the passive device data, which refers to the permission level of the passive device's data, specifying which users are allowed to access the data. It also configures the encryption method for the passive device, specifying whether encryption is required during data processing or transmission, and the specific encryption method. Furthermore, it configures the access address for the passive device, assigning it an address that allows it to connect to the IoT platform. This address is the IoT platform's address, used to provide an access port for external devices. Finally, it configures the mapping relationship between the passive device and the generic protocol service. One generic protocol service corresponds to at least one passive device, and all passive devices under a generic protocol service belong to the same category, facilitating device management.
[0152] S2022, Create a physical model of a passive device.
[0153] In this step, creating an object model refers to creating a device management method for passive devices. This management method includes the reader / writer type to which the passive device belongs, the reader / writer to which the passive device belongs, the communication protocol between the reader / writer and the passive device, the specific type of data reported by the passive device, and the device lifecycle management strategy configured by the IoT platform for the passive device. This strategy can be the device registration rules and the rules for viewing the device's online status.
[0154] For example, the reader acquires the raw byte stream data collected by the passive RFID tag of the passive device, and transmits this raw byte stream data to the server as the data to be transmitted by the passive device. Therefore, the communication protocol between the reader and the passive device in this object model can be regarded as the communication protocol between the reader and the passive RFID tag, which belongs to the aforementioned... Figure 1 The primary communication protocol type between the reader and the server. It is also the communication protocol between passive devices and the server.
[0155] S203. When the data to be transmitted is of a critical type, send a response message to the server.
[0156] In this step, the response message indicates that the IoT platform has received the data to be transmitted. When the IoT platform receives data from the server, if it detects that the transmitted data carries confirmation information, it needs to send a confirmation response to the server after successfully receiving the data, in order to indicate to the server that the data has been successfully received.
[0157] Optionally, when receiving passive device configuration update information sent by the user, the IoT platform can also update the specific configuration of the passive device by sending a device configuration update command to the server. The specific implementation method can be as follows:
[0158] e1. In response to the user's device configuration request, obtain configuration update information for passive device reader configuration updates.
[0159] In this step, the device configuration request refers to the request sent by the user to the IoT management platform based on the user terminal. The request needs to carry specific configuration update information, including the identification information of the passive device that needs to be updated, and the specific configuration to be updated. For example, updating the sampling frequency of a passive device.
[0160] e2. Generate a configuration update command based on the configuration update information, and send the configuration update command to the server based on the second communication protocol type.
[0161] In this step, the generated configuration update command needs to be encapsulated into a format allowed by the second communication protocol type and sent to the server for easy data parsing by the server.
[0162] Figure 3 A schematic diagram of the data transmission framework for passive devices based on an IoT platform provided in this application is shown below. Figure 3 As shown, the framework includes: a passive RF reader / writer 301, a protocol adaptation layer 302, and an IoT platform 303.
[0163] The passive RFID reader 301 connects to the passive device according to its tag, supplies power to the passive device, and simultaneously acquires the raw byte stream data generated or collected by the passive device. This data is then transmitted as the data to be transmitted by the passive device to the adaptation layer server in the protocol adaptation layer 302.
[0164] The adaptation layer server in protocol adaptation layer 302 receives the data to be transmitted and uses the parsing engine to determine the first communication protocol type corresponding to the data, thereby performing data parsing and field extraction. The extracted field information is then encapsulated using the data encapsulation module to obtain encapsulated structured data. Based on the transmission module, a message is generated according to the second communication protocol type, namely the MQTT protocol, and sent to the IoT platform 303.
[0165] The IoT platform 303 is used to enable device access, lifecycle management, data analysis of passive devices, and cloud-based control of passive devices. Cloud-based control refers to the remote control of passive devices by sending downlink control commands to the transmission module of the protocol adaptation layer 302. The protocol adaptation layer achieves remote control of passive devices by following the process of command parsing, command encapsulation, and command delivery.
[0166] Figure 4 Schematic diagram of the data transmission device for passive devices based on the Internet of Things platform provided in this application Figure 1 ,like Figure 4 As shown, the device is applied to a server, which is connected to multiple passive devices and an IoT platform; the device includes:
[0167] The acquisition module 401 is used to acquire the reader type of the reader when it is detected that the reader in the passive device receives data to be transmitted from the passive device; and to determine the first communication protocol type corresponding to the reader type; the first communication protocol type is the communication protocol type between the passive device and the server;
[0168] The first processing module 402 is used to determine a data conversion method based on the determined first communication protocol type; wherein, the data conversion method is the conversion method between the first communication protocol type and the second communication protocol type, and the second communication protocol type is the communication protocol type between the server and the Internet of Things platform;
[0169] The second processing module 403 is used to convert the data to be transmitted based on the data conversion method and send the converted data to be transmitted to the Internet of Things platform.
[0170] Alternatively, in one possible implementation, the acquisition module 401 is further configured to:
[0171] Based on the first preset mapping relationship and the reader type, the first communication protocol type corresponding to the reader type is determined; wherein, the first preset mapping relationship represents the correspondence between the reader type and the first communication protocol type.
[0172] Optionally, in one possible implementation, the first processing module 402 is further configured to:
[0173] Based on the second preset mapping relationship and the first communication protocol type, the data conversion method is determined; wherein, the second preset mapping relationship represents the correspondence between the first communication protocol type and the data conversion method.
[0174] Optionally, in one possible implementation, the second processing module 403 is further configured to:
[0175] The converted data to be transmitted is compressed to obtain compressed data to be transmitted; the compressed data to be transmitted is then sent to the IoT platform.
[0176] Optionally, in one possible implementation, the second processing module 403 is further configured to:
[0177] Based on a preset lightweight data compression algorithm, feature extraction is performed on the converted data to be transmitted to obtain high-frequency features in the converted data to be transmitted.
[0178] The high-frequency features in the converted data to be transmitted are compressed to obtain the compressed data to be transmitted.
[0179] Optionally, in one possible implementation, the data to be transmitted is a registration request, wherein the registration request includes device information of the passive device; the device information is used to generate a device management method corresponding to the passive device; the device further includes a third processing module 404, used for:
[0180] Receive the registration result sent by the IoT platform; the registration result indicates that the passive device has been successfully registered.
[0181] Alternatively, in one possible implementation, the third processing module 404 is further configured to:
[0182] Receive device configuration update instructions from the IoT platform; the device configuration update instructions include the modified data acquisition frequency of the passive device and the device identifier of the passive device;
[0183] The device configuration update command is parsed based on the second communication protocol type to obtain the parsed command information;
[0184] Based on the parsed instruction information, the target reader / writer of the passive device that needs configuration update is determined;
[0185] The target first communication protocol type is determined based on the reader type of the target reader, and the parsed instruction information is sent to the target reader based on the target first communication protocol type to instruct the target reader to perform configuration update.
[0186] Alternatively, in one possible implementation, the third processing module 404 is further configured to:
[0187] For critical types of data to be transmitted, if a response message is received from the IoT platform within a preset time period, communication with the passive device will be disconnected; the response message indicates that the IoT platform has received the data to be transmitted.
[0188] If no response message is received from the IoT platform within a preset time period for critical types of data to be transmitted, the converted data to be transmitted will be sent to the IoT platform again.
[0189] Figure 5 Schematic diagram of the data transmission device for passive devices based on the Internet of Things platform provided in this application Figure 2 ,like Figure 5 As shown, the device is applied to an IoT platform, which is connected to a server, and the server is connected to multiple passive devices; the device includes:
[0190] The acquisition module 501 is used to receive the converted data to be transmitted sent by the server;
[0191] The first processing module 402 is used to generate and store the device management method of the passive device based on the device information in the registration request when the data to be transmitted is a registration request; wherein the registration request includes the device information of the passive device;
[0192] The second processing module 503 is used to send a response message to the server when the data to be transmitted is of a critical type; wherein, the response message indicates that the IoT platform has received the data to be transmitted.
[0193] Optionally, in one possible implementation, the device further includes a third processing module 504, for:
[0194] In response to a user's device configuration request, obtain configuration update information for updating the configuration of the passive device reader / writer;
[0195] A device configuration update command is generated based on the configuration update information, and the device configuration update command is sent to the server based on the second communication protocol type.
[0196] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. Figure 6 As shown, the electronic device provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the device further includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus 604.
[0197] In the specific implementation process, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to execute the above-mentioned data transmission method or method for passive devices based on the Internet of Things platform.
[0198] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0199] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0200] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0201] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0202] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0203] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0204] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0205] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0206] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0207] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0208] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0209] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0210] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0211] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A data transmission method for passive devices based on an Internet of Things (IoT) platform, characterized in that, The method is applied to a server, which is connected to multiple passive devices and an IoT platform; the method includes: When it is detected that the reader in the passive device receives data to be transmitted from the passive device, the reader type of the reader is obtained; and the first communication protocol type corresponding to the reader type is determined; the first communication protocol type is the communication protocol type between the passive device and the server. Based on the determined first communication protocol type, a data conversion method is determined; wherein, the data conversion method is a conversion method between the first communication protocol type and the second communication protocol type, and the second communication protocol type is the communication protocol type between the server and the IoT platform; Based on the data conversion method, the data to be transmitted is converted, and the converted data to be transmitted is sent to the IoT platform.
2. The method according to claim 1, characterized in that, The step of determining the first communication protocol type corresponding to the reader / writer type includes: Based on the first preset mapping relationship and the reader type, a first communication protocol type corresponding to the reader type is determined; wherein, the first preset mapping relationship represents the correspondence between the reader type and the first communication protocol type.
3. The method according to claim 1, characterized in that, The step of determining the data conversion method based on the determined first communication protocol type includes: The data conversion method is determined based on the second preset mapping relationship and the first communication protocol type; wherein, the second preset mapping relationship represents the correspondence between the first communication protocol type and the data conversion method.
4. The method according to claim 1, characterized in that, Sending the converted data to be transmitted to the IoT platform includes: The converted data to be transmitted is compressed to obtain compressed data to be transmitted; the compressed data to be transmitted is then sent to the IoT platform.
5. The method according to claim 4, characterized in that, The converted data to be transmitted is compressed to obtain compressed data to be transmitted, including: Based on a preset lightweight data compression algorithm, feature extraction is performed on the converted data to be transmitted to obtain high-frequency features in the converted data to be transmitted. The high-frequency features in the converted data to be transmitted are compressed to obtain compressed data to be transmitted.
6. The method according to claim 1, characterized in that, The data to be transmitted is a registration request, wherein the registration request includes device information of the passive device; the device information is used to generate a device management method corresponding to the passive device; the method further includes: The system receives the registration result sent by the IoT platform; wherein the registration result indicates that the passive device has been successfully registered.
7. The method according to claim 1, characterized in that, The method further includes: Receive a device configuration update instruction from the IoT platform; wherein the device configuration update instruction includes the modified data acquisition frequency of the passive device and the device identifier of the passive device; The device configuration update command is parsed based on the second communication protocol type to obtain the parsed command information; Based on the parsed instruction information, the target reader / writer corresponding to the passive device that needs configuration update is determined; Based on the reader type of the target reader, the corresponding target first communication protocol type is determined, and based on the target first communication protocol type, the parsed instruction information is sent to the target reader to instruct the target reader to perform a configuration update.
8. The method according to any one of claims 1-6, characterized in that, The method further includes: For critical types of data to be transmitted, if a response message is received from the IoT platform within a preset time period, communication with the passive device is disconnected; wherein, the response message indicates that the IoT platform has received the data to be transmitted. If no response message is received from the IoT platform within the preset time period for critical types of data to be transmitted, the converted data to be transmitted will be sent to the IoT platform again.
9. A data transmission method for passive devices based on an Internet of Things (IoT) platform, characterized in that, The method is applied to an Internet of Things (IoT) platform, which is connected to a server, and the server is connected to multiple passive devices; the method includes: Receive the converted data to be transmitted sent by the server; When the data to be transmitted is a registration request, a device management method for the passive device is generated and stored based on the device information in the registration request; wherein, the registration request includes the device information of the passive device; When the data to be transmitted is of a critical type, a response message is sent to the server; wherein, the response message indicates that the IoT platform has received the data to be transmitted.
10. The method according to claim 9, characterized in that, The method further includes: In response to a user's device configuration request, obtain configuration update information for updating the configuration of the passive device reader / writer; A device configuration update instruction is generated based on the configuration update information, and the device configuration update instruction is sent to the server based on the second communication protocol type.
11. A data transmission device for a passive device based on an Internet of Things (IoT) platform, characterized in that, The device is applied to a server, which is connected to multiple passive devices and an Internet of Things (IoT) platform; the device includes: The acquisition module is used to acquire the reader type of the reader when it detects that the reader in the passive device has received data to be transmitted from the passive device; and to determine the first communication protocol type corresponding to the reader type; the first communication protocol type is the communication protocol type between the passive device and the server; The first processing module is used to determine a data conversion method based on the determined first communication protocol type; wherein the data conversion method is a conversion method between the first communication protocol type and the second communication protocol type, and the second communication protocol type is the communication protocol type between the server and the Internet of Things platform; The second processing module is used to convert the data to be transmitted based on the data conversion method, and send the converted data to be transmitted to the Internet of Things platform.
12. A data transmission device for a passive device based on an Internet of Things (IoT) platform, characterized in that, The device is applied to an Internet of Things (IoT) platform, which is connected to a server, and the server is connected to multiple passive devices; the device includes: The acquisition module is used to receive the converted data to be transmitted sent by the server; The first processing module is configured to, when the data to be transmitted is a registration request, generate and store the device management method of the passive device based on the device information in the registration request; wherein the registration request includes the device information of the passive device; The second processing module is used to send a response message to the server when the data to be transmitted is a critical type of data; wherein the response message indicates that the IoT platform has received the data to be transmitted.
13. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-8 or 9-10.