Data transmission method and device, electronic equipment and medium

By implementing the data transmission method in the MQTT device simulation software, the historical and current operating data of the target device are acquired and processed, the problem of insufficient automation degree and multi-device simulation flexibility in the prior art is solved, and the multi-device processing capability and user experience of the system are improved.

CN119697219APending Publication Date: 2025-03-25JINAN DALU ELECTROMECHANICAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411909091.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The existing MQTT device simulation software lacks flexibility in automation and multi-device simulation, resulting in poor user experience, unable to truly reflect the dynamic characteristics of IoT devices, and is complex in management and inefficient in efficiency.

Method used

Provide a data transmission method, by obtaining the historical operation data and current operation data of the target device, determining the target data, and converting it into a target message to a cloud platform, realizing the sustainability change of device data and automation of message release.

Benefits of technology

It improves the system's ability to process multiple devices, improves flexibility and user experience, simplifies user operation processes, and reduces the steps of manually editing packets and inputting cloud IoT docking information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697219A_ABST
    Figure CN119697219A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method and device, electronic equipment and a medium, and relates to the field of data processing, the method realizes sustainable change of equipment data and automation of message publishing on the basis of realizing cloud Iot platform docking and basic functions of message publishing, the same software on the market is a manual editing message and a manual publishing message, and the data transmission efficiency is greatly improved. A one-process-one-device mode is changed into a one-thread-one-device mode, so that the capability of processing multiple devices by the system is enhanced, and the flexibility is improved; and the data persistence is realized in combination with the database, so that the two steps of manually filling cloud iot docking information and data messages each time are simplified, and the user operation process is simplified. The user does not need to manually edit the message or re-input the docking information of the Huawei cloud IoT, and the whole process becomes simpler and more visual. The improvement not only improves the performance, but also greatly improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a data transmission method, device, electronic device and medium. Background Art

[0002] In the current technology market, although there are many software tools designed to simulate MQTT communication between IoT devices and IoT platforms, they still have some obvious limitations in their functional implementation. First, these existing simulation software need to be executed manually every time they send messages to the IoT platform, and they cannot continuously upload data after normal operation like real IoT devices. At present, this static data transmission method cannot truly reflect the dynamic characteristics of IoT devices in actual applications, thus limiting the accuracy and practicality of simulating real IoT devices.

[0003] Secondly, these existing simulation software fail to implement a program (process) to simulate multiple IoT devices at the same time. When you want to simulate a scenario where multiple IoT devices are running and uploading data at the same time, you usually need to start a separate program (process) for each device. This method is not only inefficient, but also quite complicated to manage. When a large number of devices need to be simulated, users have to manage multiple processes at the same time, which not only increases the consumption of system resources, but also makes the entire simulation process cumbersome and inefficient. This design is particularly inconvenient in multi-device simulation scenarios, greatly reducing the user experience.

[0004] In addition, these simulation software often require users to manually write and upload messages to the cloud platform, which is not only complicated and time-consuming, but also inconvenient to simulate the dynamic changes of data in real IoT devices when uploading data, which affects the work efficiency when simulating IoT devices.

[0005] In summary, the existing MQTT device simulation software is insufficient in terms of automation and flexibility in multi-device simulation, and these problems together lead to a poor user experience. Summary of the invention

[0006] The purpose of the embodiments of the present application is to provide a data transmission method, apparatus, electronic device and medium to solve the above-mentioned problems existing in the prior art, and to have multi-device simulation capabilities and richer data simulation functions.

[0007] In a first aspect, a data transmission method is provided, which is applied to a server having a device simulation program file in a data transmission system, wherein the data transmission system further includes a device and a cloud platform. The method may include:

[0008] Acquire historical operation data of the target device stored in the database; the historical operation data is the data of the last operation of the simulated device simulated by the server on the target device;

[0009] If the time between the current time point and the time point when the last data transmission with the cloud platform ended is not less than the preset time point, the target data is determined based on the current operation data and the historical operation data generated by the target device at the current time point;

