Data transmission device, method and equipment
By implementing a multiple query mechanism in the LoRa transceiver module, the reception of the confirmation packet is determined, and the problem of interruption of the transmission of data packets by the LoRa transceiver module is solved, and faster and lower power data transmission is achieved.
Patent Information
- Application Number
- CN202510129981.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-05
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-02-05
AI Technical Summary
In actual applications, the LoRa transceiver module sometimes stops sending data packets according to the preset configuration, resulting in interruption of data packet transmission.
By implementing a multiple query mechanism in the LoRa transceiver module, it is determined whether the first acknowledge message has been received, so that the connection request is sent to the wireless communication module immediately after confirming that the acknowledge message has been received, reducing the waiting time, reducing power consumption, and effectively preventing the transmission of data packets from being interrupted.
This solution reduces waiting time through multiple query mechanisms, reduces power consumption, speeds up the data transmission process, and effectively prevents interruption of data packets.
Smart Images

Figure CN119996532A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data communication, and in particular to a data transmission device, method and equipment. Background Art
[0002] As a low-power wide area network communication technology, Long Range Radio (LoRa) communication technology has been widely used in the field of Internet of Things in recent years. In the LoRa network, LoRa transceiver modules play a vital role. They are responsible for collecting data and sending this data to the wireless communication module. To ensure reliable data transmission, the LoRa transceiver module is usually pre-configured to send data packets to the wireless communication module according to specific rules.
[0003] However, in actual applications, we found that the LoRa transceiver module sometimes stops sending data messages according to the preset configuration, resulting in interruption of data message transmission. Summary of the invention
[0004] The present application provides a data transmission device, method and equipment, which can effectively prevent the interruption of sending data messages.
[0005] In a first aspect, a data transmission device is provided, comprising: a LoRa transceiver module and a wireless communication module,
[0006] The LoRa transceiver module is used to send a first data message to the wireless communication module;
[0007] The LoRa transceiver module is used to perform a first round of query of the first confirmation message to determine whether the first confirmation message is received, wherein the first confirmation message is used to indicate that the wireless communication module successfully receives the first data message;
[0008] The LoRa transceiver module is used to trigger the re-sending of the first data message to the wireless communication module when the first confirmation message is not received in the first round of query of the first confirmation message, and perform a second round of query of the first confirmation message to determine whether the first confirmation message is received; and send a first connection request to the wireless communication module when the first confirmation message is received in one of the queries in the first round of query of the first confirmation message;
[0009] The wireless communication module is used to perform spread spectrum modulation on the first data message based on the first connection request to obtain a first spread spectrum data message, determine a first transmission power based on the communication status between the wireless communication module and the network server, and send the first spread spectrum data message at the first transmission power.
[0010] In the above scheme, it is possible to query multiple times in each round of query whether the first confirmation message is received, so that after determining that the first confirmation message is received, the first connection request can be immediately sent to the wireless communication module, thereby reducing the waiting time, reducing power consumption, and speeding up the data transmission process. Multiple queries are implemented in the LoRa transceiver module, and even if the queries are frequently performed, it will not consume too much power. Moreover, when the LoRa transceiver module is ready to send data, the entire device is originally in a state of being awakened, and multiple wake-ups will not be required due to multiple queries, resulting in a large amount of power consumption. In addition, if the first confirmation message is not received in the first round of queries, it will trigger the resending of the first data message, and a second round of queries will be performed on the first confirmation message, thereby effectively preventing the interruption of the transmission of the data message.
[0011] In some possible designs, the time intervals between multiple queries in the first round of queries of the first confirmation message are the same, and the maximum number of queries in the first round of queries of the first confirmation message multiplied by the time interval is equal to the first value.
[0012] In some possible designs, the time intervals of multiple queries in the first round of queries of the first confirmation message are at least partially different, and the sum of the time intervals of the multiple queries is equal to a first value, wherein the time interval between two middle queries is smaller than the time interval between the first two queries and the time interval between the last two queries.
[0013] In some possible designs, the LoRa transceiver module is used to select a first target time interval combination from a time interval set, wherein the time interval combination includes multiple time interval combinations, and the sum of the time intervals of each time interval combination in the multiple time interval combinations is equal to a first value;
[0014] The LoRa transceiver module is used to perform a first round of query of the first confirmation message based on the first target time interval combination to determine whether the first confirmation message is received.
[0015] In some possible designs, the LoRa transceiver module is used to send a second data message to the wireless communication module;
[0016] The LoRa transceiver module is used to select a second target time interval combination from the time interval set when it is determined that the first target time interval combination is not suitable;
[0017] The LoRa transceiver module is used to perform a first round of query of a second confirmation message based on the second target time interval combination to determine whether the second confirmation message is received, wherein the second confirmation message is used to indicate that the wireless communication module successfully receives the second data message;
[0018] The LoRa transceiver module is used to trigger the re-sending of the second data message to the wireless communication module when the second confirmation message is not received in the first round of query of the second confirmation message, and perform a second round of query of the second confirmation message to determine whether the second confirmation message is received; and send a second connection request to the wireless communication module when the second confirmation message is received in one of the queries in the first round of query of the second confirmation message;
[0019] The wireless communication module is used to perform spread spectrum modulation on the second data message based on the second connection request to obtain a second spread spectrum data message, determine a second transmission power based on the communication status between the wireless communication module and the network server, and send the second spread spectrum data message at the second transmission power.
[0020] In the above scheme, since the LoRa transceiver module is mainly used in scenarios with long distances and complex communication environments, the communication environment may change from time to time, so the originally applicable time interval combination may not be applicable after the environment changes. Therefore, if the first target time interval combination used when sending the first data message is not suitable, the first target time interval combination can be changed to the second target time interval combination when sending the second data message, so as to adapt to the new environmental changes.
[0021] In some possible designs, the LoRa transceiver module is used to select a third target time interval combination from the time interval set when it is determined that the first target time interval combination is not suitable;
[0022] The LoRa transceiver module is used to perform a second round of query of the first confirmation message based on the third target time interval combination to determine whether the first confirmation message is received.
[0023] In the above scheme, if the first target time interval combination is used in the first round of querying the first confirmation message, if the communication environment changes dramatically, the second target time interval combination can also be used in the second round of querying the first confirmation message to adapt to the new environmental requirements.
[0024] In some possible designs, the LoRa transceiver module communicates with the wireless communication module via wired means.
[0025] In the above scheme, the LoRa transceiver module communicates with the wireless communication module in a wired manner, which can reduce power consumption and does not require a large amount of power when querying and confirming messages.
[0026] In some possible designs, the LoRa transceiver module is used to end the current message transmission when the number of repeated transmissions of the first data message is greater than a specified number of times.
[0027] In the above scheme, when the number of repeated transmissions of the first data message is greater than the specified number, the device enters the sleep state, which can protect the device and avoid power consumption.
[0028] In a second aspect, a data transmission method is provided, which is applied to a data transmission device, wherein the data transmission device includes a LoRa transceiver module and a wireless communication module, and the method includes:
[0029] Sending a first data message to the wireless communication module through the LoRa transceiver module;
[0030] Performing a first round of query of a first confirmation message through the LoRa transceiver module to determine whether the first confirmation message is received, wherein the first confirmation message is used to indicate that the wireless communication module successfully receives the first data message;
[0031] When the first confirmation message is not received in the first round of query of the first confirmation message by the LoRa transceiver module, triggering the re-sending of the first data message to the wireless communication module, and performing a second round of query of the first confirmation message to determine whether the first confirmation message is received; when the first confirmation message is received in one of the queries in the first round of query of the first confirmation message, sending a first connection request to the wireless communication module;
[0032] The first data message is spread spectrum modulated by the wireless communication module based on the first connection request to obtain a first spread spectrum data message, a first transmission power is determined based on the communication status between the wireless communication module and the network server, and the first spread spectrum data message is sent with the first transmission power.
[0033] In a third aspect, an electronic device is provided, comprising a data transmission device and a memory, wherein the data transmission device and the memory can communicate with each other, and the data transmission device is a device as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.
[0035] Figure 1 It is a structural schematic diagram of a data transmission device provided by the present application;
[0036] Figure 2It is a flowchart of a data transmission method provided by the present application;
[0037] Figure 3 It is a structural schematic diagram of a first spread spectrum data message provided by the present application;
[0038] Figure 4 It is a structural schematic diagram of a computing device provided by this application. DETAILED DESCRIPTION
[0039] The embodiments of the present invention are described below in conjunction with the accompanying drawings in the embodiments of the present invention. The terms used in the implementation mode of the present invention are only used to explain the specific embodiments of the present invention, and are not intended to limit the present invention.
[0040] See also Figure 1 , Figure 1 Schematic diagram of a data transmission device provided by this application. Figure 1 As shown, the data transmission device of the present application includes: a LoRa transceiver module 110 and a wireless communication module 120. The LoRa transceiver module 110 and the wireless communication module 120 can communicate with each other in a wired manner or in a wireless manner.
[0041] The LoRa transceiver module 110 may include a controller 111, a power manager 112, a sensor 113, a storage module 114, and a first interface module 115.
[0042] The controller 111 may be a microprocessor or a microcontroller unit (MCU), and may be a common LoRa transceiver chip. The controller executes control algorithms and logics, and coordinates the power manager 112, the sensor 113, the storage module 114, and the interface module 115 to work. Alternatively, the controller 111 may include one or more processor cores. In one implementation, the controller 111 may be a multi-core chip, that is, a chip containing multiple processing cores. In another implementation, the controller 111 may include one or more processor cores. For example, it may be a chip with one processing core.
[0043] The power manager 112 is responsible for managing the power supply of the system and providing operating current for the controller 111, sensor 113, storage module 114, interface module 115, etc. The power manager 112 can convert the input power (such as battery, AC power, etc.) into the voltage level required by different modules, and can also manage the battery, for example, battery charging control, power monitoring and low battery protection, etc. The power manager 112 can monitor the voltage, current and power parameters of the power supply in real time to ensure the stability and safety of the power supply. The power manager 112 can also reduce the power consumption of the system, extend the battery life or improve the power efficiency through energy-saving modes and power management strategies. The power manager 112 can also be a battery, which can be rechargeable or non-rechargeable.
[0044] The sensor 113 is used to sense and measure various parameters of the physical world and convert them into electrical signals, for example, to collect temperature, humidity, pressure, light, position, speed, etc. of the physical world. Therefore, the sensor can be a temperature sensor (such as a thermistor, a thermocouple), a humidity sensor (capacitive, resistive), a pressure sensor (strain, piezoelectric), a position sensor (potentiometer, photoelectric, inductive, magnetoresistive, capacitive), a speed sensor (photoelectric encoder, Hall effect speed sensor, Doppler radar speed sensor, vibration speed sensor), an optical sensor (photodiode, camera), etc.
[0045] The storage module 114 may be a non-volatile memory, such as a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The storage module 114 may also be a volatile memory, which may be a random access memory (RAM) used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0046] The first interface module 115 is used to realize the communication and connection between the LoRa transceiver module 110 and the wireless communication module 120. The first interface module 115 can be a serial communication interface, a parallel interface, a universal serial bus interface, a network interface, etc. Among them, the serial communication interface can include a universal asynchronous receiver and transmitter, a serial peripheral interface, etc. The network interface can include an Ethernet interface, a Wi-Fi module, a Bluetooth interface, etc.
[0047] The wireless communication module 120 may include a processor 121, a power module 122, a second interface module 123, an antenna module 124, and a storage module 125. Among them, the processor 121 may have a variety of specific implementation forms, for example, the processor 121 may be a microprocessor or a microcontroller unit (MCU), and the processor 121 may include a central processing unit (CPU), a microprocessor (MPU), a neural network processor (NPU), a tensor processing unit (TPU) or a data processor (DPU) and the like. The embodiment of the present application is not specifically limited. The processor 121 may also be a single-core processor or a multi-core processor. The processor 121 may be a combination of a CPU and a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The processing unit 410 can also be implemented using a logic device with built-in processing logic, such as an FPGA or a digital signal processor (DSP).
[0048] The power module 122 is responsible for managing the power supply of the system and providing operating current for the processor 121, the interface module 123, the antenna module 124, the storage module 125, etc. The power module 122 can convert the input power (such as battery, mains power, etc.) into the voltage level required by different modules, and can also manage the battery, for example, battery charging control, power monitoring and low battery protection, etc. The power module 122 can monitor the voltage, current, power and other parameters of the power supply in real time to ensure the stability and safety of the power supply. The power module 122 can also reduce the power consumption of the system, extend the battery life or improve the power efficiency through energy-saving mode and power management strategy. The power module 122 can also be a battery, which can be rechargeable or non-rechargeable.
[0049] The second interface module 123 is used to realize the communication and connection between the LoRa transceiver module 110 and the wireless communication module 120. The second interface module 123 can be a serial communication interface, a parallel interface, a universal serial bus interface, a network interface, etc. Among them, the serial communication interface can include a universal asynchronous receiver and transmitter, a serial peripheral interface, etc. The network interface can include an Ethernet interface, a Wi-Fi module, a Bluetooth interface, etc. It can be understood that when the first interface module 115 is a serial communication interface, the second interface module 123 can also be a serial communication interface; when the first interface module 115 is a parallel interface, the second interface module 123 can also be a parallel interface; when the first interface module 115 is a universal serial bus interface, the second interface module 123 can also be a universal serial bus interface; when the first interface module 115 is a network interface, the second interface module 123 can also be a network interface.
[0050] The antenna module 124 is an important component for sending and receiving radio signals. The antenna used by the antenna module 124 can be a dipole antenna, a monopole antenna, a loop antenna, a spiral antenna, a Yagi antenna, a rod antenna, a microstrip antenna, and a slot antenna. One or more combinations thereof. Since the environment in which LoRa is applied is usually complex, spread spectrum technology can be used for modulation. Since the signal modulated by spread spectrum technology can achieve reliable communication at a lower signal power, the power consumption of the transmitter is reduced, and the battery life of the terminal device is extended, the spread spectrum technology can make the signal propagate farther at a lower power level, which is very important for the Internet of Things applications that require long-distance communication and have requirements for power consumption. Spread spectrum technology can enable the signal to better penetrate buildings, obstacles, etc., and is suitable for various complex environments. Spread spectrum technology can make the signal spectrum distributed wider, has a strong resistance to narrowband interference, and can maintain good communication quality in a complex electromagnetic environment. Although a single signal occupies a wider spectrum, multiple signals with different spread spectrum codes can coexist in the same frequency band, thereby improving the utilization of the spectrum to a certain extent.
[0051] The storage module 125 may be a non-volatile memory, such as a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The storage module 125 may also be a volatile memory, which may be a random access memory (RAM) used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0052] It can be understood that the above-mentioned data transmission device is only used as a specific example. In actual applications, the data transmission device may also include more or fewer devices, which is not specifically limited here.
[0053] See also Figure 2 , Figure 2 is a flow chart of a data transmission method provided by this application. Figure 2 As shown, the data transmission method of the present application includes:
[0054] S101: The LoRa transceiver module 110 sends a first data message to the wireless communication module 120. Accordingly,
[0055] The first data message can be used to carry data collected by the sensor, such as environmental data, location data, energy data, industrial parameters, security data, agricultural data, water quality data, and logistics data, etc. Among them, environmental data may include temperature, humidity, light intensity, air pressure, wind speed, wind direction, etc. Location data may include geographic location information obtained through GPS or other positioning technologies. Energy data may include electricity, power, energy consumption, etc., which are commonly used in smart meter applications. Industrial parameters may include pressure, flow, liquid level, vibration, etc., which are used for industrial monitoring and control. Security data may include door and window switch status, smoke alarm status, intrusion detection information, etc. Agricultural data may include soil moisture, soil temperature, pH, crop growth status, etc. Water quality data may include water pH, turbidity, dissolved oxygen content, etc. Logistics data may include the location, status, vibration impact, etc. of goods.
[0056] It can be understood that, in addition to carrying the data collected by the sensor, the first data message can also be used to carry other data, which is not specifically limited here.
[0057] S102: The LoRa transceiver module 110 is used to perform a first round query of the first confirmation message to determine whether the first confirmation message is received.
[0058] The first confirmation message is a confirmation message sent by the wireless communication module 120 to indicate that the wireless communication module 120 has successfully received the first data message. If the wireless communication module 120 successfully receives the first data message, it will return the first confirmation message (Acknowledgment Packet, ACK) to the LoRa transceiver module 110. Optionally, if the wireless communication module 120 detects that the received first data message is erroneous, lost, or does not meet expectations, it will return a negative confirmation message (Negat ive Acknowledgment Packet, NACK) message to the wireless communication module 120.
[0059] The first round of query may include multiple queries. The number of queries and the time interval of the queries may be set as needed. For example, the number of queries may be 3, 4, 5 or even more. The time intervals of the queries may be the same, partially the same, or completely different.
[0060] In a possible implementation, the time intervals between multiple queries of the first round of queries for the first confirmation message are the same. For example, the maximum number of queries can be set to 15 times, and whether the first confirmation message is received can be queried every 10 milliseconds. Alternatively, the maximum number of queries can be set to 10 times, and whether the first confirmation message is received can be queried every 15 milliseconds. It can be understood that the values of the maximum number of queries and the time interval in the above examples are only specific examples. In actual applications, they can also be set to other values, which are not specifically limited here.
[0061] The maximum number of queries for the first round of queries of the first confirmation message multiplied by the time interval equals the first value. The size of the first value can be set as needed, for example, it can be 100 milliseconds, 150 milliseconds, 200 milliseconds, etc. In the above example, the maximum number of queries is 15 times, and the query time interval is 10 milliseconds, then the first value can be 150 milliseconds.
[0062] In the above manner, since a query is performed every 10 milliseconds, once the first confirmation message is received, the sending of the next data message can be arranged immediately.
[0063] In a possible implementation, the time intervals of multiple queries in the first round of queries of the first confirmation message are at least partially different. That is, the time intervals of multiple queries in the first round of queries of the first confirmation message may be partially the same or completely different. The sum of the time intervals of multiple queries in the first round of queries is equal to the first value. The size of the first value can be set as needed, for example, it can be 100 milliseconds, 150 milliseconds, 200 milliseconds, etc. In the following embodiments, the first value of 150 milliseconds is used as an example for explanation.
[0064] For example, the time interval from sending the first data message to the first query is 10 milliseconds, the time interval from the first query to the second query is 10 milliseconds, the time interval from the second query to the third query is 20 milliseconds, the time interval from the third query to the fourth query is 20 milliseconds, the time interval from the fourth query to the fifth query is 30 milliseconds, the time interval from the fifth query to the sixth query is 30 milliseconds, and the time interval from the sixth query to the seventh query is 30 milliseconds. Here, the sum of the time intervals of the 7 queries is equal to 10 milliseconds + 10 milliseconds + 20 milliseconds + 20 milliseconds + 30 milliseconds + 30 milliseconds = 150 milliseconds.
[0065] It is possible that the time interval between the two queries in the middle is less than the time interval between the two queries at the beginning and the time interval between the two queries at the end. Since the possibility of receiving the first confirmation message in the middle is relatively high, it is possible to query whether the first confirmation message is received more frequently in the middle. For example, the time interval from sending the first data message to the first query is 30 milliseconds, the time interval between the first query and the second query is 20 milliseconds, the time interval between the second query and the third query is 10 milliseconds, the time interval between the third query and the fourth query is 10 milliseconds, the time interval between the fourth query and the fifth query is 10 milliseconds, the time interval between the fifth query and the sixth query is 20 milliseconds, the time interval between the sixth query and the seventh query is 20 milliseconds, and the time interval between the seventh query and the eighth query is 30 milliseconds. Here, the sum of the time intervals of the 8 queries is equal to 30 milliseconds + 20 milliseconds + 10 milliseconds + 10 milliseconds + 10 milliseconds + 20 milliseconds + 20 milliseconds + 30 milliseconds = 150 milliseconds.
[0066] In the first method, 15 queries may be required, while in the second method, only 7 or 8 queries may be required, which can effectively reduce the number of queries for the first confirmation message and reduce the power consumption of the data transmission device.
[0067] The method of at least partially different time intervals of multiple queries in the first round of queries of the first confirmation message can, on average, obtain the first confirmation message more quickly and timely compared to the method of evenly dividing the time intervals, because data transmission requires a certain amount of time. If the time interval of the first query is set too short, it is likely that in most cases, the first confirmation message is unlikely to be received; therefore, the time interval of the first query can be set to the length of time that the first confirmation message can be confirmed to be received in most cases, and the subsequent intermediate query time interval is shorter because it allows more frequent queries for the first confirmation message, thereby more timely confirmation of the receipt of the first confirmation message. In this way, in most cases, the first confirmation message can be confirmed to be received at most when the intermediate number of queries is reached. In some cases, if the first confirmation message has not been received, it is likely that there is a problem. At this time, it is no longer meaningful to frequently query the first confirmation message. Therefore, the subsequent time interval can be set longer to reduce power consumption.
[0068] In a possible implementation, the time intervals between multiple queries of the first round of queries of the first confirmation message are determined according to a time interval set. The time interval set includes multiple time interval combinations, and the sum of the time intervals of each time interval combination in the multiple time interval combinations is equal to the first value. The number of time intervals included in different time interval combinations may be the same or different. For example, the number of time intervals included in some time interval combinations may be 7, the number of time intervals included in some time interval combinations may be 8, the number of time intervals included in some time interval combinations may be 9, and so on. For example, the time interval set may include multiple time interval combinations including a first target time interval combination and a second target time interval combination, and so on. The first target time interval combination may be (30 milliseconds, 20 milliseconds, 10 milliseconds, 10 milliseconds, 10 milliseconds, 20 milliseconds, 20 milliseconds, 30 milliseconds), and the second target time interval combination may be (10 milliseconds, 10 milliseconds, 20 milliseconds, 20 milliseconds, 30 milliseconds, 30 milliseconds, 30 milliseconds). The LoRa transceiver module selects the first target time interval combination from the time interval set, and performs the first round of query of the first confirmation message based on the first target time interval combination to determine whether the first confirmation message is received.
[0069] In the above example, a suitable target time interval combination can be selected from the time interval set according to the communication state to adapt to different communication environments. This approach is also conducive to more timely confirmation of receipt of the first confirmation message in terms of probability, so as to increase the speed.
[0070] If the LoRa transceiver module does not receive the first confirmation message in the first round of queries of the first confirmation message, it returns to step S101. If the first confirmation message is received in one of the queries in the first round of queries of the first confirmation message, it goes to step S103.
[0071] S103: The LoRa transceiver module 110 sends a first connection request to the wireless communication module. Correspondingly, the wireless communication module receives the first connection request sent by the LoRa transceiver module 110.
[0072] The first connection request can be a message queuing telemetry transport (MQTT) connection request, which is a request initiated by the client to the server to establish a connection. In the MQTT protocol, if the wireless communication module wants to communicate with the network server, it must first send a connection request containing specific information to the network server. This request usually contains information such as the identification of the wireless communication module, the protocol version you want to use, the user name and password (if authentication is required), and the length of time to maintain the connection. After receiving the connection request, the network server will verify and process it according to the information in the request. If everything meets the requirements, the network server will accept the connection and establish a communication channel with the wireless communication module, so that the wireless communication module can publish and subscribe to topic messages. If the request does not meet the requirements, the network server may refuse the connection.
[0073] S104: The wireless communication module 120 performs spread spectrum modulation on the first data message based on the first connection request to obtain a first spread spectrum data message.
[0074] First, the wireless communication module 120 generates a specific spread spectrum code, which is usually a digital sequence with a specific rule. Then, each data bit of the first data message is multiplied by the spread spectrum code. In this multiplication process, the value of the data bit will be expanded according to the rule of the spread spectrum code. For example, if the data bit is "1" and a part of the spread spectrum code is "101", then after the multiplication operation, this data bit will be expanded to "101", and the above multiplication process is repeated for all data bits in the entire first data message, thereby expanding the first data message in the spectrum. Next, the expanded signal may be further processed, such as filtering, amplification and other operations, to optimize the quality and characteristics of the signal, thereby obtaining the first spread spectrum data message after spread spectrum modulation. The first spread spectrum data message has a wider distribution in the spectrum, thereby improving the anti-interference ability and confidentiality.
[0075] S105: The wireless communication module 120 determines a first transmission power based on the communication status between the wireless communication module and the network server.
[0076] The communication situation between the wireless communication module and the network server may include the distance between the wireless communication module and the network server, the current channel condition, the interference level in the network, etc. The specific process of the wireless communication module determining the first transmission power based on the communication situation between the wireless communication module and the network server includes: the wireless communication module continuously monitors the communication quality parameters between the wireless communication module and the network server. These parameters may include signal strength indication (RSSI), bit error rate (BER), signal-to-noise ratio (SNR), etc. If the monitored communication quality is good, such as high RSSI, low BER, and large SNR, it means that the current signal transmission is relatively stable and reliable. At this time, the wireless communication module may reduce the transmission power to save energy and reduce interference to other devices. On the contrary, if the communication quality is poor, such as low RSSI, high BER, and small SNR, the wireless communication module will determine that the transmission power needs to be increased to enhance the signal strength, improve the communication quality, and ensure the accurate transmission of data.
[0077] S106: The wireless communication module 120 sends a first spread spectrum data message to the network server at the first transmission power. Correspondingly, the network server receives the first spread spectrum data message sent by the wireless communication module 120 at the first transmission power.
[0078] like Figure 3 As shown, the first spread spectrum data message includes a preamble, an optional header, and a payload. Among them, the preamble is a sequence at the beginning of the first spread spectrum data message, which is used to synchronize the receiving end and notify the receiving end that data is about to be transmitted, thereby helping the demodulator of the receiving end to achieve frequency synchronization and symbol synchronization, so as to correctly demodulate subsequent data and allow the receiving end to have enough time to prepare to receive data, such as adjusting the gain. The length of the preamble is configurable and is usually set according to the actual application scenario and requirements. A longer preamble can improve the reliability of synchronization, but will increase the transmission time and power consumption of the message; a shorter preamble can reduce the transmission time and power consumption, but the reliability of synchronization may be reduced. The optional header contains some control and identification information about the message, such as: a data rate indication, an indication of whether the frame is encrypted, and an indication of the length of the frame.
[0079] In the above example, only the LoRa transceiver module sending the first data message to the wireless communication module is used as an example for explanation. When the LoRa transceiver module sends other data messages, such as the second data message, to the wireless communication module, the method of sending the first data message can be referred to. However, if the communication environment changes when sending the second data message, the first target time interval combination originally used is not suitable, it can be replaced with the second target time interval combination. Specifically, when the LoRa transceiver module determines that the first target time interval combination is not suitable, it selects the second target time interval combination from the time interval set; the LoRa transceiver module is used to perform a first round of query of the second confirmation message based on the second target time interval combination to determine whether the second confirmation message is received, wherein the second confirmation message is used to indicate that the wireless communication module successfully receives the second data message. If the LoRa transceiver module does not receive the second confirmation message in the first round of query of the second confirmation message, it triggers to resend the second data message to the wireless communication module, and performs a second round of query of the second confirmation message to determine whether the second confirmation message is received; if the second confirmation message is received in one of the queries in the first round of query of the second confirmation message, a second connection request is sent to the wireless communication module; the wireless communication module performs spread spectrum modulation on the second data message based on the second connection request to obtain a second spread spectrum data message, determines the second transmission power based on the communication situation between the wireless communication module and the network server, and sends the second spread spectrum data message at the second transmission power. The length of the load can vary according to the required setting, for example, it can be between a few bytes and hundreds of bytes, etc.
[0080] In the above example, only the first round of query by the LoRa transceiver module is used as an example for explanation. In fact, the LoRa transceiver module can also perform more rounds of queries, for example, the second round of queries. However, if the communication environment changes during the second round of queries, and the first target time interval combination originally used is not suitable, it can be replaced with the second target time interval combination. Specifically, when the LoRa transceiver module determines that the first target time interval combination is not suitable, it selects a third target time interval combination from the time interval set, and the LoRa transceiver module performs a second round of query of the first confirmation message based on the third target time interval combination to determine whether the first confirmation message is received.
[0081] See also Figure 4 , Figure 4 4 is a schematic diagram of a computing device provided by the present application. The computing device 400 includes: one or more processing units 410 , a communication interface 420 and a memory 430 .
[0082] The processing unit 410, the communication interface 420 and the memory 430 are interconnected via a bus 440. Optionally, the computing device 400 may also include an input / output interface 450, which is connected to an input / output device for receiving parameters set by a user, etc. The computing device 400 can be used to implement part or all of the functions of the device embodiment or system embodiment in the above-mentioned embodiment of the present application; the processing unit 410 can also be used to implement part or all of the operation steps of the method embodiment in the above-mentioned embodiment of the present application. For example, the specific implementation of the various operations performed by the computing device 400 can refer to the specific details in the above-mentioned embodiment, such as the processing unit 410 is used to perform part or all of the steps in the above-mentioned method embodiment or part or all of the operations in the above-mentioned method embodiment. For another example, in the embodiment of the present application, the computing device 400 can be used to implement part or all of the functions of one or more components in the above-mentioned device embodiment, and the communication interface 420 can be specifically used for the communication functions necessary to implement the functions of these devices and components, and the processing unit 410 can be specifically used for the processing functions necessary to implement the functions of these devices and components, etc.
[0083] Figure 4 The computing device 400 may include one or more processing units 410, and the multiple processing units 410 may provide processing capabilities in a coordinated manner in a parallel connection manner, a serial connection manner, a serial-parallel connection manner, or any connection manner, or the multiple processing units 410 may constitute a processor sequence or a processor array, or the multiple processing units 410 may be divided into a main processor and an auxiliary processor, or the multiple processing units 410 may have different architectures such as a heterogeneous computing architecture. In addition, Figure 4 The computing device 400 shown in the figure, and the related structural description and functional description are exemplary and non-limiting. In some exemplary embodiments, the computing device 400 may include Figure 4 More or fewer components may be shown, or some components may be combined or separated, or may have a different arrangement of components.
[0084] The processing unit 410 may have a variety of specific implementation forms. For example, the processing unit 410 may include a central processing unit (CPU), a graphics processing unit (GPU), a neural-network processing unit (NPU), a tensor processing unit (TPU) or a data processing unit (DPU), etc., and the embodiment of the present application does not specifically limit it. The processing unit 410 can also be a single-core processor or a multi-core processor. The processing unit 410 can be a combination of a CPU and a hardware chip. The above-mentioned hardware chip can be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The processing unit 410 may also be implemented by a logic device with built-in processing logic, such as an FPGA or a digital signal processor (DSP). The communication interface 420 may be a wired interface or a wireless interface for communicating with other modules or devices. The wired interface may be an Ethernet interface, a local interconnect network (LIN), etc., and the wireless interface may be a cellular network interface or a wireless local area network interface.
[0085] The memory 430 may be a non-volatile memory, such as a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The memory 430 may also be a volatile memory, which may be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous connection dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). The memory 430 may also be used to store program codes and data, so that the processing unit 410 calls the program codes stored in the memory 430 to execute some or all of the operation steps in the above method embodiment, or to execute the corresponding functions in the above device embodiment. Figure 4 Show more or fewer components, or have different component configurations.
[0086] The bus 440 may be a peripheral component interconnect express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The bus 440 may be divided into an address bus, a data bus, a control bus, etc. In addition to the data bus, the bus 440 may also include a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0087] The present application also provides a system, which includes multiple computing devices, and the structure of each computing device can refer to the structure of the computing device described above. The functions or operations that can be implemented by the system can refer to the specific implementation steps in the above method embodiment and / or the specific functions described in the above device embodiment, which will not be repeated here.
[0088] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one network site, computer, server or data center to another network site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or it can be a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (e.g., a DVD, etc.), or a semiconductor medium (e.g., a solid-state hard disk), etc. In the above embodiments, the description of each embodiment has different emphases. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
Claims
1. A data transmission device, characterized in that: include: LoRa transceiver module and wireless communication module, The LoRa transceiver module is used to send a first data message to the wireless communication module; The LoRa transceiver module is used to perform a first round of query of the first confirmation message to determine whether the first confirmation message is received, wherein the first confirmation message is used to indicate that the wireless communication module successfully receives the first data message; The LoRa transceiver module is used to trigger the re-sending of the first data message to the wireless communication module when the first confirmation message is not received in the first round of query of the first confirmation message, and perform a second round of query of the first confirmation message to determine whether the first confirmation message is received; and send a first connection request to the wireless communication module when the first confirmation message is received in one of the queries in the first round of query of the first confirmation message; The wireless communication module is used to perform spread spectrum modulation on the first data message based on the first connection request to obtain a first spread spectrum data message, determine a first transmission power based on the communication status between the wireless communication module and the network server, and send the first spread spectrum data message at the first transmission power.
2. The device according to claim 1, characterized in that The time intervals between multiple queries in the first round of queries of the first confirmation message are all the same, and the maximum number of queries in the first round of queries of the first confirmation message multiplied by the time interval equals the first value.
3. The device according to claim 1, characterized in that The time intervals of multiple queries in the first round of queries of the first confirmation message are at least partially different, and the sum of the time intervals of the multiple queries is equal to a first value, wherein the time interval between two middle queries is smaller than the time interval between the first two queries and the time interval between the last two queries.
4. The device according to claim 1, characterized in that The LoRa transceiver module is used to select a first target time interval combination from the time interval set, wherein the time interval combination includes multiple time interval combinations, and the sum of the time intervals of each time interval combination in the multiple time interval combinations is equal to the first value; The LoRa transceiver module is used to perform a first round of query of the first confirmation message based on the first target time interval combination to determine whether the first confirmation message is received.
5. The device according to claim 4, characterized in that The LoRa transceiver module is used to send a second data message to the wireless communication module; The LoRa transceiver module is used to select a second target time interval combination from the time interval set when it is determined that the first target time interval combination is not suitable; The LoRa transceiver module is used to perform a first round of query of a second confirmation message based on the second target time interval combination to determine whether the second confirmation message is received, wherein the second confirmation message is used to indicate that the wireless communication module successfully receives the second data message; The LoRa transceiver module is used to trigger the re-sending of the second data message to the wireless communication module when the second confirmation message is not received in the first round of query of the second confirmation message, and perform a second round of query of the second confirmation message to determine whether the second confirmation message is received; and send a second connection request to the wireless communication module when the second confirmation message is received in one of the queries in the first round of query of the second confirmation message; The wireless communication module is used to perform spread spectrum modulation on the second data message based on the second connection request to obtain a second spread spectrum data message, determine a second transmission power based on the communication status between the wireless communication module and the network server, and send the second spread spectrum data message at the second transmission power.
6. The device according to claim 4, characterized in that The LoRa transceiver module is used to select a third target time interval combination from the time interval set when it is determined that the first target time interval combination is not suitable; The LoRa transceiver module is used to perform a second round of query of the first confirmation message based on the third target time interval combination to determine whether the first confirmation message is received.
7. The device according to any one of claims 1 to 6, characterized in that The LoRa transceiver module communicates with the wireless communication module via wired mode.
8. The device according to any one of claims 1 to 6, characterized in that The LoRa transceiver module is used to end the current message transmission when the number of repeated transmissions of the first data message is greater than a specified number of times.
9. A data transmission method, characterized in that: Applied to a data transmission device, wherein the data transmission device includes a LoRa transceiver module and a wireless communication module, and the method includes: Sending a first data message to the wireless communication module through the LoRa transceiver module; Performing a first round of query of a first confirmation message through the LoRa transceiver module to determine whether the first confirmation message is received, wherein the first confirmation message is used to indicate that the wireless communication module successfully receives the first data message; When the first confirmation message is not received in the first round of query of the first confirmation message by the LoRa transceiver module, triggering the re-sending of the first data message to the wireless communication module, and performing a second round of query of the first confirmation message to determine whether the first confirmation message is received; when the first confirmation message is received in one of the queries in the first round of query of the first confirmation message, sending a first connection request to the wireless communication module; The first data message is spread spectrum modulated by the wireless communication module based on the first connection request to obtain a first spread spectrum data message, a first transmission power is determined based on the communication status between the wireless communication module and the network server, and the first spread spectrum data message is sent with the first transmission power.
10. An electronic device, characterized in that: It comprises a data transmission device and a memory, the data transmission device and the memory can communicate with each other, and the data transmission device is a device as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Data message transmission method and device, electronic equipment and computer storage medium
CN113992307A
Monorail transportation equipment control method and system based on Lora communication
CN117354747A
River water ecology wireless monitoring system
CN210863704U
Power control method and apparatus for wireless communication using spread spectrum
US20230319737A1