An Internet of Things data simulation method for non-inductive interaction

CN115756473BActive Publication Date: 2026-09-08HANGZHOU KAIWU EDUCATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211169730.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-22
Publication Date
2026-09-08
Estimated Expiration
2042-09-22

AI Technical Summary

Technical Problem

[0003]前者的缺点在于对整个物联网设备进行模拟,引入了不必要的复杂性,增加了系统开销和时延;后者一方面要求物联网设备具有网络通信能力,另一方面则缺乏灵活性,不支持用户通过代码与设备进行交互

Benefits of technology

[0029]通过对用户屏蔽修改库代码的细节,做到了在不变动用户代码文件的情况下在线上模拟与真实设备相似的运行效果,同时支持用户对代码文件进行修改,自定义程序逻辑,既保证了系统的性能,又保证了用户应用的灵活性,实现了无感交互。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115756473B_ABST
    Figure CN115756473B_ABST
Patent Text Reader

Abstract

A kind of Internet of Things data simulation method for non-inductive interaction, comprising: step 1: client compiles, burns the user program that has been written through Internet of Things device control center;Step 2: client creates or updates the sensing model information of Internet of Things device by sending request to data simulation module;Step 3: Internet of Things device control center obtains real-time message output by Internet of Things device, and forwards to data simulation module;Step 4: data simulation module classifies and processes the message received from Internet of Things device control center, decides to send to client or forwards to Internet of Things device through Internet of Things device control center;Step 5: Internet of Things device processes the message received from Internet of Things device control center.The present application guarantees the performance of system, and also guarantees the flexibility of user application, realizes non-inductive interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) data simulation technology, and more specifically, to an IoT data simulation method for seamless interaction. Background Technology

[0002] Existing IoT data simulation technologies often simulate the entire IoT device directly ("A Method for Realizing IoT Device Simulation", application number: 202011566082.8), or only simulate at the application level ("Method, Device and Smart Terminal for Implementing Virtual Sensors in the Internet of Things", application number: 202111044183.3).

[0003] The former has the disadvantage of simulating the entire IoT device, which introduces unnecessary complexity and increases system overhead and latency; the latter requires IoT devices to have network communication capabilities, but lacks flexibility and does not support users interacting with devices through code. Summary of the Invention

[0004] The present invention aims to overcome the above-mentioned defects in the prior art and provide an IoT data simulation method for seamless interaction.

[0005] To achieve a better balance between system overhead and flexibility, this invention designs a novel data simulation method. By combining remote real devices with virtual data, it reduces system overhead and latency while supporting user-defined applications and achieving seamless interaction. Furthermore, this method only requires devices to have serial communication capabilities, reducing the requirements for terminal devices.

[0006] The IoT data simulation method for seamless interaction provided by this invention includes the following steps:

[0007] Step 1: The client compiles and burns the pre-written user program through the IoT device control center;

[0008] Step 2: The client creates or updates the sensing model information of the IoT device by sending a request to the data simulation module. This step can be executed when and how many times, depending on the user's needs.

[0009] Step 3: The IoT device control center obtains the real-time messages output by the IoT device and forwards them to the data simulation module;

[0010] Step 4: The data simulation module classifies the messages received from the IoT device control center and decides whether to send them to the client or forward them to the IoT device through the IoT device control center;

[0011] Step 5: The IoT device processes the message received from the IoT device control center. After processing, if the user program is still running, the process jumps to step 3; otherwise, the process ends.

[0012] Furthermore, the IoT device control center in step 1 consists of master devices and slave devices, with each slave device connected to multiple IoT devices;

[0013] The master device downloads the cross-compilation tools and library code required to compile the IoT device program code, and performs the compilation of the user program and interaction with the slave device;

[0014] Burning compiled files to the device and interacting with IoT devices;

[0015] The main device has made some modifications to the library code required for compiling the user program, enabling the IoT device to interact with the external data simulation module. When the user program is running, the IoT device's control of peripherals and requests to read peripheral data depend on its interaction with the external data simulation module.

[0016] Furthermore, step 1 is implemented through the following sub-steps:

[0017] Step 1.1: The client submits the user code to the IoT device control center, where the main device compiles it to obtain the compiled binary file;

[0018] Step 1.2: The client sends a request to the IoT device control center to download the compiled binary file;