[0010] The target data is converted into a target message, and the target message is sent to the cloud platform.

[0011] In a possible implementation, after sending the target message to the cloud platform, the method further includes:

[0012] After obtaining a response from the cloud platform indicating successful receipt of the target message, the target data is stored in a database to form new historical operation data.

[0013] In a possible implementation, the method further includes:

[0014] Establishing an initial connection with the target device;

[0015] Simulate the target device based on the attribute data of the target device to generate a corresponding simulated device;

[0016] Determine the operation data of the target device when it is running as the operation data of the simulation device;

[0017] After obtaining a response from the cloud platform indicating successful receipt of a message corresponding to the operation data, the operation data is stored in a database to form the historical operation data.

[0018] In a possible implementation, the device simulation program file includes: an option subfile, a control subfile, and a display subfile;

[0019] The option subfile is used to select a group and add a simulated device;

[0020] The control subfile is used to control the simulation device;

[0021] The display sub-file is used to display at least one simulated device.

[0022] In a possible implementation, the option subfile includes: a group file and a newly added simulation device file.

[0023] In a possible implementation, the controlling sub-files includes: viewing files, deleting files, opening files, closing files, opening all files, and pausing or saving all files.

[0024] In a possible implementation, the display sub-file is also used to display the simulated device name, point, interval and status of each simulated device;

[0025] The display sub-file also includes the property files of each simulated device;

[0026] The property file is used to display device property data of the corresponding simulated device.

[0027] In a second aspect, a data transmission device is provided, which is applied to a server having a device simulation program file in a data transmission system, wherein the data transmission system further includes a device and a cloud platform, and the device may include:

[0028] An acquisition unit, configured to acquire historical operation data of a target device stored in a database; the historical operation data is data of the last operation of a simulated device when the server simulates the target device;

[0029] a determination unit, configured to determine target data based on the current operation data and the historical operation data obtained from the target device at the current time point if the time from the current time point to the last data transmission with the cloud platform is not less than a preset time point;

[0030] The conversion and sending unit is used to convert the target data into a target message and send the target message to the cloud platform.

[0031] In a third aspect, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0032] Memory, used to store computer programs;

[0033] The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.

[0034] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0035] The present application provides a data transmission method, which includes: obtaining the historical operation data stored in the database of the target device; the historical operation data is the data of the last operation of the simulated device simulated by the server on the target device; if the time from the current time point to the time point when the last data transmission with the cloud platform ends is not less than the preset time, the target data is determined based on the current operation data and historical operation data generated by the acquired target device at the current time point; the target data is converted into a target message, and the target message is sent to the cloud platform. The present application realizes the sustainable change of device data and the automation of message publishing on the basis of realizing the basic functions of cloud IoT platform docking and message publishing. The same software on the market is manual editing of messages and manual publishing of messages, and improves one process and one device to one thread and one device, which enhances the system's ability to handle multiple devices and improves flexibility; and combines the database to realize data persistence, simplifies the two steps of manually filling in the cloud IoT docking information and data messages each time, and simplifies the user operation process. Users no longer need to manually edit messages or re-enter the docking information of Huawei Cloud IoT, and the whole process becomes simpler and more intuitive. Such improvements not only improve performance, but also greatly improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A system architecture diagram of a data transmission system provided in an embodiment of the present application;

[0038] Figure 2 A flowchart of a data transmission method provided in an embodiment of the present application;

[0039] Figure 3 A schematic diagram of a device simulation program provided in an embodiment of the present application;

[0040] Figure 4 A schematic diagram of the property area of ​​the device simulation program provided in an embodiment of the present application;

[0041] Figure 5 A schematic diagram of the structure of a data transmission device provided in an embodiment of the present application;

[0042] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0044] The system architecture of the data transmission system provided in the embodiment of the present application is as follows: Figure 1 As shown, the data transmission system may include: a server with a device simulation program file, a device and a cloud platform; the server may be a physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), as well as basic cloud computing services such as big data and artificial intelligence platforms.

