Modbus-to-LoRaWAN communication method and system, terminal and storage medium
By obtaining real-time data information of Modbus devices, building a collection description table and a virtual device mapping table, generating summary data information and sending it with LoRaWAN technology, the problems of low monitoring efficiency and extended response time of Modbus devices in emerging networks are solved, and the problem of further monitoring is achieved Efficient remote management and more flexible system integration.
Patent Information
- Application Number
- CN202411452661.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-01-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional Modbus devices face problems such as diverse equipment types, different standards, low remote monitoring and management efficiency, and extended response time when accessing emerging network technologies.
By obtaining real-time data information of Modbus devices, building a device acquisition description table and a virtual device mapping table, generating summary data information, and sending it to the remote server with LoRaWAN technology, realizing the rapidity and flexibility of data collection.
Improves the efficiency of remote monitoring and management, simplifies the construction process, enhances the integration and flexibility of the system, and is suitable for more types of Modbus devices.
Smart Images

Figure CN119254848A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of communication conversion, and in particular relates to a Modbus to LoRaWAN communication method, system, terminal and storage medium. Background Art
[0002] In modern engineering projects, Modbus protocol is widely used in various industrial automation equipment due to its mature, stable, easy to implement and maintain characteristics. However, with the rapid development of Internet of Things technology, there are more and more types of traditional Modbus devices, and the standards defined by various manufacturers are different. The deployment of individual scenarios is scattered and the distance is long, which makes it challenging to access emerging network technologies. As an emerging wireless communication technology, LoRaWAN occupies an important position in the field of Internet of Things with its advantages such as long-distance communication capability, low power consumption, large-scale connection and easy deployment.
[0003] At present, the remote monitoring and management of equipment usually adopts polling mechanism to collect data (polling is triggered in sequence according to a certain algorithm, and the index after the current execution is saved during polling so that the starting index position can be obtained at the next execution to achieve the purpose of load balancing). However, this method is not only inefficient, but also occupies a lot of wireless resources, resulting in longer response time. Summary of the invention
[0004] The purpose of the present invention is to provide a Modbus to LoRaWAN communication method to address the deficiencies in the prior art, which can solve any of the above technical problems.
[0005] In order to achieve the above object, the present invention adopts the following technical solution: A Modbus to LoRaWAN communication method, comprising: S1. Obtain real-time data information of the electronic device corresponding to the modbus device; S2. Constructing a device collection description table according to the real-time data information; S3, the transit gateway constructs a virtual device mapping table according to the device collection description table; S4, generating summary data information according to the virtual device mapping table; S5. Send the summary data information to a remote server using LoRaWAN technology.
[0006] Preferably, the step of obtaining real-time data information of the electronic device corresponding to the modbus device includes the following: Divide the area according to the types and environments corresponding to all the modbus devices to form at least two supervision areas; The modbus device is used to obtain real-time data information of the electronic equipment in the supervision area; wherein the real-time data information includes a device address and a register address.
[0007] Preferably, the step of constructing a device collection description table according to the real-time data information includes the following: The modbus device performs classification and analysis according to the real-time data information to form corresponding real-time description items; Transmitting the real-time description item to the transit gateway via LoRaWAN technology or RS485 interface technology; When the sum of the number of real-time description items and past description items reaches a first preset total number, a new device collection description table is reconstructed.
[0008] Preferably, the transit gateway includes an MCU component, an RS485 interface, a LoRaWAN interface, a power supply component and a USB interface; one end of the RS485 interface is electrically connected to the MCU component; the other end of the RS485 interface is electrically connected to the Modbus device; the LoRaWAN interface is electrically connected to the MCU component; the LoRaWAN interface is used for communication connection with the remote server; one end of the USB interface is electrically connected to the MCU component; the other end of the USB interface is used for communication connection with the remote server or for electrical connection with the power supply component.
[0009] Preferably, the step of constructing a virtual device mapping table according to the device collection description table by the transit gateway includes the following: The transit gateway reads and parses the data corresponding to the device collection description table; The transit gateway makes a mirror copy of the data corresponding to the device collection description table to form the virtual device mapping table.
[0010] Preferably, the step of forming the virtual device mapping table includes the following: When the sum of the number of real-time mapping items and previous mapping items in the virtual device mapping table reaches a second preset total number, a new virtual device mapping table is reconstructed.
[0011] Preferably, the step of generating summary data information according to the virtual device mapping table includes the following: Constructing a reporting trigger rule table according to the virtual device mapping table; When the sum of the number of rule items in the reporting trigger rule table reaches a third preset number, it is considered that the trigger condition is met; At the same time, the report triggers all rule items in the rule table to generate summary data information.
[0012] The present invention also discloses a Modbus to LoRaWAN communication system, which is used to execute the Modbus to LoRaWAN communication method; the Modbus to LoRaWAN communication system comprises: A collection module, the collection module is used to obtain real-time data information of the electronic device corresponding to the modbus device; Data construction module, the data construction module is used to construct the device acquisition description table and the virtual device mapping table A transmission module, wherein the transmission module is used to generate summary data information according to the virtual device mapping table and send the summary data information to a remote server in a LoRaWAN technology manner.
[0013] Preferably, a Modbus to LoRaWAN communication terminal comprises: a memory, a processor, and a Modbus to LoRaWAN communication program stored in the memory and executable on the processor, wherein the Modbus to LoRaWAN communication program implements the steps of the Modbus to LoRaWAN communication method as described above when executed by the processor.
[0014] Preferably, a storage medium stores a Modbus to LoRaWAN communication program, and when the Modbus to LoRaWAN communication program is executed by a processor, the steps of the Modbus to LoRaWAN communication method as described above are implemented.
[0015] The beneficial effect of the present invention is that the technical solution first obtains the real-time data information of the electronic device corresponding to the modbus device, which is conducive to improving the efficiency of remote monitoring and management; then, a device collection description table is constructed according to the real-time data information, and the transit gateway constructs a virtual device mapping table according to the device collection description table, so as to achieve rapid data collection and be applicable to more types of Modbus devices; then, summary data information is generated according to the virtual device mapping table, and finally, the summary data information is sent to a remote server in the form of LoRaWAN technology, so as to be applicable to more types of Modbus devices and their different parameter collections, and realize the Modbus to LoRaWAN communication mode, thereby simplifying the construction process, and improving the integration and flexibility of the system; and can improve the efficiency of remote monitoring and management. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The following will refer to the attached Figures 1 to 9 To describe the features, advantages and technical effects of exemplary embodiments of the present invention.
[0017] Figure 1This is a flow chart of a Modbus to LoRaWAN communication method according to an embodiment of the present invention; Figure 2 A structural block diagram of a transit gateway according to an embodiment of the present invention; Figure 3 A structural block diagram of a transit gateway according to an embodiment of the present invention; Figure 4 A structural block diagram of a device acquisition description table according to an embodiment of the present invention; Figure 5 A structural block diagram of a virtual device mapping table according to an embodiment of the present invention; Figure 6 A structural block diagram of a reporting trigger rule table according to an embodiment of the present invention; Figure 7 A flowchart of a reporting triggering process according to an embodiment of the present invention; Figure 8 This is a structural block diagram of a Modbus to LoRaWAN communication system according to an embodiment of the present invention; Fig. 9 This is a structural block diagram of a Modbus to LoRaWAN communication terminal according to an embodiment of the present invention.
[0018] In the figure: 1001-processor; 1002-communication bus; 1003-user interface; 1004-network interface; 1005-memory; 1-MCU component; 2-RS485 interface; 3-LoRaWAN interface; 4-power supply component; 5-USB interface. DETAILED DESCRIPTION
[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0020] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0021] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0022] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and multiple situations exist alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0023] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0024] The present invention provides a Modbus to LoRaWAN communication method, system, terminal and storage medium.
[0025] like Fig. 9 As shown, Fig. 9 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.
[0026] The terminal of the embodiment of the present invention can be a PC, or it can be a mobile terminal device with display function such as a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a portable computer, etc.
[0027] like Fig. 9As shown, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0028] Optionally, the terminal may also include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. Among them, sensors include light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light, and the proximity sensor may turn off the display screen and / or backlight when the mobile terminal is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can monitor the magnitude of acceleration in all directions (generally three axes), and can monitor the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; of course, the mobile terminal can also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which will not be repeated here.
[0029] Those skilled in the art will appreciate that the terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0030] Reference Figure 1 , a Modbus to LoRaWAN communication method, system, terminal and storage medium of the present invention provide a Modbus to LoRaWAN communication method, such as Figure 1 As shown, the Modbus to LoRaWAN communication method includes: S1. Obtain real-time data information of the electronic device corresponding to the modbus device; S2. Constructing a device collection description table according to the real-time data information; S3, the transit gateway constructs a virtual device mapping table according to the device collection description table; S4, generating summary data information according to the virtual device mapping table; S5. Send the summary data information to a remote server using LoRaWAN technology.
[0031] In this embodiment, the technical solution first obtains the real-time data information of the electronic device corresponding to the modbus device, which is conducive to improving the efficiency of remote monitoring and management; then, a device collection description table is constructed according to the real-time data information, and the transit gateway constructs a virtual device mapping table according to the device collection description table, so as to achieve rapid data collection and be applicable to more types of Modbus devices; then, summary data information is generated according to the virtual device mapping table, and finally, the summary data information is sent to the remote server in the form of LoRaWAN technology, so as to be applicable to more types of Modbus devices and their different parameter collections, and realize the Modbus to LoRaWAN communication mode, thereby simplifying the construction process, and improving the integration and flexibility of the system; and can improve the efficiency of remote monitoring and management.
[0032] Specifically, in some implementations, in S1, the step of obtaining real-time data information of the electronic device corresponding to the modbus device includes the following: Divide the area according to the types and environments corresponding to all the modbus devices to form at least two supervision areas; The modbus device is used to obtain real-time data information of the electronic equipment in the supervision area; wherein the real-time data information includes device address, register address, etc.
[0033] That is to say, since Modbus devices are deployed in a dispersed manner and at long distances, it is necessary to divide all Modbus devices into regions according to their types and environments. Then, the Modbus devices are used to obtain real-time data information of electronic equipment in the regulatory area, thereby achieving regional management, improving the rationality and efficiency of supervision, and effectively solving the problem of difficult and high cost of scene wiring. Among them, regional division is carried out according to the environment: the distance difference between the Modbus device and the corresponding transit gateway is used to divide the far and near areas. The Modbus devices in the closer areas (divided according to actual needs) implement a single-level transit gateway (i.e., one transit gateway); the Modbus devices in the farther areas (divided according to actual needs) implement a multi-level transit gateway (at least two transit gateways perform LoRaWAN communication to shorten the single transmission distance; or each transit gateway at the multiple levels can also be directly connected to the remote server for communication, and a single transmission is also performed between the two transit gateways).
[0034] Specifically, in some implementations, in S2, the step of constructing a device collection description table according to the real-time data information includes the following: The modbus device performs classification and analysis according to the real-time data information to form corresponding real-time description items; Transmitting the real-time description item to the transit gateway via LoRaWAN technology or RS485 interface technology; When the sum of the number of real-time description items and past description items reaches the first preset total number, a new device collection description table is rebuilt. The first preset total number is 100. Figure 4 As shown, the transit gateway controls the modbus device to collect and summarize the device address, register address, number of variables and data type of the corresponding electronic device according to the actual needs of the on-site equipment and in accordance with the rules to form the corresponding real-time description items; the real-time description items are transmitted to the transit gateway through LoRaWAN technology or RS485 interface technology to complete the configuration work. And when the sum of the number of real-time description items and past description items reaches 100 description items, the modbus device needs to construct a new device collection description table for more than 100 real-time description items and past description items, thereby improving the integration and flexibility of the system, reducing excessive communication burden; and can improve the efficiency of remote monitoring and management. For detailed content of the device collection description table and description items, see Figure 4 and Schedule 1.
[0035] Table 1 Specifically, in some embodiments, Figure 2 and 3As shown, the transit gateway includes an MCU component 1, an RS485 interface 2, a LoRaWAN interface 3, a power supply component 4 and a USB interface 5; one end of the RS485 interface 2 is electrically connected to the MCU component 1; the other end of the RS485 interface 2 is electrically connected to the Modbus device; the LoRaWAN interface 3 is electrically connected to the MCU component 1; the LoRaWAN interface 3 is used for communication connection with the remote server; one end of the USB interface 5 is electrically connected to the MCU component 1; the other end of the USB interface 5 is used for communication connection with the remote server or for electrical connection with the power supply component 4 (having a USB interface 5, such as a TYPE-C interface; can be used for power supply or communication configuration). The USB interface 5 is a TYPE-C interface. The power supply component 4 uses a power supply or a battery for on-site power supply; and the voltage used by the power supply or battery is a 5-24V power supply system. That is to say, the RS485 interface can be used to communicate with the modbus device to collect the data of the modbus device, and the wireless LoRaWAN interface can be used to send the collected data to the remote server. Therefore, due to its wireless characteristics, the communication distance can be as long as several kilometers or even more than ten kilometers, eliminating the problem of wiring. In turn, it can simplify the construction process, improve the integration and flexibility of the system, and improve the efficiency of remote monitoring and management.
[0036] Among them, the Microcontroller Unit (MCU), also known as a single-chip microcomputer or a single-chip microcomputer, appropriately reduces the frequency and specifications of the central processing unit (CPU), and integrates peripheral interfaces such as memory, timer, USB, A / D conversion, UART, PLC, DMA, and even LCD drive circuits on a single chip to form a chip-level computer, which can perform different combination controls for different application scenarios.
[0037] Specifically, in some implementations, in S3, the step of the transit gateway constructing a virtual device mapping table according to the device collection description table includes the following: The transit gateway reads and parses the data corresponding to the device collection description table; The transit gateway makes a mirror copy of the data corresponding to the device acquisition description table to form the virtual device mapping table. In other words, in order to ensure the authenticity and accuracy of the data and to provide a unified and standardized data structure to the outside, a mirror copy is required to form the virtual device mapping table. That is, this application document collects electronic devices through the modbus device and transmits them to the outside through the wireless LoRaWAN interface to realize an efficient communication method from Modbus to LoRaWAN, thereby maintaining the technical advantages of LoRaWAN while improving communication efficiency and data processing capabilities.
[0038] The step of forming the virtual device mapping table includes the following: When the sum of the number of real-time mapping items and previous mapping items in the virtual device mapping table reaches the second preset total number, a new virtual device mapping table is rebuilt. The second preset total number is 100. Figure 5 As shown, the transit gateway records the device address, register address, number of variables and data type of the corresponding electronic device, collects and summarizes them according to the actual needs of the on-site equipment and the rules to form the corresponding real-time mapping items; the detailed virtual device mapping table and the content of the real-time mapping items or the previous mapping items can be seen in Figure 5 And Table 1.
[0039] Among them, in some implementations, the step of the transit gateway reading and parsing the data corresponding to the device collection description table includes the following: The transit gateway generates a verification instruction to the original modbus device to perform a verification operation; The original modbus device retransmits the real-time description item corresponding to the device acquisition description table to the transit gateway to form a preliminary verification result; The original modbus device re-collects the same type of data of the electronic device corresponding to the original modbus device to generate re-data; Comparing the re-data with the real-time description item corresponding to the device acquisition description table to form a re-verification result; Compare the secondary data with the real-time description items corresponding to the device acquisition description table to form a third verification result; When the preliminary verification result, the second verification result and the third verification result are all consistent, the mirror copy step can be performed. In other words, in order to avoid errors and the like during the transmission process, multiple verification operations need to be performed to improve monitoring management efficiency.
[0040] Wherein, in some embodiments, the transit gateway generates a verification instruction to the original modbus device to perform the verification operation, including the following steps: Determine the actual number of times and actual duration that the transit gateway receives the data corresponding to the device collection description table; When the actual number of times reaches the preset number of times (which can be 200 times, 300 times, 350 times, etc.), and the actual duration reaches the preset duration (which can be 1h, 2h, 10h, etc.), a verification instruction is generated to the original modbus device to perform the verification operation; When the actual number of times is less than the preset number of times (which can be 200 times, 300 times, 350 times, etc.), and the actual duration is less than the preset duration (which can be 1h, 2h, 10h, etc.), the transit gateway will perform a mirror copy of the data corresponding to the device collection description table. This method implements a sampling verification method to ensure the accuracy of the data and the speed and efficiency of communication.
[0041] Specifically, in some implementations, in S4, the step of generating summary data information according to the virtual device mapping table includes the following: Constructing a reporting trigger rule table according to the virtual device mapping table; wherein each mapping item in the virtual device mapping table is mirrored to form each corresponding rule item in the reporting trigger rule table; When the sum of the number of rule items in the reporting trigger rule table reaches a third preset number (for example, 100, 200, etc.), it is considered that the trigger condition is met; At the same time, all rule items in the reporting trigger rule table generate summary data information. In other words, in order to overcome the technical problems of low communication rate of LoRaWAN wireless technology and slow response of traditional polling method, it is necessary to build a reporting trigger rule table formed by a certain number of rule items; this table needs to be generated by users according to the actual needs of the site and in accordance with the rules; and then complete the configuration work through LoRaWAN wireless or USB interface.
[0042] Among them, there can be up to 100 rule items in the reporting trigger rule table, and one rule item will include the device address, register address, judgment condition and two variable parameter items. Here, one rule item can make a real-time judgment on whether the data in a mapping item in the virtual device mapping table meets the trigger condition. For example, in a rule item, the device address is 1, the register address is 0x1000, the judgment condition is "report when greater than a certain value", parameter 1 is 35, and parameter 2 is 60. It means that for a device with a modbus device address of 1, if the data value at its register 0x1000 is greater than 35, data reporting will be triggered, and the shortest reporting cycle is 60s. Therefore, there can be up to 100 rule items in the reporting trigger rule table, and one rule item will include the device address, register address, judgment condition and two variable parameter items. Here, one rule item can make a real-time judgment on whether the data in a mapping item in the virtual device mapping table meets the trigger condition. For example, in a rule item, the device address is 1, the register address is 0x1000, the judgment condition is "report when greater than a certain value", parameter 1 is 35, and parameter 2 is 60. It means that for a device with a modbus device address of 1, if the data value at register 0x1000 is greater than 35, data reporting will be triggered, and the shortest reporting cycle is 60s. With these rules, key data can be monitored and once exceeded, reporting will be triggered to achieve timely response instead of mindless periodic reporting that occupies wireless resources in vain. For detailed reporting trigger rule table and rule item contents, see Figure 6 and 7 shown.
[0043] The invention also discloses a Modbus to LoRaWAN communication system.
[0044] Among them, Figure 8 As shown, the Modbus to LoRaWAN communication system includes: The acquisition module 620 is used to obtain real-time data information of the electronic device corresponding to the modbus device; Data construction module 610, the data construction module 610 is used to construct a device collection description table and a virtual device mapping table The transmission module 630 is used to generate summary data information according to the virtual device mapping table and send the summary data information to a remote server in a LoRaWAN technology manner.
[0045] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a Modbus-to-LoRaWAN communication program is stored. When the Modbus-to-LoRaWAN communication program is executed by a processor, the following operations are implemented: Get the real-time data information of the electronic device corresponding to the modbus device; Constructing a device collection description table according to the real-time data information; The transit gateway constructs a virtual device mapping table according to the device collection description table; Generate summary data information according to the virtual device mapping table; The aggregated data information is sent to a remote server via LoRaWAN technology.
[0046] Furthermore, the step of obtaining real-time data information of the electronic device corresponding to the modbus device includes the following: Divide the area according to the types and environments corresponding to all the modbus devices to form at least two supervision areas; The modbus device is used to obtain real-time data information of the electronic equipment in the supervision area; wherein the real-time data information includes device address, register address, etc.
[0047] Furthermore, the step of constructing a device collection description table according to the real-time data information includes the following: The modbus device performs classification and analysis according to the real-time data information to form corresponding real-time description items; Transmitting the real-time description item to the transit gateway via LoRaWAN technology or RS485 interface technology; When the sum of the number of real-time description items and past description items reaches a first preset total number, a new device collection description table is reconstructed.
[0048] Furthermore, the step of constructing a virtual device mapping table according to the device collection description table by the transit gateway includes the following: The transit gateway reads and parses the data corresponding to the device collection description table; The transit gateway makes a mirror copy of the data corresponding to the device collection description table to form the virtual device mapping table.
[0049] Furthermore, the step of forming the virtual device mapping table includes the following: When the sum of the number of real-time mapping items and previous mapping items in the virtual device mapping table reaches a second preset total number, a new virtual device mapping table is reconstructed.
[0050] Further, the step of generating summary data information according to the virtual device mapping table includes the following: Constructing a reporting trigger rule table according to the virtual device mapping table; When the sum of the number of rule items in the reporting trigger rule table reaches a third preset number, it is considered that the trigger condition is met; At the same time, the report triggers all rule items in the rule table to generate summary data information.
[0051] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode includes only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
[0052] According to the disclosure and teaching of the above description, those skilled in the art to which the present invention belongs can also change and modify the above embodiment. Therefore, the present invention is not limited to the above specific embodiment, and any obvious improvement, replacement or modification made by those skilled in the art on the basis of the present invention belongs to the protection scope of the present invention. In addition, although some specific terms are used in this specification, these terms are only for the convenience of description and do not constitute any limitation to the present invention.
Claims
1. A Modbus to LoRaWAN communication method, characterized in that: include: S1. Obtain real-time data information of the electronic device corresponding to the modbus device; S2. Constructing a device collection description table according to the real-time data information; S3, the transit gateway constructs a virtual device mapping table according to the device collection description table; S4, generating summary data information according to the virtual device mapping table; S5. Send the summary data information to a remote server using LoRaWAN technology.
2. The communication method of Modbus to LoRaWAN according to claim 1, characterized in that: The step of obtaining real-time data information of the electronic device corresponding to the modbus device includes the following: Divide the area according to the types and environments corresponding to all the modbus devices to form at least two supervision areas; The modbus device is used to obtain real-time data information of the electronic equipment in the supervision area; wherein the real-time data information includes a device address and a register address.
3. The communication method of Modbus to LoRaWAN according to claim 1, characterized in that: The step of constructing a device collection description table according to the real-time data information includes the following: The modbus device performs classification and analysis according to the real-time data information to form corresponding real-time description items; Transmitting the real-time description item to the transit gateway via LoRaWAN technology or RS485 interface technology; When the sum of the number of real-time description items and past description items reaches a first preset total number, a new device collection description table is reconstructed.
4. The Modbus to LoRaWAN communication method according to claim 1, characterized in that: The transit gateway includes an MCU component, an RS485 interface, a LoRaWAN interface, a power supply component and a USB interface; one end of the RS485 interface is electrically connected to the MCU component; the other end of the RS485 interface is electrically connected to the Modbus device; the LoRaWAN interface is electrically connected to the MCU component; the LoRaWAN interface is used for communication connection with the remote server; one end of the USB interface is electrically connected to the MCU component; the other end of the USB interface is used for communication connection with the remote server or for electrical connection with the power supply component.
5. The communication method of Modbus to LoRaWAN according to claim 1, characterized in that: The step of constructing a virtual device mapping table according to the device collection description table by the transit gateway includes the following: The transit gateway reads and parses the data corresponding to the device collection description table; The transit gateway makes a mirror copy of the data corresponding to the device collection description table to form the virtual device mapping table.
6. The communication method of Modbus to LoRaWAN according to claim 5, characterized in that: The step of forming the virtual device mapping table includes the following: When the sum of the number of real-time mapping items and previous mapping items in the virtual device mapping table reaches a second preset total number, a new virtual device mapping table is reconstructed.
7. The communication method of Modbus to LoRaWAN according to claim 1, characterized in that: The step of generating summary data information according to the virtual device mapping table includes the following: Constructing a reporting trigger rule table according to the virtual device mapping table; When the sum of the number of rule items in the reporting trigger rule table reaches a third preset number, it is considered that the trigger condition is met; At the same time, the report triggers all rule items in the rule table to generate summary data information.
8. A Modbus to LoRaWAN communication system, characterized in that: Used to execute the Modbus to LoRaWAN communication method according to any one of claims 1 to 7 above; the Modbus to LoRaWAN communication system comprises: A collection module, the collection module is used to obtain real-time data information of the electronic device corresponding to the modbus device; Data construction module, the data construction module is used to construct the device acquisition description table and the virtual device mapping table A transmission module, wherein the transmission module is used to generate summary data information according to the virtual device mapping table and send the summary data information to a remote server in a LoRaWAN technology manner.
9. A Modbus to LoRaWAN communication terminal, characterized in that: include: A memory, a processor, and a Modbus-to-LoRaWAN communication program stored in the memory and executable on the processor, wherein the Modbus-to-LoRaWAN communication program, when executed by the processor, implements the steps of the Modbus-to-LoRaWAN communication method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a Modbus-to-LoRaWAN communication program, and when the Modbus-to-LoRaWAN communication program is executed by the processor, the steps of the Modbus-to-LoRaWAN communication method according to any one of claims 1 to 7 are implemented.