[0019] Step 1.3: The client submits the downloaded binary file to the IoT device control center for burning. The master device sends the cached binary file to the slave device, which then burns it to the designated IoT device.

[0020] Furthermore, the message types sent by the IoT device to the IoT device control center in step 3 include the following: output generated by user code; control information of the IoT device to peripherals; and requests from the IoT device to read data from peripherals.

[0021] Furthermore, step 4 is implemented through the following sub-steps:

[0022] Step 4.1: For output generated by user code, mark the message type and send it to the client;

[0023] Step 4.2: For requests from IoT devices to read peripheral data, calculate the simulation data value based on the IoT device's sensor model configuration information, and then send it to the IoT device through the IoT device control center;

[0024] Step 4.3: For control information from IoT devices to peripherals, mark the message type and send it to the client.

[0025] Furthermore, step 5 is implemented through the following sub-steps:

[0026] Step 5.1: The IoT device parses the messages received from the IoT device control center to determine the type of simulation data;

[0027] Step 5.2: Assign the data values ​​to the corresponding variables according to the type of simulation data.

[0028] Compared with the prior art, the beneficial effects of the present invention are:

[0029] By shielding users from the details of modifying the library code, it achieves online simulation of similar operating effects to real devices without altering user code files. At the same time, it supports users in modifying code files and customizing program logic, ensuring both system performance and user application flexibility, and realizing seamless interaction. Attached Figure Description

[0030] Figure 1 This is a flowchart of the method of the present invention.

[0031] Figure 2 This is a system architecture diagram of the method of the present invention. Detailed Implementation

[0032] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.

[0033] This invention provides a method for simulating IoT data for seamless interaction. For example... Figure 1 As shown, users create or update device sensing models on the client; the IoT device control center obtains the output generated by the IoT device during operation and forwards it to the data simulation module; the data simulation module classifies and processes the received messages; and the IoT device processes the messages received from the IoT device control center accordingly.

[0034] The specific implementation method is as follows:

[0035] Step 1: The client compiles and burns the pre-written user program through the IoT device control center;

[0036] Step 2: The client creates or updates the sensing model information of the IoT device by sending a request to the data simulation module and records the current timestamp t0. This step can be executed when and how many times, depending on the user's needs.

[0037] Step 3: The IoT device control center obtains the real-time messages output by the IoT device and forwards them to the data simulation module along with the current timestamp t;

[0038] Step 4: The data simulation module classifies the messages received from the IoT device control center and decides whether to send them to the client or forward them to the IoT device through the IoT device control center;

[0039] Step 5: After the IoT device processes the message received from the IoT device control center, if the user program is still running, the process will proceed to step 3; otherwise, the process will end.

[0040] Preferably, the IoT device control center in step 1 is implemented as follows:

[0041] It consists of one master device (Alibaba Cloud server) and multiple slave devices (Raspberry Pi 4B), with each slave device connected to multiple ESP32 development boards;

[0042] The master device downloads the arduino-cli cross-compilation tool and the ESP32 library code required for compiling ESP32 code, and is responsible for compiling user programs and interacting with slave devices;

[0043] The device is responsible for burning the compiled files and interacting with the ESP32;

[0044] The main device has made some modifications to the library code required for compiling the user program, enabling the IoT device to interact with the external data simulation module. When the user program is running, the ESP32's control of peripherals and requests to read peripheral data all depend on its interaction with the external data simulation module.

[0045] Specifically, the readHumidity function in the DHT_sensor_library library was modified by disabling its original code and instead sending a "ReadHumidity" message to the serial port. After waiting for the data simulation module to process the request and return a message to the serial port, the received humidity value data is assigned to the corresponding variable.

[0046] Step 1 is achieved through the following sub-steps:

[0047] Step 1.1: The client submits the user code to the IoT device control center, where the main device compiles it to obtain the compiled binary file;

[0048] Step 1.2: The client sends a request to the IoT device control center to download the compiled binary file;

[0049] Step 1.3: The client submits the downloaded binary file to the IoT device control center for burning. The master device sends the cached binary file to the slave device, which then burns it to the designated ESP32 development board.

[0050] The message types sent by the IoT device to the IoT device control center in step 3 include the following:

[0051] Output generated by user code, such as "hello world";

[0052] Control information for peripherals from IoT devices, such as "LED_ON";

[0053] Requests from IoT devices to read data from peripherals, such as "ReadHumidity".