[0045] In the current technology market, although there are many software tools designed to simulate MQTT communication between IoT devices and IoT platforms, they still have some obvious limitations in their functional implementation. First, these existing simulation software need to be executed manually every time they send messages to the IoT platform, and they cannot continuously upload data after normal operation like real IoT devices. At present, this static data transmission method cannot truly reflect the dynamic characteristics of IoT devices in actual applications, thus limiting the accuracy and practicality of simulating real IoT devices.

[0046] Secondly, these existing simulation software fail to implement a program (process) to simulate multiple IoT devices at the same time. When you want to simulate a scenario where multiple IoT devices are running and uploading data at the same time, you usually need to start a separate program (process) for each device. This method is not only inefficient, but also quite complicated to manage. When a large number of devices need to be simulated, users have to manage multiple processes at the same time, which not only increases the consumption of system resources, but also makes the entire simulation process cumbersome and inefficient. This design is particularly inconvenient in multi-device simulation scenarios, greatly reducing the user experience.

[0047] In addition, these simulation software often require users to manually write and upload messages to the cloud platform, which is not only complicated and time-consuming, but also inconvenient to simulate the dynamic changes of data in real IoT devices when uploading data, which affects the work efficiency when simulating IoT devices.

[0048] Existing technology, the MQTT device access simulation software is published in the cloud developer community. The simulator provides an interface display to fill in the server address, device ID, and device key. Please fill in according to the actual device information created. Server address: that is, the domain name; device ID and device key; when the device or gateway accesses the IoT platform, it must first establish a connection with the platform to associate the device or gateway with the platform. The developer connects the device or gateway to the IoT platform by passing in the device information. Click the New Connection button. If the domain name, device ID, and secret key are correct, you can see that the log device is successfully connected and the device status can be viewed on the platform; publishing a Topic means that the device actively reports its own attributes or messages to the platform, and the Topic reporting and attribute reporting functions are implemented in the simulator. After the device successfully reports the attributes, the reported attributes can be viewed on the "Device Details" page.

[0049] In summary, the existing MQTT device simulation software is insufficient in terms of automation and flexibility in multi-device simulation, and these problems together lead to a poor user experience.

[0050] Therefore, in order to better simulate the behavior of real IoT devices and improve the accuracy and efficiency of testing, it is necessary to develop more advanced simulation tools that have a higher degree of automation, more flexible multi-device simulation capabilities, and richer data simulation functions.

[0051] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.

[0052] Figure 2 A flow chart of a data transmission method provided in an embodiment of the present application. Figure 2 As shown, the method may include:

[0053] Step S210: Obtain historical operation data of the target device stored in the database.

[0054] The historical operation data is the data of the last operation of the simulated device simulated by the server on the target device;

[0055] Before executing step S210, the method further includes:

[0056] The server establishes an initial connection with the target device;

[0057] Simulate the target device based on the attribute data of the target device to generate a corresponding simulated device; the simulated device will generate corresponding unique identification information (simulated device name) according to the attribute data of the target device and store it in a corresponding database;

[0058] This method is not limited to actual physical devices, but can also create virtual simulated devices, which are used to generate and upload device data. The created simulated devices and their related information (such as device type, value range, etc.) are saved in the database for easy management and subsequent use.

[0059] In some embodiments, the device simulation program corresponding to the device simulation program file in the server can read the previously saved simulated device information from the database into the memory, and open an independent thread for each simulated device data. This multi-threaded processing method allows the data generation and upload tasks of multiple simulated devices to be processed simultaneously, thereby improving processing efficiency.

[0060] Determine the operation data of the target device when it is running as the operation data of the simulated device;

[0061] After obtaining the response of the message corresponding to the successful reception of the operation data returned by the cloud platform, the operation data is stored in the database to form historical operation data.

[0062] This method reads the device values ​​recorded when the program was last closed from the database into memory.

[0063] After the server establishes the initial connection with the target device, the target device will disconnect from the server based on its actual operating conditions.

[0064] Afterwards, when the target device establishes a connection with the server again, the simulation device corresponding to the target device is determined according to the correspondence between the identification information of different simulation devices and different target devices stored in the database.

