An Internet of Things intelligent terminal system and method capable of actively adjusting communication mode
By integrating LORA module, 4G module and remote communication switching module in the IoT smart terminal, automatic switching between LORA communication mode and 4G communication mode is achieved, which solves the problem of restricted communication methods of IoT terminals and reduces communication costs. Improves stability and safety.
Patent Information
- Application Number
- CN202410660766.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2044-05-27
AI Technical Summary
The communication methods of IoT smart terminals are limited in different occasions, resulting in high communication costs, poor stability and security.
By integrating LORA module, 4G module and remote communication switching module in the Internet of Things smart terminal, the LORA communication signal strength is detected in real time and the LORA communication mode and 4G communication mode are automatically switched to realize adaptive adjustment of the communication mode.
It reduces the communication cost of IoT terminals, improves the stability and security of communication, enhances the reliability of communication, and solves the reliable communication problem in the case of poor LORA signal strength.
Smart Images

Figure CN118555624B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet of Things communication technology, and in particular to an Internet of Things intelligent terminal system and method capable of actively adjusting a communication mode. Background Art
[0002] The IoT smart terminal is a device that integrates perception, communication, computing and control functions, and is used to connect and interact with the physical world and the network world. They can collect environmental data, real-time monitoring, remote control and interconnection, providing basic support for the IoT system.
[0003] IoT smart terminals are connected to the industrial Internet through various wireless communication technologies such as Wi-Fi, Bluetooth, LORA, NB-IoT, 4G, etc., forming a broad IoT network, providing users with smarter, more convenient and efficient services and experiences; at the same time, they are also an important part of building smart cities, smart manufacturing, smart agriculture and other fields.
[0004] Due to the advantages of long-distance transmission, low power consumption, good anti-interference, low cost, multi-node connection, and high security, LORA communication technology has been widely used in the fields of Internet of Things, smart cities, industrial automation, logistics warehousing, public utilities, etc. Therefore, a large number of IoT smart terminals adopt LORA communication mode. However, although LORA communication technology has great advantages in IoT communication, it also has the following problems:
[0005] 1. Changes in the working environment will affect the use of LoRa wireless communication; excessive changes in temperature and humidity will affect the transmission distance of the LoRa wireless module;
[0006] 2. Strong interference sources will affect the use of LORA wireless communication; working in places with strong electromagnetic interference sources, the stability of the LORA module is difficult to guarantee;
[0007] 3. Excessive obstruction will affect the use of LORA wireless communication; if there are multiple layers of metal objects or buildings blocking the communication channel, the distance of LORA wireless transmission will also be greatly affected;
[0008] Therefore, in many cases, IoT smart terminals cannot use LORA communication and can only use other methods for communication; however, different communication methods have their own application scenarios, and also have their own advantages and disadvantages. No one method can solve all communication problems between IoT smart terminals; for example: if IoT smart terminals completely use 4G communication, they also face the problem of high communication costs; first of all, 4G communication needs to bear the traffic fee during the communication process. The larger the traffic, the higher the cost. Secondly, in general, the number of IoT smart terminals will be relatively large. If all 4G communications are carried out through cloud servers, the corresponding bandwidth and cloud server performance should be selected at a higher level, and the rental fee will be more expensive. Therefore, how to improve the stability and reliability of communication on the basis of reducing the communication cost of IoT terminals is one of the urgent problems to be solved.
[0009] In patent CN113473412A, a method for reliable and secure data communication in a railway EMU operation station is mentioned, including: setting a wireless communication module, using the wireless communication module to realize data interaction between each terminal device and an interface server; the wireless communication module includes: multiple 5G communication modules and multiple LoRa communication modules and a micro control unit; wherein the 5G communication module adopts a 5G public network communication technology to realize data interaction, and each of the 5G communication modules can support a network of a 5G network operator, and cooperate with the micro control unit to realize data interaction between the terminal device and the interface server; each of the LoRa communication modules supports the LoRaWan protocol, cooperates with the micro control unit to realize data interaction between the terminal device and the interface server, and can support reliable and secure data transmission in the EMU operation station through the cooperation between 5G and LoRa. However, since 5G communication in the patent is used to transmit high-speed safety data and LoRaWan is used to transmit low-speed safety data, it can be seen that although the two can complement each other, when LoRaWan fails, it is still easy to affect the transmission of data in the EMU operation station, thereby causing the problem of poor adaptability of data transmission.
[0010] Patent CN117459855A mentions a method and system for collecting power data based on LoRa communication. The method first sends a collection message to the LoRa gateway and transmits it to the LoRa slave node wirelessly. Then, the power data of the power equipment is collected according to the collection message, and the collected power data is sent back to the power smart terminal and the power data is parsed in a standardized manner. Finally, the power smart terminal standardizes and packages the power data according to the set operating mode, uploads the standardized and packaged power data to the cloud server, and responds to the power data sent by the cloud server. The two working modes can realize the separate operation of the two modes according to the needs, or the two modes can be operated in parallel. The parallel operation of the two modes increases the adaptability of data reporting, but since the two working modes described in the patent are one to upload data periodically and receive power data sent by the cloud server, and the other to receive power data sent from the cloud server and respond to the data collection call of the power business system, the LoRa gateway is connected through the network port or serial port, and the power data is sent and received in the corresponding mode. This method can be used to solve the problem of data collection between single devices on the traditional distribution side and realize the adaptability of data reporting, but it cannot realize the adaptability between communication modes, and it cannot solve the problem of stable information transmission between power smart terminals when the LoRa gateway fails. Summary of the invention
[0011] In view of this, the present invention aims to propose an Internet of Things smart terminal system and method capable of actively adjusting the communication mode, so as to solve the problem in the prior art that the communication mode of the Internet of Things smart terminal is restricted by different reasons in different occasions, resulting in high communication cost, poor communication stability and security of the Internet of Things smart terminal; thereby solving the problem that the communication mode of the Internet of Things terminal is restricted in different occasions, expanding the scope of application of the communication mode between the Internet of Things terminals, reducing the communication cost of the Internet of Things terminals, improving the communication stability and security between the Internet of Things terminals, and enhancing the reliability of communication between the Internet of Things terminals.
[0012] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0013] The present invention relates to an Internet of Things intelligent terminal system and method capable of actively adjusting a communication mode, wherein the method capable of actively adjusting a communication mode comprises the following steps:
[0014] Step 1: Newly define the message: Based on the original message data, a new communication message is defined;
[0015] Step 2: Analyze the message: The IoT smart terminal at the receiving end analyzes the received message to obtain a valid message;
[0016] Step 3: Real-time detection: According to the effective message information, the signal strength of LORA communication between different IoT smart terminals is detected in real time, and the automatic switching between LORA communication mode and 4G communication mode is realized according to the change of LORA communication signal strength;
[0017] Among them, step three includes:
[0018] Step S31: Preset a low threshold value and a high threshold value of the LORA communication signal strength;
[0019] Step S32: Real-time detection: The IoT smart terminal at the receiving end monitors the current LoRa communication signal strength in real time according to the LoRa communication signal strength field in the valid message information;
[0020] Step S33: Determine whether the threshold value is less than or equal to the current LORA communication signal strength and less than or equal to the threshold value. If yes, the IoT smart terminal actively starts the 4G communication mode through the remote communication switching module. At this time, LORA communication and 4G communication are enabled at the same time, and return to step 2. If no, execute step S34.
[0021] Step S34: Determine whether the current LORA communication signal strength is less than the low threshold value. If so, the IoT smart terminal turns off the LORA communication mode, communicates through the 4G communication mode, and returns to step 2; if not, the current LORA communication signal strength is greater than the high threshold value, the IoT smart terminal starts the LORA communication mode through the remote communication switching module, and returns to step 2.
[0022] A smart terminal system for the Internet of Things capable of actively adjusting a communication mode, the system adopts the method capable of actively adjusting a communication mode, comprises a smart terminal for the Internet of Things, the smart terminal for the Internet of Things comprises a LORA module, a 4G module and a remote communication switching module, both the LORA module and the 4G module are bidirectionally connected to the remote communication switching module, at least two smart terminals for the Internet of Things are provided, the two smart terminals for the Internet of Things required to communicate are bidirectionally connected to each other via the LORA module or the 4G module, and the automatic switching between the communication mode of the LORA module and the communication mode of the 4G module is realized through the action of the remote communication switching module.
[0023] Furthermore, two IoT smart terminals are set, and the two IoT smart terminals are respectively recorded as smart terminal 1 and smart terminal 2. Smart terminal 1 includes a first LORA module, a first 4G module and a first remote communication switching module, and smart terminal 2 includes a second LORA module, a second 4G module and a second remote communication switching module. The first remote communication switching module is connected to the smart terminal 2 through the first LORA module and the second LORA module in sequence, or the first remote communication switching module is connected to the smart terminal 2 through the first 4G module and the second 4G module in sequence.
[0024] Further, the first LORA module and the second LORA module are communicated and connected to form a LORA channel, and the first 4G module and the second 4G module are communicated and connected to form a 4G channel.
[0025] Furthermore, the LORA channel is the main communication channel and the 4G channel is the backup channel.
[0026] Furthermore, the IoT intelligent terminal also includes a message processing module, a local communication transceiver module, an I / O module, a serial port module, and an Ethernet port module. The serial port module and the Ethernet port module are both bidirectionally connected to the local communication transceiver module, and the local communication transceiver module is bidirectionally connected to the remote communication switching module and the I / O module respectively.
[0027] Furthermore, the remote communication switching module, the message processing module, and the local communication transceiver module are integrated on a CPU chip, and the CPU chip is arranged inside the IoT smart terminal.
[0028] Furthermore, the IoT smart terminal also includes DDR memory and EEPROM memory, the I / O module includes an I / O chip module, the serial port module includes a serial port chip, the network port module includes a network port chip, the LORA module includes a LORA chip, the 4G module includes a 4G chip, and the CPU chip is bidirectionally connected to the LORA chip, 4G chip, I / O chip module, serial port chip, network port chip, DDR memory and EEPROM memory respectively.
[0029] Furthermore, the I / O chip module is composed of an I / O one chip, an I / O two chip, an I / O three chip, and an I / O four chip.
[0030] Furthermore, the CPU chip is an ARM9 chip ARM926EJ, with a main frequency of 1.4GHz and runs the Linux operating system.
[0031] Compared with the prior art, the IoT intelligent terminal system and method capable of actively adjusting the communication mode described in the present invention has the following beneficial effects:
[0032] The system and method can solve the problem of limited communication modes of IoT terminals in different occasions, expand the scope of application of communication modes between IoT terminals, reduce the communication cost of IoT terminals, improve the communication stability and security between IoT terminals, and enhance the reliability of communication between IoT terminals. In addition, the problem of reliable communication of IoT smart terminals in the case of poor LORA signal strength can be solved. The IoT smart terminals can detect the changes in LORA signal strength in real time and automatically switch the communication modes of LORA communication and 4G, thereby ensuring the reliability of communication. This not only makes up for the disadvantage of being easily affected by the environment when using LORA communication alone, but also reduces the communication cost of fully using 4G communication, and can also achieve seamless switching of communication modes in dual-channel mode. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which constitute part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations of the present invention.
[0034] In the figure:
[0035] Figure 1 It is a schematic diagram of the communication mode between smart terminals of the Internet of Things;
[0036] Figure 2 This is a schematic diagram of the communication switching process of the IoT smart terminal;
[0037] Figure 3 This is a schematic diagram of the structure block diagram of the IoT smart terminal;
[0038] Figure 4 This is a schematic diagram of the chip structure of the IoT smart terminal device.
[0039] Explanation of the accompanying drawings: 11, smart terminal 1; 111, first LoRa module; 112, first 4G module; 113, first remote communication switching module; 12, smart terminal 2; 121, second LoRa module; 122, second 4G module; 123, second remote communication switching module. DETAILED DESCRIPTION
[0040] The inventive concepts of the present disclosure will be described below using terms commonly used by those skilled in the art to convey the essence of their work to other persons skilled in the art. However, these inventive concepts can be embodied in many different forms and should not be considered limited to the embodiments described herein.
[0041] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0042] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0043] This embodiment is directed to an Internet of Things communication system, and is similar to a conventional Internet of Things intelligent terminal system that can actively adjust the communication mode in that the overall structure is composed of a memory, a cloud server, and a chip.
[0044] In the prior art, a large number of IoT smart terminals use the LORA communication mode. However, due to certain problems with the LORA communication mode in different application scenarios, IoT smart terminals cannot use LORA communication in many cases and can only use other methods for communication. However, different communication methods have their own application scenarios and their own advantages and disadvantages, so there is no one method that can solve all communication problems between IoT smart terminals.
[0045] In order to solve the problem that the communication mode of the Internet of Things smart terminal is restricted by different reasons in different occasions in the prior art, resulting in high communication cost, poor communication stability and security of the Internet of Things smart terminal; this embodiment proposes an Internet of Things smart terminal system and method that can actively adjust the communication mode, the Internet of Things smart terminal system that can actively adjust the communication mode adopts the method that can actively adjust the communication mode, including an Internet of Things smart terminal, the communication part of the Internet of Things smart terminal includes a LORA module, a 4G module and a remote communication switching module, the LORA module and the 4G module are both bidirectionally connected to the remote communication switching module, at least two Internet of Things smart terminals are set, the two Internet of Things smart terminals that need to communicate are bidirectionally connected through the LORA module or the 4G module, and the remote communication switching module is used. The function of the block is to realize automatic switching between the communication mode of the LoRa module and the communication mode of the 4G module. Specifically, the remote communication switching module is used to detect the change of the communication signal strength of the LoRa module, and automatically switch to the LoRa module communication mode and the 4G module communication mode to improve the reliability of communication. Among them, the LoRa module is a module for realizing LoRa communication between different IoT smart terminals. Under normal circumstances, different IoT smart terminals communicate in LoRa mode; the 4G module is a module for realizing 4G communication between different IoT smart terminals. Under normal circumstances, different IoT smart terminals do not communicate in 4G mode. Only when there is a problem with communication in the LoRa channel, the 4G channel is used for communication; the remote communication switching module is a control module for controlling the IoT smart terminal to enable LoRa communication or 4G communication.
[0046] Through the setting of the system, the problem of limited communication methods of IoT terminals in different occasions can be solved, the application scope of communication methods between IoT terminals can be expanded, the communication costs of IoT terminals can be reduced, the communication stability and security between IoT terminals can be improved, and the reliability of communication between IoT terminals can be enhanced.
[0047] Two IoT smart terminals are provided, and the two IoT smart terminals are respectively recorded as smart terminal 11 and smart terminal 2 12. Smart terminal 11 includes a first LoRa module 111, a first 4G module 112 and a first remote communication switching module 113. Smart terminal 2 12 includes a second LoRa module 121, a second 4G module 122 and a second remote communication switching module 123. The first remote communication switching module 113 is connected to smart terminal 2 12 through the first LoRa module 111 and the second LoRa module 121 in sequence, or the first remote communication switching module 113 is connected to smart terminal 2 12 through the first 4G module 112 and the second 4G module 122 in sequence, wherein the communication connection between the first LoRa module 111 and the second LoRa module 121 is formed. LORA channel, the LORA channel is the main communication channel, the first 4G module 112 and the second 4G module 122 are communicated and connected to form a 4G channel, the 4G channel is a backup communication channel, i.e., a backup channel, and the first 4G module 112 is communicated and connected with the second 4G module 122 through a cloud server. Specifically, the communication mode adaptive IoT smart terminal in the present invention supports both the LORA module and the 4G module communication modes. Under normal circumstances, communication is performed in the LORA mode, and the LORA channel is the main channel. Only when the LORA communication cannot be performed normally, it is switched to the 4G communication mode, and the 4G channel is used as the backup channel. When the LORA signal returns to normal, it is switched back to the LORA mode communication, thereby realizing the communication connection between the two IoT smart terminals that need to communicate.
[0048] Through the mutual cooperation between the LORA channel and the 4G channel, the communication cost between the smart terminals of the Internet of Things can be effectively reduced, and the scope of application of the communication between the smart terminals of the Internet of Things can be improved, avoiding the limitation of LORA communication due to different usage scenarios, which in turn affects the communication between the smart terminals of the Internet of Things. It is beneficial to improve the flexibility and stability of communication between the smart terminals of the Internet of Things, and also to enhance the reliability and security of communication between the smart terminals of the Internet of Things.
[0049] The IoT smart terminal also includes a message processing module, a local communication transceiver module, an I / O module, a serial port module, and a network port module. The serial port module and the network port module are both bidirectionally connected to the local communication transceiver module, and the local communication transceiver module is bidirectionally connected to the remote communication switching module and the I / O module respectively; wherein the remote communication switching module, the message processing module, and the local communication transceiver module are integrated on the CPU chip, the CPU chip is arranged inside the IoT smart terminal, the I / O module includes an I / O chip module, the serial port module includes a serial port chip, the network port module includes a network port chip, the LORA module includes a LORA chip, the 4G module includes a 4G chip, the IoT smart terminal also includes a DDR memory and an EEPROM memory, the CPU chip is bidirectionally connected to the LORA chip, the 4G chip, the I / O chip module, the serial port chip, the network port chip, the DDR memory, and the EEPROM memory respectively, in addition, the LORA module function is jointly realized by the LORA chip and the CPU chip, and the 4G module function is jointly realized by the 4G chip and the CPU chip , the remote communication switching module function is realized by the CPU chip, the message processing module is used to unpack, analyze and process the received message, and frame the message to be sent, the message processing module function is realized by the CPU chip, the local communication transceiver module function is realized by the CPU chip, the local communication transceiver module is used to control the network port and serial port chip to send and receive data, the I / O module collects and controls the local electrical quantity of the Internet of Things smart terminal, the local electrical quantity of the Internet of Things smart terminal includes any one or more of analog input, analog output, switch input and switch output signals, the I / O module function is realized by the I / O chip module, the serial port module is used to realize the serial port data exchange between the Internet of Things smart terminal and other devices, the serial port module function is jointly realized by the serial port chip and the CPU chip, the network port module is used to realize the network port data exchange between the Internet of Things smart terminal and other devices, the network port module function is jointly realized by the network port chip and the CPU chip, the model of each chip is set according to the requirements, preferably, the CPU chip is an ARM9 chip ARM926EJ, the main frequency is 1.4GHz, running Linux operating system, as the operating platform of the test system software; DDR memory model is MT41K256M, EEPROM memory model is AT24C04, serial port chip model is MAX232, network port chip model is CH395, LORA chip model is SX1261, 4G chip model is EC600N; I / O chip module is composed of I / O chip 1, I / O chip 2, I / O chip 3, I / O chip 4, in this embodiment, I / O chip 1, I / O chip 2, I / O chip 3, I / O chip 4 are analog input chip TLV5616, analog output chip NSC6273, switch input chip SN74HC00N and switch output chip SN74S74, but the specific model of each chip in the actual I / O chip module is selected and set according to actual needs. .
[0050] Through the coordinated setting of each module in the IoT smart terminal and the communication connection of each chip in each module, the problem of IoT smart terminals achieving reliable communication when the LORA signal strength is poor can be solved. This not only makes up for the disadvantage of being easily affected by the environment when using LORA communication alone, but also reduces the communication cost of fully using 4G communication.
[0051] A method capable of actively adjusting a communication mode, the method being applied to an IoT intelligent terminal system capable of actively adjusting a communication mode, the method comprising the following steps:
[0052] Step 1, newly define a message: based on the original message data, a new communication message is defined, wherein the original message data is determined by the communication protocol used. In this embodiment, the original message data is determined by the communication protocol used by LORA or 4G communication;
[0053] Step 2: Analyze the message: During the communication process, the IoT smart terminal at the receiving end receives the message sent by the IoT smart terminal at the sending end, analyzes the received message, obtains the valid message, and discards the invalid message;
[0054] Step 3: Real-time detection: According to the effective message information, the signal strength of LORA communication between different IoT smart terminals is detected in real time, and the automatic switching between LORA communication mode and 4G communication mode is realized according to the change of LORA communication signal strength.
[0055] The adaptive method can effectively solve the problem of reliable communication of IoT smart terminals when the signal strength of LORA communication is poor. The IoT smart terminals detect changes in the signal strength of LORA communication in real time and automatically switch the communication modes of LORA communication and 4G, thereby ensuring the reliability of communication.
[0056] In step one, the sequence number of the newly defined communication message includes sequence number 1, sequence number 2 and sequence number 3, and the message content of the newly defined communication message includes original message data, message sequence number and LORA communication signal strength, wherein the message of sequence number 1 is the original message data, and the number of bytes of the original message data is determined by the communication protocol used, and the message of sequence number 2 is the message sequence number of the current frame message, and the number of bytes of the message sequence number is 2, and the data type of the message sequence number is unsigned short, and the value range of the message sequence number is 0-65535. After each frame message is sent by the sending end Internet of Things intelligent terminal, the message sequence number increases by 1 until it increases to 65535, and after the message sequence number is reset to zero, it starts to increase from 0 again; sequence number 3 is the current LORA communication signal strength, and the current LORA communication signal strength indicates the percentage of the current LORA communication signal strength in the complete signal strength, the number of bytes of the LORA communication signal strength is 1, and the data type of the LORA communication signal strength is unsigned byte type unsigned char, the value range of LORA communication signal strength is 0-100; by redefining the communication message, adding two pieces of data, sequence number 2 and sequence number 3, the reliability of communication can be guaranteed and seamless switching can be achieved during communication switching; specifically, the newly defined communication message is shown in Table 1 below:
[0057] Table 1 Newly defined communication message data frame format
[0058] Serial number Message Content Number of bytes 1 Original message data Determined by the communication protocol used 2 Message sequence number 2 3 LORA communication signal strength 1
[0059] Through the new definition of communication messages, different from the existing communication messages that use a single communication protocol for information transmission and cannot confirm the accuracy of message transmission in real time, by adding the settings of sequence numbers 2 and 3 to the newly defined messages, it can not only meet the needs of automatic switching between LORA communication mode and 4G communication mode, but also distinguish messages transmitted with different frame numbers through different message sequence numbers, thereby avoiding the problem of message superposition and the problem of errors in the transmission of frames before and after the message, thereby improving the reliability and accuracy of the received message information, and improving the flexibility and accuracy of switching communication modes between different IoT smart terminals, thereby greatly reducing the communication cost between different IoT smart terminals.
[0060] Step 2 includes:
[0061] Step S21: Analyze the message: During the communication process, the IoT smart terminal at the receiving end receives the message sent by the IoT smart terminal at the sending end in real time;
[0062] Step S22: Analyze the message sequence number of the sequence number 2 in the received message: determine whether the message sequence number of the next frame message of the received message is greater than the message sequence number of the previous frame message of the received message. If yes, the currently received message is a valid message, and step 3 is executed; if no, step S23 is executed;
[0063] Step S23: Determine whether the message sequence number of the next frame message of the received message is equal to the message sequence number of the previous frame message of the received message. If yes, execute step S24; if not, execute step S25;
[0064] Step S24: The currently received message is a message sent from two channels after LORA and 4G communications are enabled at the same time. Any one of the two currently received messages is discarded, and the remaining message is taken as a valid message, and step three is executed;
[0065] Step S25: the currently received message is an invalid message that has been processed, and the currently received message is discarded and the process returns to step S21;
[0066] Among them, the previous frame refers to the frame message received before the currently received message, and the next frame message refers to the frame message received after the currently received message. It has no other implied meaning and is only used to distinguish the frame messages before and after the received message.
[0067] By analyzing the messages, the accuracy of the acquired messages can be effectively improved, and the errors in the received message information can be prevented from causing the wrong switching of the communication mode, thereby increasing the communication cost. It can also help to avoid the problem of message accumulation caused by uploading message data on two channels at the same time, and can effectively realize the selection of valid messages, paving the way for the automatic switching of different communication modes by the IoT smart terminals.
[0068] Step three includes:
[0069] Step S31: preset the low threshold value and high threshold value of the LORA communication signal strength in sequence number 3, wherein "high threshold value" and "low threshold value" are two threshold values corresponding to sequence number 3 "LORA communication signal strength" in Table 1; "high threshold value" is the signal strength for reliable communication when the LORA communication mode is adopted, and the value is generally 10, but it is not limited thereto; "low threshold value" is the signal strength for failure to communicate when the LORA communication mode is adopted, and the value is generally 5, but it is not limited thereto;
[0070] Step S32: Real-time detection: The IoT smart terminal at the receiving end monitors the current LoRa communication signal strength in real time according to the LoRa communication signal strength field in the valid message information;
[0071] Step S33: Determine whether the threshold value is less than or equal to the current LORA communication signal strength and less than or equal to the threshold value. If yes, the IoT smart terminal actively starts the 4G communication mode through the remote communication switching module. At this time, LORA communication and 4G communication are enabled at the same time, and return to step 2. If no, execute step S34.
[0072] Step S34: Determine whether the current LORA communication signal strength is less than the low threshold value. If yes, the LORA communication fails at this time, the IoT smart terminal turns off the LORA communication mode, relies entirely on the 4G communication mode, communicates through the 4G communication mode, and returns to step 2; No, the current LORA communication signal strength is greater than the high threshold value, the IoT smart terminal starts the LORA communication mode through the remote communication switching module, and returns to step 2;
[0073] Specifically, during the communication process, if the LoRa communication signal strength drops below the high threshold, the 4G communication mode is started. At this time, LoRa communication and 4G communication are enabled at the same time. If the LoRa communication signal strength continues to drop below the low threshold, the LoRa communication has failed. The IoT smart terminal turns off the LoRa communication and relies entirely on the 4G communication mode. If the LoRa communication signal strength recovers to above the set high threshold, it switches back to the LoRa communication mode.
[0074] Different from the method of mobile phone communication switching in the prior art, the switching method between WIFI and 4G / 5G communication widely used on mobile phones, and the logic of mobile phone signal switching is: when no data is received in WIFI connection mode, a repeated data request instruction is issued; if no data is received within a certain period of time, it is considered that WIFI communication is interrupted and switched to 4G / 5G communication; therefore, the switching of mobile phone signals is "passively" initiated after the communication interruption is detected, and the trigger condition is "no data is received". Therefore, this communication switching mode sacrifices the continuity and reliability of data communication, and is not applicable in some industrial occasions where communication continuity and reliability need to be guaranteed; and the method adopted by the present invention is: when the LORA communication signal strength is detected to be close to the low value of the communication threshold, while retaining the original LORA channel, a new 4G channel connection is "actively" initiated, and the two channels are kept in a certain situation at the same time; therefore, the communication mode switching method described in the present invention will not cause communication interruption and data loss, thereby ensuring the continuity and reliability of communication; in addition, the automatic switching between the LORA communication mode and the 4G communication mode is realized by the remote communication switching module through the intelligent terminal of the Internet of Things, which can It can effectively ensure the reliability of communication. In addition, under normal circumstances, the IoT smart terminals communicate through the LORA module, and monitor the current LORA signal strength in real time by detecting the "LORA communication signal strength" field in the message. When the LORA communication signal strength changes, the communication mode will switch between the LORA main channel and the 4G backup channel. In order to ensure the reliability of communication, a certain communication margin should be guaranteed when the main and backup channels are switched. By adopting the above-mentioned channel switching method, the channel switching time only depends on the CPU calculation time, which is generally less than 1ms and can be ignored. In addition, during the channel switching process, the existing channels are maintained at the same time, so that normal communication is not affected. Therefore, channel switching has no effect on communication, and it also has the characteristics of very high communication efficiency, thereby enabling the IoT smart terminal to automatically detect the LORA signal strength in real time, automatically switch to 4G communication when the LORA signal strength is poor, and automatically switch back to LORA communication when the LORA signal strength is restored, thereby realizing reliable communication of the IoT smart terminal, which not only makes up for the disadvantage of being easily affected by the environment when using LORA communication alone, but also reduces the communication cost of fully using 4G communication.
[0075] In the present invention, for any Internet of Things communication system, it can include a system structure for adaptive communication mode of an Internet of Things intelligent terminal described in this embodiment, and based on the relevant structures and assembly relationships of the LORA module, 4G module, and remote communication switching module provided in this embodiment, the Internet of Things communication system also includes conventional components including memory, cloud server, chip and other structures; similarly; in view of the fact that they are all prior art, they will not be elaborated here.
[0076] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method capable of actively adjusting a communication mode, characterized in that: The method comprises the following steps: Step 1, newly define message: based on the original message data, newly define the communication message; the sequence number of the newly defined communication message includes sequence number 1, sequence number 2 and sequence number 3, and the message content of the newly defined communication message includes the original message data, the message sequence number and the LORA communication signal strength, wherein the message of sequence number 1 is the original message data, the message of sequence number 2 is the message sequence number of the current frame message, and the sequence number 3 is the current LORA communication signal strength; Step 2: Analyze the message: The IoT smart terminal at the receiving end analyzes the received message to obtain a valid message; Step 3: Real-time detection: According to the effective message information, the signal strength of LORA communication between different IoT smart terminals is detected in real time, and the automatic switching between LORA communication mode and 4G communication mode is realized according to the change of LORA communication signal strength. in, Step 2 includes: Step S21: Analyze the message: During the communication process, the IoT smart terminal at the receiving end receives the message sent by the IoT smart terminal at the sending end in real time; Step S22: Analyze the message sequence number of the sequence number 2 in the received message: determine whether the message sequence number of the next frame message of the received message is greater than the message sequence number of the previous frame message of the received message. If yes, the currently received message is a valid message, and step 3 is executed; if no, step S23 is executed; Step S23: Determine whether the message sequence number of the next frame message of the received message is equal to the message sequence number of the previous frame message of the received message. If yes, execute step S24; if not, execute step S25; Step S24: The currently received message is a message sent from two channels after LORA and 4G communications are enabled at the same time. Any one of the two currently received messages is discarded, and the remaining message is taken as a valid message, and step three is executed; Step S25: the currently received message is an invalid message that has been processed, and the currently received message is discarded and the process returns to step S21; Step three includes: Step S31: preset the low threshold value and the high threshold value of the LORA communication signal strength, Step S32: Real-time detection: The IoT smart terminal at the receiving end monitors the current LoRa communication signal strength in real time according to the LoRa communication signal strength field in the valid message information; Step S33: Determine whether the threshold value is less than or equal to the current LORA communication signal strength and less than or equal to the threshold value. If yes, the IoT smart terminal actively starts the 4G communication mode through the remote communication switching module. At this time, LORA communication and 4G communication are enabled at the same time, and return to step 2. If no, execute step S34. Step S34: Determine whether the current LORA communication signal strength is less than the low threshold value. If yes, the IoT smart terminal turns off the LORA communication mode, communicates through the 4G communication mode, and returns to step 2; No, the current LORA communication signal strength is greater than the high threshold value, the IoT smart terminal starts the LORA communication mode through the remote communication switching module, and returns to step 2; In addition, the IoT smart terminal includes a LORA module, a 4G module and a remote communication switching module; the IoT smart terminal also includes a message processing module, a local communication transceiver module, an I / O module, a serial port module and an Ethernet port module. The serial port module and the Ethernet port module are both bidirectionally connected to the local communication transceiver module, and the local communication transceiver module is respectively bidirectionally connected to the remote communication switching module and the I / O module.
2. An IoT intelligent terminal system capable of actively adjusting the communication mode, characterized in that: The system adopts a method capable of actively adjusting the communication mode as described in claim 1, including an IoT smart terminal, a LORA module, and a 4G module are both bidirectionally connected to a remote communication switching module, at least two IoT smart terminals are provided, and the two IoT smart terminals required to communicate are bidirectionally connected through the LORA module or the 4G module, and automatic switching between the LORA module communication mode and the 4G module communication mode is achieved through the action of the remote communication switching module.
3. According to claim 2, the IoT intelligent terminal system capable of actively adjusting the communication mode is characterized in that: The two IoT smart terminals are respectively designated as smart terminal 1 (11) and smart terminal 2 (12). The smart terminal 1 (11) comprises a first LoRa module (111), a first 4G module (112) and a first remote communication switching module (113). The smart terminal 2 (12) comprises a second LoRa module (121), a second 4G module (122) and a second remote communication switching module (123). The first remote communication switching module (113) is connected to the smart terminal 2 (12) in sequence through the first LoRa module (111) and the second LoRa module (121), or the first remote communication switching module (113) is connected to the smart terminal 2 (12) in sequence through the first 4G module (112) and the second 4G module (122).
4. The IoT intelligent terminal system capable of actively adjusting the communication mode according to claim 3, characterized in that: The first LORA module (111) and the second LORA module (121) are connected to each other through communication to form a LORA channel, and the first 4G module (112) and the second 4G module (122) are connected to each other through communication to form a 4G channel.
5. The IoT intelligent terminal system capable of actively adjusting the communication mode according to claim 4, characterized in that: The LORA channel is the main communication channel, and the 4G channel is the backup channel.
6. The IoT intelligent terminal system capable of actively adjusting the communication mode according to claim 2, characterized in that: The remote communication switching module, the message processing module, and the local communication transceiver module are integrated on a CPU chip, and the CPU chip is arranged inside the Internet of Things intelligent terminal.
7. The IoT intelligent terminal system capable of actively adjusting the communication mode according to claim 6, characterized in that: The IoT intelligent terminal also includes DDR memory and EEPROM memory, the I / O module includes an I / O chip module, the serial port module includes a serial port chip, the network port module includes a network port chip, the LORA module includes a LORA chip, the 4G module includes a 4G chip, and the CPU chip is bidirectionally connected to the LORA chip, the 4G chip, the I / O chip module, the serial port chip, the network port chip, the DDR memory and the EEPROM memory respectively.
8. The IoT intelligent terminal system capable of actively adjusting the communication mode according to claim 7, characterized in that: The I / O chip module is composed of an I / O one chip, an I / O two chip, an I / O three chip, and an I / O four chip.
9. The IoT intelligent terminal system capable of actively adjusting the communication mode according to claim 7, characterized in that: The CPU chip is an ARM9 chip ARM926EJ, with a main frequency of 1.4 GHz, and runs a Linux operating system.
Citation Information
Patent Citations
Message multipath routing method, device and system and storage medium
CN116319530A
Internet of Things wireless system with signal strength detection function
CN117412316A