[0054] Step 4 is achieved through the following sub-steps:

[0055] Step 4.1: For output generated by user code, mark the message type as 0 and send it to the client;

[0056] Step 4.2: For the ESP32's request to read peripheral data, calculate the simulation data value based on its sensor model configuration information, and then send it to the ESP32 through the IoT device control center;

[0057] For example, upon receiving a "ReadHumidity" message from the device, the system first queries the humidity model currently used by the ESP32 device and calculates the humidity value h by combining the initial timestamp t0 with the timestamp t carried in the message. If the current device's humidity model is "rapid rise," the calculation method is as follows:

[0058] h=((t-t0)*2)%(HUMIDITY_HIGH-HUMIDITY_LOW)+HUMIDITY_LOW

[0059] HUMIDITY_HIGH and HUMIDITY_LOW are the upper and lower limits of the humidity data. In this example, the upper limit is 65 and the lower limit is 5.

[0060] Step 4.3: For the ESP32's control information for peripherals, mark the message type as 1 and send it to the client.

[0061] Step 5 is achieved through the following sub-steps:

[0062] Step 5.1: The ESP32 parses the messages received from the IoT device control center to determine the type of simulation data;

[0063] Step 5.2: Assign the data values ​​to the corresponding variables according to the type of simulation data.

[0064] If the received simulation data is of type "Humidity", the data value will be assigned to a predefined humidity variable, such as humidity.

[0065] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.

Claims

1. A data simulation method for the Internet of Things (IoT) oriented towards seamless interaction, characterized in that, Includes the following steps: Step 1: The client compiles and burns the pre-written user program through the IoT device control center; the IoT device control center consists of master devices and slave devices, and each slave device is connected to multiple IoT devices; The master device downloads the cross-compilation tools and library code required to compile the IoT device program code, and performs the compilation of the user program and interaction with the slave device; Burning compiled files to the device and interacting with IoT devices; The main device makes some modifications to the library code required for compiling the user program, enabling the IoT device to interact with the external data simulation module. When the user program is running, the IoT device's control of peripherals and requests to read peripheral data depend on its interaction with the external data simulation module. Step 2: The client creates or updates the sensing model information of the IoT device by sending a request to the data simulation module. This step can be executed when and how many times, depending on the user's needs. Step 3: The IoT device control center obtains the real-time messages output by the IoT device and forwards them to the data simulation module; Step 4: The data simulation module classifies the messages received from the IoT device control center and decides whether to send them to the client or forward them to the IoT device through the IoT device control center; Step 5: The IoT device processes the message received from the IoT device control center. After processing, if the user program is still running, the process jumps to step 3; otherwise, the process ends.

2. The IoT data simulation method for seamless interaction according to claim 1, characterized in that, Step 1 is achieved through the following sub-steps: Step 1.1: The client submits the user code to the IoT device control center, where the main device compiles it to obtain the compiled binary file; Step 1.2: The client sends a request to the IoT device control center to download the compiled binary file; Step 1.3: The client submits the downloaded binary file to the IoT device control center for burning. The master device sends the cached binary file to the slave device, which then burns it to the specified IoT device.

3. The IoT data simulation method for seamless interaction according to claim 1, characterized in that, In step 3, the types of messages sent by the IoT device to the IoT device control center include the following: output generated by user code; control information of the IoT device to peripherals; and requests from the IoT device to read data from peripherals.

4. The IoT data simulation method for seamless interaction according to claim 1, characterized in that, Step 3 is achieved through the following sub-steps: Step 4.1: For output generated by user code, mark the message type and send it to the client; Step 4.2: For requests from IoT devices to read peripheral data, calculate the simulation data value based on the IoT device's sensor model configuration information, and then send it to the IoT device through the IoT device control center; Step 4.3: For control information from IoT devices to peripherals, mark the message type and send it to the client.

5. The IoT data simulation method for seamless interaction according to claim 1, characterized in that, Step 5 is achieved through the following sub-steps: Step 5.1: The IoT device parses the messages received from the IoT device control center to determine the type of simulation data; Step 5.2: Assign the data values ​​to the corresponding variables according to the type of simulation data.

Citation Information

Patent Citations

  • A method for simulating IoT devices

    CN112612475B

  • Internet of Things virtual sensor implementation method and device and intelligent terminal

    CN113949746A

  • Simulation IOT resource service system and method

    CN106027319A