[0065] Afterwards, step S210 may specifically include: determining in the database the historical operation data of the last time the server and the cloud platform transmitted corresponding data to the simulated device through the identification information of the simulated device corresponding to the target device in the server.

[0066] In some embodiments, the server in the present application is a server having a device simulation program file, and the device simulation program file includes: an option sub-file, a control sub-file, and a display sub-file;

[0067] The option sub-file is used to select a group and add a simulation device; specifically, the option sub-file includes a group file and a new simulation device file.

[0068] The control subfile is used to control the simulation device; the control subfile includes: view file, delete file, open file, close file, open all files and pause or save all files.

[0069] The display sub-file is used to display at least one simulated device. The display sub-file is also used to display the simulated device name, point, interval and status of each simulated device;

[0070] The display sub-file also includes the property files of each simulated device; the property files are used to display the device property data of the corresponding simulated device.

[0071] In summary, the device simulation program file corresponds to the device simulation program such as Figure 3 As shown: The device simulator consists of three areas:

[0072] That is, the option area corresponding to the option sub-file, the control area corresponding to the control sub-file, and the display area corresponding to the display sub-file.

[0073] When using the device simulator, select the corresponding group name through the group in the option area and trigger the OK button;

[0074] When a new simulated device needs to be added, add the corresponding new device through the Add Simulated Device button in the option area.

[0075] The simulation devices under the corresponding group names are displayed in the display area. It can be understood that each simulation device simulates a physical device in actual application.

[0076] The display area also displays the simulated device name, number of points, interval, latest sending time (that is, the time point when the cloud platform returns a response of successful reception after the server sends the message corresponding to the target data to the cloud platform) and status of each simulated device.

[0077] The view button corresponding to viewing files, the delete button corresponding to deleting files, the open button corresponding to opening files, the close button corresponding to closing files, the open all button corresponding to all open files, and the pause all or save all buttons corresponding to pausing or saving files in the control area are used to control one or more simulation devices in the display area.

[0078] Furthermore, the display sub-file also includes the property file of each simulated device; the property file is used to display the device property data of the corresponding simulated device.

[0079] Combination Figure 4 As shown, it is the attribute area corresponding to the attribute file;

[0080] For example: properties corresponding to devices in the cloud platform; encoding | initial value | range | type;

[0081] In some embodiments, a button is used to confirm when adding, and a button is used to close when viewing. There is no verification when confirming adding, so please make sure that the information is filled in correctly.

[0082] Step S220: compare the duration from the current time point to the last time point when data transmission between the server and the cloud platform ended with the preset time point to determine the comparison result; and determine the target data based on the comparison result.

[0083] Specifically, if the current target device is initially connected to the server, it means that there has been no data transmission between the server and the cloud platform before, and there is no need to perform a duration comparison operation at this time.

[0084] If the current target device is not initially connected to the server, it means that the server and the cloud platform have performed data transmission operations before. After each data transmission, the cloud platform sends a response to the server with a message corresponding to the successful reception of the running data, records the time point at this time, and determines this time point as the time point when the data transmission between the server and the cloud platform ends.

[0085] Afterwards, when the target device is connected to the server again, the time between the current time point and the last time the data transmission between the server and the cloud platform ended is confirmed, and the time length is compared with the preset time length. The comparison results include:

[0086] If the time between the current time point and the last time when the data transmission between the server and the cloud platform ended is not less than the preset time, the target data is determined based on the current operation data and historical operation data generated by the target device at the current time point. For example, the target device is a quantity recognition sensor for a certain product. The number of products that the server and the cloud platform transmitted data last time was 10, that is, the historical operation data was 10. The number of products recognized at the current time point is 5, that is, the current operation data is 5, and the counting rule is superposition; at this time, the target data is the sum of the historical operation data and the current operation data.

[0087] If the time between the current time point and the last time the data transmission between the server and the cloud platform ended is less than the preset time, it indicates that there is no need to obtain the current running data of the target device at the current time point.

[0088] This method is to determine whether the time from the last upload has exceeded the set time interval. This mechanism ensures the continuity and timeliness of device data. Afterwards, if the judgment result is yes, that is, the time from the last upload has exceeded the set interval, new device data is dynamically generated according to the device value type (such as temperature, humidity, pressure, etc.) and value range set when creating the simulated device. This dynamic generation method makes the simulated data closer to the real scene and improves the accuracy and reliability of the test.

[0089] Step S230: convert the target data into a target message, and send the target message to the cloud platform.

[0090] Specifically, the above-mentioned device simulation program file configures the attribute information of the corresponding interface of the cloud platform;

[0091] The device simulation program file in the server generates a target message according to the attribute information of the corresponding interface of the configured cloud platform, and sends the target message to the cloud platform.

[0092] When the corresponding interface of the cloud platform receives the target message, it will return a response to the server indicating successful reception of the target message;

[0093] At this time, the server stores the target data in the database to form new historical operation data.

[0094] In some embodiments, when there are multiple simulated devices in the enabled state, target data is generated and sent based on the corresponding threads of each simulated device; at this time, that is, a large number of threads corresponding to simulated devices try to connect to the same cloud platform in the same time period, which may reach the maximum number of concurrent connections that the cloud platform can handle, thereby reducing performance or even causing denial of service. Furthermore, if the cloud platform cannot process all received messages in a timely manner, queue overflow or message delay may occur.

[0095] In order to solve the problem of reaching the maximum number of concurrent connections that the cloud platform can handle, thereby reducing performance and even causing denial of service: For non-real-time tasks, consider using message queues or event-driven architectures to put tasks into queues for asynchronous execution to avoid blocking the main thread or directly responding to user requests.

[0096] In order to solve the problem of queue overflow or message delay when the cloud platform cannot process all received messages in time: identify multiple target data and integrate them into larger batches for one-time processing to reduce I / O overhead and network round trips. Or, classify each target data according to the configured level matching rules to achieve priority queues so that key tasks can be processed faster.

[0097] The present application provides a data transmission method, which realizes the sustainable change of device data and the automation of message publishing on the basis of realizing the basic functions of cloud IoT platform docking and message publishing. The same software on the market manually edits messages and manually publishes messages, and improves one process and one device to one thread and one device, which enhances the system's ability to handle multiple devices and improves flexibility; and combines with the database to realize data persistence, simplifies the two steps of manually filling in Huawei Cloud IoT docking information and data messages each time, and simplifies the user operation process. Users no longer need to manually edit messages or re-enter Huawei Cloud IoT docking information, and the whole process becomes simpler and more intuitive. Such improvements not only improve performance, but also greatly improve user experience.

[0098] Corresponding to the above method, the embodiment of the present application also provides a data transmission device, such as Figure 5 As shown, the device comprises:

[0099] An acquisition unit 510 is used to acquire historical operation data of a target device stored in a database; the historical operation data is data when the server simulates the target device during the last operation of the simulated device;

[0100] The determination unit 520 is configured to determine the target data based on the current operation data and the historical operation data generated by the target device at the current time point if the time duration between the current time point and the last data transmission with the cloud platform is not less than a preset time duration;

[0101] The conversion and sending unit 530 is used to convert the target data into a target message and send the target message to the cloud platform.

[0102] The functions of each functional unit of a data transmission device provided in the above-mentioned embodiment of the present application can be realized through the above-mentioned method steps. Therefore, the specific working process and beneficial effects of each unit in a data transmission device provided in the embodiment of the present application are not repeated here.

[0103] The present application also provides an electronic device, such as Figure 6 As shown, it includes a processor 610 , a communication interface 620 , a memory 630 and a communication bus 640 , wherein the processor 610 , the communication interface 620 , and the memory 630 communicate with each other via the communication bus 640 .

[0104] Memory 630, for storing computer programs;

[0105] The processor 610 is used to execute the program stored in the memory 630 to implement the following steps:

[0106] Acquire historical operation data of the target device stored in the database; the historical operation data is the data of the last operation of the simulated device simulated by the server on the target device;

[0107] If the time between the current time point and the time point when the last data transmission with the cloud platform ended is not less than the preset time point, the target data is determined based on the current operation data and the historical operation data generated by the target device at the current time point;

[0108] The target data is converted into a target message, and the target message is sent to the cloud platform.

[0109] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0110] The communication interface is used for communication between the above electronic device and other devices.

[0111] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0112] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0113] The implementation methods and beneficial effects of the components of the electronic device in the above embodiments to solve the problems can be seen in Figure 2The various steps in the illustrated embodiment are implemented, therefore, the specific working process and beneficial effects of the electronic device provided by the embodiment of the present application are not repeated here.

[0114] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes a data transmission method described in any one of the above embodiments.

[0115] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute a data transmission method described in any one of the above embodiments.

[0116] Those skilled in the art will appreciate that the embodiments in the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt a complete hardware embodiment, a complete software embodiment, or a form of an embodiment combining software and hardware. Moreover, the present application may adopt a form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0117] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0118] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0119] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0120] Unless otherwise defined, the technical terms or scientific terms used in this application should be understood by people with ordinary skills in the field to which the present invention belongs. "First", "second" and similar words used in this application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect", "couple" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0121] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the present application embodiments are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application embodiments.

[0122] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the present application without departing from the spirit and scope of the embodiments in the present application. Thus, if these modifications and variations of the embodiments in the present application are within the scope of the embodiments in the present application and their equivalents, the embodiments in the present application are also intended to include these modifications and variations.

Claims

1. A data transmission method, characterized in that: Applied to a server having a device simulation program file in a data transmission system, the data transmission system also includes a device and a cloud platform, the method includes: Acquire historical operation data of the target device stored in the database; the historical operation data is the data of the last operation of the simulated device simulated by the server on the target device; If the time between the current time point and the time point when the last data transmission with the cloud platform ended is not less than the preset time point, the target data is determined based on the current operation data and the historical operation data generated by the target device at the current time point; The target data is converted into a target message, and the target message is sent to the cloud platform.

2. The method according to claim 1, characterized in that After sending the target message to the cloud platform, the method further includes: After obtaining a response from the cloud platform indicating successful receipt of the target message, the target data is stored in a database to form new historical operation data.

3. The method according to claim 2, characterized in that The method further comprises: Establishing an initial connection with the target device; Simulate the target device based on the attribute data of the target device to generate a corresponding simulated device; Determine the operation data of the target device when it is running as the operation data of the simulation device; After obtaining a response from the cloud platform indicating successful receipt of a message corresponding to the operation data, the operation data is stored in a database to form the historical operation data.

4. The method according to claim 3, characterized in that The device simulation program file includes: an option sub-file, a control sub-file and a display sub-file; The option subfile is used to select a group and add a simulated device; The control subfile is used to control the simulation device; The display sub-file is used to display at least one simulated device.

5. The method according to claim 4, characterized in that The option sub-files include: a group file and a new simulated device file.

6. The method according to claim 4, characterized in that The control sub-files include: viewing files, deleting files, opening files, closing files, opening all files, and pausing or saving all files.

7. The method according to claim 4, characterized in that The display sub-file is also used to display the simulated device name, point, interval and status of each simulated device; The display sub-file also includes the property files of each simulated device; The property file is used to display device property data of the corresponding simulated device.

8. A data transmission device, characterized in that: Applied to a server having a device simulation program file in a data transmission system, the data transmission system also includes a device and a cloud platform, the device includes: An acquisition unit, configured to acquire historical operation data of a target device stored in a database; the historical operation data is data of the last operation of a simulated device when the server simulates the target device; a determination unit, configured to determine target data based on the current operation data and the historical operation data obtained from the target device at the current time point if the time from the current time point to the last data transmission with the cloud platform is not less than a preset time point; The conversion and sending unit is used to convert the target data into a target message and send the target message to the cloud platform.

9. An electronic device, characterized in that: The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.