A method for monitoring data transmission and reception in sleep mode of LoRa module
By obtaining the data transmission and reception parameters in the sleep mode of the LoRa module and setting the exception handling mechanism, detecting and sending data, analyzing the data transmission and reception process to evaluate performance, the problem of low data transmission performance of the LoRa module is solved and the performance improvement is achieved.
Patent Information
- Application Number
- CN202411116572.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-08-14
AI Technical Summary
In the prior art, the LoRa module cannot perform timely and efficient data transmission and reception monitoring in sleep mode, resulting in low data transmission performance.
By obtaining the parameter data of the LoRa module data transmission and reception process in sleep mode and setting an exception handling mechanism, setting the module sleep instructions and module wake-up instructions, detecting data transmission tasks, sending data and monitoring reception conditions, analyzing the data transmission and reception process to evaluate performance.
The evaluation of the data transmission and reception performance of the LoRa module is achieved, the data transmission performance is improved, and the problem of low data transmission performance in the prior art is solved.
Smart Images

Figure CN119031402B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wireless communication in a low power consumption mode, and in particular to a method for monitoring data transmission and reception in a sleep mode of a LoRa module. Background Art
[0002] With the expansion of the application field of the Internet of Things, the fields of smart cities, agriculture, industrial automation, environmental monitoring, etc. have developed rapidly. The LoRa module is a wireless communication module used in Internet of Things applications. It uses LoRa technology to achieve long-distance, low-power, and low-cost wireless communication. It is suitable for various Internet of Things applications, among which sleep mode is one of its important working modes. In sleep mode, the LoRa module will reduce power consumption as much as possible to extend battery life or save energy. Monitoring the LoRa module in sleep mode is crucial in Internet of Things applications. Monitoring the LoRa module can help evaluate its performance. By monitoring the parameters of data transmission, you can understand the performance of the module in different environments and optimize its performance.
[0003] In the prior art, the data transmission and reception control method of the LoRa module is implemented by partially waking up the main control chip. When the serial port detects that there is data to be sent in sleep mode, the main control chip only wakes up the LoRa antenna module to achieve ultra-low power consumption data transmission in sleep mode.
[0004] For example, a method for controlling the reception and transmission of data in sleep mode of a LoRa module in a patent application with publication number CN116963244A includes: the main control chip of the LoRa module obtains the power supply battery power data of the battery management chip at set intervals; a capacitor energy storage range threshold is set, and if the main control chip determines that the power supply battery power data is greater than or equal to the wake-up threshold, the main control chip controls the LoRa antenna module that wakes up the LoRa module to send the serial port data wirelessly; if the main control chip determines that the power supply battery power data is less than the wake-up threshold, the main control chip controls the energy storage capacitor to connect to the power supply, and then controls the LoRa antenna module that wakes up the LoRa module to send the serial port data wirelessly.
[0005] For example, the invention patent with announcement number: CN113347591B announces a LoRa gateway and control method, and a field engineering structure monitoring system, including: entering the initial working state, receiving the sampling control strategy issued by the Internet of Things platform through the wireless communication module; parsing the sample control strategy to obtain the sampling types and parameters, sampling cycles, and sampling data upload mechanisms of multiple LoRa node groups; configuring the sampling parameters of the LoRa node group according to the sampling type and parameters of each LoRa node group, monitoring the sampling cycle, powering off the wireless communication module, and the gateway entering a dormant state; according to whether the sampling task execution times of the LoRa node group that performs the static sampling task triggers the sampling data upload mechanism, if so, powering on the wireless communication module and uploading the monitoring data of the LoRa node group to the Internet of Things platform, if not, locally storing the monitoring data of the LoRa node group, and the gateway entering a dormant state, waiting to enter the next sampling cycle.
[0006] However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the present application found that the above technology has at least the following technical problems:
[0007] In the prior art, the main control chip controls the energy storage capacitor to access the power supply through an electronically controlled switch, and then controls the LoRa antenna module to wake up the LoRa module to send the serial port data wirelessly. When the serial port detects that there is data to be sent in sleep mode, the main control chip only wakes up the LoRa antenna module, and is unable to timely and effectively monitor the reception and transmission of the sleep mode data of the LoRa module, resulting in low data transmission performance. Summary of the invention
[0008] The embodiment of the present application solves the problem of low data transmission performance in the prior art by providing a method for monitoring data transmission and reception in sleep mode of a LoRa module, thereby improving the data transmission performance.
[0009] The embodiment of the present application provides a method for monitoring the data transmission and reception in the sleep mode of a LoRa module, comprising the following steps: S1, obtaining parameter data of the data transmission and reception process of the LoRa module in the sleep mode and setting an exception handling mechanism, wherein the parameter data includes a coding rate, a modulation bandwidth and a transmission power, and the exception handling mechanism is used to handle abnormal situations in the data transmission and reception process of the LoRa module in the sleep mode; S2, setting a module sleep instruction and a module wake-up instruction, and judging whether the LoRa module has a data transmission and reception task, if not, sending a module sleep instruction to the LoRa module, otherwise sending a module wake-up instruction to the LoRa module and executing S3, wherein the module sleep instruction is used to set the LoRa module to the sleep mode, and the module wake-up instruction is used to wake up the LoRa module from the sleep mode to the active state; S3, detecting whether the LoRa module has a data transmission and reception task According to the sending task, if it exists, the corresponding data to be sent and the corresponding data recipient information are obtained, and S4 is executed, otherwise the data receiving signal is monitored to receive the corresponding data and store it; S4, the data to be sent is sent to the corresponding data party according to the data recipient information, and the data reception situation is monitored, and the data transmission distance and data transmission time of the LoRa module are obtained during the data sending process; S5, it is determined whether the data sending and receiving task of the LoRa module is completed, if it is completed, a module sleep instruction is sent to the LoRa module, otherwise the signal strength monitoring is continued; S6, the data sending and receiving process of the LoRa module within the preset time period is analyzed, and the data sending and receiving performance of the LoRa module is evaluated according to the analysis results, the data sending and receiving performance includes communication reliability and communication real-time performance, and the transmission success evaluation data is used to evaluate the communication reliability of the LoRa module.
[0010] Furthermore, the specific steps for obtaining the parameter data are as follows: obtaining reference parameter data of the LoRa module according to the specification document of the LoRa module, the reference parameter data including a reference coding rate, a reference modulation bandwidth and a reference transmission power; adjusting the reference parameter data for the first time in combination with the data transmission conditions and reference data information of the LoRa module during data transmission and reception, and performing a parameter test on the data obtained by the first adjustment; fine-tuning the first adjusted data according to the result of the parameter test to obtain the parameter data, and the parameter test is used to test the data transmission situation, the fault generation situation and the performance change situation.
[0011] Furthermore, the specific setting method of the exception handling mechanism is as follows: the data sending and receiving process of the LoRa module is analyzed to obtain the influencing factors of the abnormal situation, and the influencing factors of the abnormal situation include communication failure factors, sensor failure factors and power supply failure factors; according to the obtained abnormal situation influencing factors, the corresponding judgment method is set and the processing results of the abnormal situation are recorded; the recorded processing results are analyzed and evaluated, and the exception handling mechanism is optimized and improved according to the evaluation results.
[0012] Furthermore, the specific sending process of the module wake-up instruction is as follows: connect the LoRa module to the corresponding data receiver and data sender through the serial port, and initialize the serial port by setting the serial port parameters; send a module wake-up instruction to the LoRa module through the serial port, and listen to the wake-up response instruction sent by the LoRa module, and listen to the data sending and receiving process of the LoRa module after the wake-up response instruction is successfully received, and the wake-up response instruction indicates that the LoRa module has entered the active state from the sleep mode; send a status query instruction to the LoRa module through the serial port, and listen to the status response instruction sent by the LoRa module, the status query instruction is used to query the status of the LoRa module, and the status response instruction is used to feedback the status of the LoRa module; analyze the received status response instruction, and perform fault inspection and fault repair on the data sending and receiving process of the LoRa module according to the analysis results.
[0013] Furthermore, the specific monitoring process of the signal strength is as follows: according to the specification document of the LoRa module, a signal strength query instruction is obtained, and the signal strength query instruction is used to query the RSSI value and SNR value of the LoRa module within a preset time period; a signal strength query instruction is periodically sent to the LoRa module, and signal strength data is obtained according to the corresponding results; and the signal strength query instruction is regularly tested according to the queried signal strength data to avoid instruction failure.
[0014] Furthermore, the specific evaluation method of the data transceiving performance is as follows: by analyzing the data transceiving process of the LoRa module within a preset time period, the corresponding data transmission reliability index and data transmission real-time index are obtained, and the data transmission reliability index is used to describe the reliability of the data transceiving process of the LoRa module, and the data transmission real-time index is used to describe the real-time degree of the data transceiving process of the LoRa module; according to the acquired data, the data transceiving performance of the LoRa module within the preset time period is analyzed, and the data transceiving performance index is obtained, and the data transceiving performance index is used to evaluate the data transceiving performance of the LoRa module within the preset time period.
[0015] Furthermore, the data transmission and reception performance index is calculated using the following formula:
[0016] Where, e represents a natural constant, h represents the number of the preset time period, h = 1, 2, ..., H, H is the total number of preset time periods, SW his the data transceiver performance index of the h-th preset time period, SKh is the data transmission reliability index of the h-th preset time period, SK0 is the threshold of the data transmission reliability index, α is the correction factor of the data transmission reliability index, STh is the data transmission real-time index of the h-th preset time period, ST0 is the threshold of the data transmission real-time index, β is the correction factor of the data transmission real-time index, W1 is the influence of the relative deviation of the data transmission reliability index on the data transceiver performance index, and W2 is the influence of the absolute deviation of the data transmission real-time index on the data transceiver performance index.
[0017] Furthermore, the method for obtaining the data transmission reliability index is as follows: the communication environment index is obtained by analyzing the data communication environment of the LoRa module within a preset time period, and the communication environment index is used to measure the degree of influence of obstacles on the LoRa module during data transmission and reception; the spreading factor and the corresponding communication environment index in the data transmission and reception process of the LoRa module within the preset time period are normalized, and the data transmission reliability degree of the LoRa module within the preset time period is analyzed according to the result of the normalization processing to obtain the corresponding data transmission reliability index.
[0018] Furthermore, the method for obtaining the data transmission real-time index is as follows: by analyzing the channel competition degree during the data transmission and reception process of the LoRa module within a preset time period, the channel competition index is obtained, and the channel competition index is used to measure the influence of the data transmission and reception task volume on the channel where the LoRa module sends data on the data transmission and reception process; the data transmission time of the LoRa module within the preset time period is obtained, and the data transmission real-time degree is analyzed in combination with the corresponding initial transmission time and the channel competition index to obtain the corresponding data transmission real-time index.
[0019] Furthermore, the data transmission real-time index is calculated using the following formula:
[0020]
[0021] In the formula, λ h is the channel competition index of the h-th preset time period, Th represents the data transmission time of the LoRa module in the h-th preset time period, represents the initial data transmission time of the LoRa module in the h-th preset time period, and ΔTh represents the transmission time reference deviation of the LoRa module in the h-th preset time period.
[0022] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0023] 1. By obtaining the parameter data of the data transmission and reception process of the LoRa module in sleep mode and setting the module sleep instruction and module wake-up instruction, the module sleep instruction is sent to the LoRa module when there is a data transmission and reception task, and the corresponding data to be sent and the corresponding data receiver information are obtained. Then, the data to be sent is sent to the corresponding data party according to the data receiver information, and the data reception situation is monitored at the same time. Finally, the data transmission and reception process of the LoRa module within the preset time period is analyzed, and the data transmission and reception performance of the LoRa module is evaluated according to the analysis results, thereby realizing the evaluation of the data transmission and reception performance, and then realizing the improvement of the data transmission performance, which effectively solves the problem of low data transmission performance in the prior art.
[0024] 2. The corresponding data transmission reliability index and data transmission real-time index are obtained by analyzing the data transmission and reception process of the LoRa module within the preset time period, and then the data transmission and reception performance of the LoRa module within the preset time period is analyzed according to the acquired data to obtain the data transmission and reception performance index. Finally, the data transmission and reception performance of the LoRa module within the preset time period is evaluated by the calculated data transmission and reception performance index, thereby realizing the numerical evaluation of the data transmission and reception performance of the LoRa module within the preset time period, and then realizing a more accurate evaluation of the data transmission and reception performance of the LoRa module.
[0025] 3. The channel competition index is obtained by analyzing the channel competition degree during the data transmission and reception process of the LoRa module within the preset time period, and then the data transmission time of the LoRa module within the preset time period is obtained. The corresponding initial transmission time and the channel competition index are combined to analyze the real-time degree of data transmission to obtain the corresponding data transmission real-time index. Finally, the data transmission real-time of the LoRa module within the preset time period is evaluated by the calculated data transmission real-time index, thereby realizing the numerical evaluation of the real-time data transmission of the LoRa module within the preset time period, and then realizing a more accurate evaluation of the real-time data transmission of the LoRa module. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A flow chart of a method for monitoring data transmission and reception in sleep mode of a LoRa module provided in an embodiment of the present application;
[0027] Figure 2 A diagram of the sending process of a module wake-up instruction provided in an embodiment of the present application;
[0028] Figure 3 A diagram of the signal strength monitoring process provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The embodiment of the present application solves the problem of low data transmission performance in the prior art by providing a data transmission and reception monitoring method for a LoRa module in sleep mode. The method obtains parameter data of the data transmission and reception process of the LoRa module in sleep mode and sets an exception handling mechanism, then sets a module sleep instruction and a module wake-up instruction, and determines whether the LoRa module has a data transmission and reception task. If not, a module sleep instruction is sent to the LoRa module, otherwise a module wake-up instruction is sent to the LoRa module. Then, it is detected whether the LoRa module has a data transmission task. If so, the corresponding data to be sent and the corresponding data recipient information are obtained. Otherwise, a data reception signal is monitored to receive the corresponding data and store it. The data to be sent is sent to the corresponding data party according to the data recipient information, and the data reception situation is monitored. At the same time, the data transmission distance and data transmission time of the LoRa module in the data transmission process are obtained, and then it is determined whether the data transmission and reception task of the LoRa module is completed. If it is completed, a module sleep instruction is sent to the LoRa module, otherwise the signal strength monitoring is continued. Finally, the data transmission and reception process of the LoRa module in a preset time period is analyzed, and the data transmission and reception performance of the LoRa module is evaluated according to the analysis result, thereby improving the data transmission performance.
[0030] The technical solution in the embodiment of the present application is to solve the above-mentioned problem of low data transmission performance, and the overall idea is as follows:
[0031] By obtaining the parameter data of the data receiving and sending process of the LoRa module in sleep mode and setting the exception handling mechanism, and then setting the module sleep command and module wake-up command, by detecting whether the LoRa module has a data sending task, the data is sent to the corresponding data party, and finally the data receiving and sending performance is evaluated by analyzing the data receiving and sending process, thereby improving the data transmission performance.
[0032] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0033] like Figure 1As shown, it is a flow chart of the sleep mode data receiving and sending monitoring method of the LoRa module provided in an embodiment of the present application, the method comprising the following steps: S1, obtaining parameter data of the data receiving and sending process of the LoRa module in the sleep mode and setting an exception handling mechanism, the parameter data including the coding rate, the modulation bandwidth and the transmission power, the exception handling mechanism is used to handle the abnormal situation of the data receiving and sending process of the LoRa module in the sleep mode; S2, setting the module sleep instruction and the module wake-up instruction, and judging whether the LoRa module has a data receiving and sending task, if not, sending the module sleep instruction to the LoRa module, otherwise sending the module wake-up instruction to the LoRa module and executing S3, the module sleep instruction is used to set the LoRa module to the sleep mode, and the module wake-up instruction is used to wake up the LoRa module from the sleep mode to the active state; S3, detecting whether the LoRa module has In the data sending task, if it exists, the corresponding data to be sent and the corresponding data recipient information are obtained, and S4 is executed, otherwise the data receiving signal is monitored to receive the corresponding data and store it; S4, the data to be sent is sent to the corresponding data party according to the data recipient information, and the data reception situation is monitored, and the data transmission distance and data transmission time of the LoRa module are obtained during the data sending process; S5, it is determined whether the data sending and receiving task of the LoRa module is completed. If it is completed, a module sleep instruction is sent to the LoRa module, otherwise the signal strength monitoring is continued; S6, the data sending and receiving process of the LoRa module within the preset time period is analyzed, and the data sending and receiving performance of the LoRa module is evaluated according to the analysis results. The data sending and receiving performance includes communication reliability and communication real-time performance. The transmission success evaluation data is used to evaluate the communication reliability of the LoRa module.
[0034] In this embodiment, the reference coding rate is used to determine the level of error correction coding. A higher coding rate provides better error correction capability, but will reduce the effective data transmission rate; the reference modulation bandwidth represents the bandwidth of the LoRa signal. A narrower bandwidth can improve the signal's anti-interference ability, but will reduce the data transmission rate and signal quality; the reference transmit power specifies the power level of the LoRa module's transmitted signal. The selection of transmit power affects the communication distance and energy consumption. Adjusting these parameters according to actual needs and environmental conditions achieves the best communication effect, and improves data transmission performance.
[0035] Furthermore, the specific steps for obtaining parameter data are as follows: obtain reference parameter data of the LoRa module according to the specification document of the LoRa module, the reference parameter data including reference coding rate, reference modulation bandwidth and reference transmission power; make a first adjustment to the reference parameter data in combination with the data transmission conditions and reference data information of the LoRa module during data transmission and reception, and perform parameter testing on the data obtained by the first adjustment; fine-tune the first adjusted data according to the result of the parameter test to obtain parameter data, and the parameter test is used to test data transmission conditions, fault conditions and performance changes.
[0036] In this embodiment, the LoRa module may encounter various fault conditions when used in conjunction with the sensor. The sensor itself may fail or be abnormal, resulting in abnormal sensor data. The working status and connection status of the sensor are checked to ensure that the sensor is operating normally. If the sensor failure cannot be repaired, the sensor needs to be replaced. Signal interference, excessive distance or module failure may cause communication interruption between the LoRa module and the sensor. The communication link needs to be checked to ensure that the connection between the modules is normal. The sensor or LoRa module may work abnormally due to unstable power supply or insufficient battery power. It is necessary to check whether the power supply is stable. Battery management technology or external power supply is used to ensure that the sensor and module have sufficient power supply. The communication protocol or data format between the sensor and the LoRa module does not match, resulting in the inability to transmit data normally. Appropriate configuration or protocol conversion is required. When designing and deploying the system, sufficient testing and verification are carried out to ensure the stability and compatibility of each component, thereby improving the reliability of data transmission.
[0037] Furthermore, the specific setting method of the exception handling mechanism is as follows: the data sending and receiving process of the LoRa module is analyzed to obtain the influencing factors of the abnormal situation, which include communication failure factors, sensor failure factors and power failure factors; the corresponding judgment method is set according to the obtained abnormal situation influencing factors and the processing results of the abnormal situation are recorded; the recorded processing results are analyzed and evaluated, and the exception handling mechanism is optimized and improved according to the evaluation results.
[0038] In this embodiment, the LoRa module is generally designed to be able to enter a low-power sleep state to save energy, and the wake-up instruction can effectively control the sleep and wake-up cycle of the module, thereby minimizing energy consumption and extending battery life; through the wake-up instruction, the working state of the LoRa module can be flexibly controlled according to actual needs, for example, the module is woken up at a specific time interval or when a specific event occurs, and data transmission or other tasks are performed to meet application requirements; in the LoRa network, the wake-up instruction can be used to manage the active state of the device. By waking up the device regularly, it can be ensured that the device is online and maintains connection with the network while avoiding excessive power consumption; the wake-up instruction can also be used to control data synchronization between LoRa devices. By waking up the device regularly and performing data transmission, it can be ensured that the data between devices is synchronized in time, thereby improving the real-time performance of data transmission of the LoRa module.
[0039] Further, such as Figure 2 As shown, it is a diagram of the sending process of the module wake-up instruction provided in an embodiment of the present application. The specific process of sending the module wake-up instruction is as follows: connect the LoRa module to the corresponding data receiver and data sender through the serial port, and initialize the serial port by setting the serial port parameters; send a module wake-up instruction to the LoRa module through the serial port, and listen to the wake-up response instruction sent by the LoRa module, and listen to the data sending and receiving process of the LoRa module after the wake-up response instruction is successfully received. The wake-up response instruction indicates that the LoRa module has entered the active state from the sleep mode; send a status query instruction to the LoRa module through the serial port, and listen to the status response instruction sent by the LoRa module. The status query instruction is used to query the status of the LoRa module, and the status response instruction is used to feedback the status of the LoRa module; analyze the received status response instruction, and perform fault inspection and fault repair on the data sending and receiving process of the LoRa module according to the analysis results.
[0040] In this embodiment, signal strength is very important for monitoring the wireless communication system of the LoRa module. The following is the necessity of signal strength monitoring: by monitoring the signal strength, the communication coverage and signal quality can be understood, which is helpful for network planning and optimization, ensuring the reasonable distribution of network coverage and the stability of signal quality; signal strength monitoring can be used to timely discover problems such as communication interruption, interference or equipment failure, help diagnose and eliminate faults, and improve the stability and reliability of the communication system; by monitoring the signal strength, the transmission power and working mode of the device can be dynamically adjusted to minimize energy consumption, extend battery life, and achieve power consumption optimization; monitoring the signal strength can help detect possible signal interference or eavesdropping, improve the security of the communication system, and prevent data leakage and information security risks; by monitoring the signal strength, a better user experience can be provided, such as providing prompts in areas with weak signals or switching to a stronger signal source, thereby improving the communication stability of the LoRa module.
[0041] Further, such as Figure 3 As shown, it is a signal strength monitoring process diagram provided by an embodiment of the present application, and the specific monitoring process of the signal strength is as follows: according to the specification file of the LoRa module, a signal strength query instruction is obtained, and the signal strength query instruction is used to query the RSSI value and SNR value of the LoRa module within a preset time period; a signal strength query instruction is periodically sent to the LoRa module, and signal strength data is obtained according to the corresponding results; the signal strength query instruction is regularly tested according to the queried signal strength data to avoid instruction failure.
[0042] In this embodiment, by evaluating the data transceiver performance, the performance of the system under different conditions can be understood, which helps to design and optimize the communication system and select appropriate communication protocols, hardware equipment and parameter configurations to improve the performance and reliability of the system; evaluating the data transceiver performance can provide an important reference for product development and improvement. Through actual testing and verification, problems and room for improvement can be discovered, product performance can be optimized, and competitiveness can be enhanced; evaluating the data transceiver performance can provide guidance for network planning and deployment. According to actual environmental conditions and equipment performance, the network coverage, node layout and parameter configuration can be reasonably planned to ensure the stability and coverage of the network; by monitoring the data transceiver performance, Timely discover communication failures or anomalies, help diagnose and eliminate faults, and improve the stability and reliability of the communication system; optimizing data transceiver performance can improve user experience, such as increasing data transmission rate, reducing transmission delay, enhancing signal coverage, etc., making users more satisfied and improving system utilization; by optimizing data transceiver performance, energy consumption can be reduced, device battery life can be extended, operating costs can be reduced, and the impact on the environment can be reduced to achieve energy conservation and environmental protection goals; evaluating data transceiver performance plays an important role in system design, product development, network planning, fault diagnosis, user experience optimization, energy conservation and environmental protection, and realizes more accurate monitoring of LoRa module signal strength.
[0043] Furthermore, a specific evaluation method for data transceiving performance is as follows: by analyzing the data transceiving process of the LoRa module within a preset time period, a corresponding data transmission reliability index and a data transmission real-time index are obtained. The data transmission reliability index is used to describe the reliability of the data transceiving process of the LoRa module, and the data transmission real-time index is used to describe the real-time degree of the data transceiving process of the LoRa module; the data transceiving performance of the LoRa module within a preset time period is analyzed according to the acquired data, and a data transceiving performance index is obtained. The data transceiving performance index is used to evaluate the data transceiving performance of the LoRa module within a preset time period.
[0044] In this embodiment, the data transmission distance, spreading factor and data communication environment determine the data transmission reliability index, and the channel contention index, data transmission time and transmission time deviation determine the data transmission real-time index, thereby realizing the numerical evaluation of data transmission and reception performance.
[0045] Furthermore, the data transceiver performance index may be calculated by the data loss and data transmission time during the data transceiver process, but a more accurate calculation may also be performed. The data transceiver performance index is calculated using the following formula: Where, e represents a natural constant, h represents the number of the preset time period, h = 1, 2, ..., H, H is the total number of preset time periods, SW his the data transceiver performance index of the h-th preset time period, SKh is the data transmission reliability index of the h-th preset time period, SK0 is the threshold of the data transmission reliability index, α is the correction factor of the data transmission reliability index, STh is the data transmission real-time index of the h-th preset time period, ST0 is the threshold of the data transmission real-time index, β is the correction factor of the data transmission real-time index, W1 is the influence of the relative deviation of the data transmission reliability index on the data transceiver performance index, and W2 is the influence of the absolute deviation of the data transmission real-time index on the data transceiver performance index.
[0046] In this embodiment, the data transmission reliability index may be calculated by the data transmission distance, but a more accurate calculation may also be performed. The data transmission reliability index is calculated using the following formula: In the formula, Y h is the data transmission distance of the hth preset time period, SF h is the spreading factor of the hth preset time period, δ h It is the data communication environment index of the hth preset time period, which realizes a more accurate evaluation of the data transceiver performance of the LoRa module in the preset time period.
[0047] Furthermore, a method for obtaining a data transmission reliability index is as follows: a communication environment index is obtained by analyzing the data communication environment of the LoRa module within a preset time period, and the communication environment index is used to measure the degree of influence of obstacles on the LoRa module during data transmission and reception; the obtained spreading factor and the corresponding communication environment index during the data transmission and reception process of the LoRa module within the preset time period are normalized, and the data transmission reliability degree of the LoRa module within the preset time period is analyzed according to the result of the normalization processing to obtain the corresponding data transmission reliability index.
[0048] In this embodiment, the degree of channel contention refers to the degree to which multiple devices or nodes compete for the same channel for data transmission in a communication system. The degree of channel contention directly affects the performance and efficiency of the communication system, and corresponding measures are taken according to the actual situation, such as optimizing the communication protocol, adjusting the data transmission frequency, and improving the collision detection and retransmission mechanism, so as to realize the digitization of the data transmission reliability of the LoRa module within a preset time period.
[0049] Furthermore, a method for obtaining a data transmission real-time index is as follows: a channel competition index is obtained by analyzing the degree of channel competition during the data transmission and reception process of the LoRa module within a preset time period, and the channel competition index is used to measure the degree of influence of the amount of data transmission and reception tasks on the channel where the LoRa module sends data on the data transmission and reception process; the data transmission time of the LoRa module within a preset time period is obtained, and the degree of data transmission real-time is analyzed in combination with the corresponding initial transmission time and the channel competition index to obtain the corresponding data transmission real-time index.
[0050] In this embodiment, real-time data transmission is crucial for the data transmission and reception of the LoRa module. The real-time performance of data transmission directly affects the response speed and processing capability of the system, thereby affecting the operating efficiency of the entire system. In response to the data transmission and reception requirements of the LoRa module, appropriate technologies and strategies are adopted to improve the real-time performance of data transmission, thereby realizing the digitization of the real-time performance of data transmission of the LoRa module.
[0051] Furthermore, the data transmission real-time index can be calculated by delay normalization, but a more accurate calculation can also be performed. The data transmission real-time index is calculated using the following formula:
[0052]
[0053] Where λh is the channel competition index of the h-th preset time period, Th represents the data transmission time of the LoRa module in the h-th preset time period, represents the initial data transmission time of the LoRa module in the h-th preset time period, and ΔTh represents the transmission time reference deviation of the LoRa module in the h-th preset time period.
[0054] In this embodiment, a more accurate evaluation of the real-time performance of LoRa module data transmission is achieved.
[0055] The technical solution in the above-mentioned embodiment of the present application has at least the following technical effects or advantages: relative to a method for controlling data transceiving in sleep mode of a LoRa module in the patent application with publication number: CN116963244A, the embodiment of the present application obtains the corresponding data transmission reliability index and data transmission real-time index by analyzing the data transceiving process of the LoRa module within a preset time period, and then analyzes the data transceiving performance of the LoRa module within the preset time period according to the acquired data to obtain the data transceiving performance index, and finally evaluates the data transceiving performance of the LoRa module within the preset time period through the calculated data transceiving performance index, thereby realizing the numerical evaluation of the data transceiving performance of the LoRa module within the preset time period, and then realizing a more accurate evaluation of the data transceiving performance of the LoRa module; Relative to a LoRa gateway and control method, and a field engineering structure monitoring system announced in the invention patent with announcement number: CN113347591B, the embodiment of the present application obtains a channel competition index by analyzing the degree of channel competition during the data transmission and reception process of the LoRa module within a preset time period, and then obtains the data transmission time of the LoRa module within the preset time period, and analyzes the real-time degree of data transmission in combination with the corresponding initial transmission time and the channel competition index to obtain the corresponding data transmission real-time index, and finally evaluates the data transmission real-time of the LoRa module within the preset time period through the calculated data transmission real-time index, thereby realizing a numerical evaluation of the data transmission real-time of the LoRa module within the preset time period, and then realizing a more accurate evaluation of the data transmission real-time of the LoRa module.
[0056] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0057] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0058] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0059] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0060] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0061] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for monitoring data transmission and reception in sleep mode of a LoRa module, characterized in that: The following steps are involved: S1, obtaining parameter data of the LoRa module data receiving and sending process in sleep mode and setting an exception handling mechanism, wherein the parameter data includes coding rate, modulation bandwidth and transmission power, and the exception handling mechanism is used to handle abnormal situations in the LoRa module data receiving and sending process in sleep mode; S2, set the module sleep instruction and module wake-up instruction, and determine whether the LoRa module has a data sending and receiving task. If not, send a module sleep instruction to the LoRa module, otherwise send a module wake-up instruction to the LoRa module and execute S3. The module sleep instruction is used to set the LoRa module to sleep mode, and the module wake-up instruction is used to wake up the LoRa module from sleep mode to active state; S3, detect whether the LoRa module has a data sending task. If so, obtain the corresponding data to be sent and the corresponding data recipient information, and execute S4, otherwise monitor the data receiving signal to receive the corresponding data and store it; S4, sending the data to be sent to the corresponding data party according to the data receiving party information, monitoring the data reception situation, and obtaining the data transmission distance and data transmission time of the LoRa module during the data transmission process; S5, judging whether the data sending and receiving task of the LoRa module is completed, if it is completed, sending a module sleep instruction to the LoRa module, otherwise continuing to monitor the signal strength; S6, analyzing the data transceiving process of the LoRa module within a preset time period, and evaluating the data transceiving performance of the LoRa module according to the analysis result, wherein the data transceiving performance includes communication reliability and communication real-time performance.
2. A sleep mode data receiving and transmitting monitoring method of a LoRa module according to claim 1, characterized in that, The specific steps for obtaining the parameter data are as follows: Obtain reference parameter data of the LoRa module according to the specification document of the LoRa module, wherein the reference parameter data includes a reference coding rate, a reference modulation bandwidth, and a reference transmission power; Combined with the data transmission conditions and reference data information of the LoRa module during data transmission and reception, the reference parameter data is adjusted for the first time, and parameter tests are performed on the data obtained by the first adjustment; The first adjusted data is fine-tuned to obtain parameter data according to the result of parameter test, wherein the parameter test is used to test data transmission, fault generation and performance change.
3. A sleep mode data receiving and transmitting monitoring method of a LoRa module according to claim 1, characterized in that, The specific setting method of the exception handling mechanism is as follows: The data transmission and reception process of the LoRa module is analyzed to obtain the influencing factors of abnormal situations, wherein the influencing factors of abnormal situations include communication failure factors, sensor failure factors and power supply failure factors; According to the obtained abnormal situation influencing factors, the corresponding judgment method is set and the processing results of the abnormal situation are recorded; Analyze and evaluate the recorded processing results, and optimize and improve the exception handling mechanism based on the evaluation results.
4. A sleep mode data receiving and transmitting monitoring method of a LoRa module according to claim 1, characterized in that, The specific sending process of the module wake-up instruction is as follows: Connect the LoRa module to the corresponding data receiver and data sender through the serial port, and initialize the serial port by setting the serial port parameters; Send a module wake-up command to the LoRa module through the serial port, and monitor the wake-up response command sent by the LoRa module. At the same time, monitor the data sending and receiving process of the LoRa module after the wake-up response command is successfully received. The wake-up response command indicates that the LoRa module has entered the active state from the sleep mode; Send a status query command to the LoRa module through the serial port, and listen to the status response command sent by the LoRa module. The status query command is used to query the status of the LoRa module, and the status response command is used to feedback the status of the LoRa module; The received status response instructions are analyzed, and the data transmission and reception process of the LoRa module is fault checked and repaired according to the analysis results.
5. A sleep mode data receiving and transmitting monitoring method of a LoRa module according to claim 1, characterized in that, The specific monitoring process of the signal strength is as follows: According to the specification file of the LoRa module, obtain a signal strength query instruction, wherein the signal strength query instruction is used to query the RSSI value and SNR value of the LoRa module within a preset time period; Periodically send signal strength query commands to the LoRa module and obtain signal strength data based on the corresponding results; The signal strength query command is regularly tested based on the queried signal strength data to avoid command failure.
6. A method for monitoring data transmission and reception in sleep mode of a LoRa module according to claim 1, characterized in that: The specific evaluation method of the data transmission and reception performance is as follows: By analyzing the data transmission and reception process of the LoRa module within a preset time period, the corresponding data transmission reliability index and data transmission real-time index are obtained. The data transmission reliability index is used to describe the reliability of the data transmission and reception process of the LoRa module, and the data transmission real-time index is used to describe the real-time degree of the data transmission and reception process of the LoRa module; The data transceiving performance of the LoRa module within the preset time period is analyzed according to the acquired data, and a data transceiving performance index is obtained, where the data transceiving performance index is used to evaluate the data transceiving performance of the LoRa module within the preset time period.
7. A method for monitoring data transmission and reception in sleep mode of a LoRa module according to claim 6, characterized in that: The data transmission and reception performance index is calculated using the following formula: , In the formula, represents a natural constant, Indicates the number of the preset time period, , is the total number of preset time periods, For the Data transmission and reception performance index for a preset time period, For the The data transmission reliability index for a preset time period, is the threshold of data transmission reliability index, is the correction factor of the data transmission reliability index, For the The data transmission real-time index for a preset time period, is the threshold of the data transmission real-time index, is the correction factor of the data transmission real-time index, is the influence of the relative deviation of the data transmission reliability index on the data transmission and reception performance index, It is the influence degree of absolute deviation of data transmission real-time index on data transmission and reception performance index.
8. A method for monitoring data transmission and reception in sleep mode of a LoRa module according to claim 7, characterized in that: The method for obtaining the data transmission reliability index is as follows: The communication environment index is obtained by analyzing the data communication environment of the LoRa module within a preset time period, and the communication environment index is used to measure the degree of influence of obstacles on the LoRa module during data transmission and reception; The spreading factor and the corresponding communication environment index obtained during the data transmission and reception process of the LoRa module within the preset time period are normalized, and the data transmission reliability degree of the LoRa module within the preset time period is analyzed according to the result of the normalization processing to obtain the corresponding data transmission reliability index.
9. A method for monitoring data transmission and reception in sleep mode of a LoRa module according to claim 7, characterized in that: The method for obtaining the data transmission real-time index is as follows: The channel competition index is obtained by analyzing the channel competition degree during the data transmission and reception process of the LoRa module within a preset time period. The channel competition index is used to measure the influence of the data transmission and reception task volume on the channel where the LoRa module sends data on the data transmission and reception process; The data transmission time of the LoRa module within the preset time period is obtained, and the real-time degree of data transmission is analyzed in combination with the corresponding initial transmission time and channel competition index to obtain the corresponding real-time data transmission index.
10. The method for monitoring data transmission and reception in sleep mode of a LoRa module according to claim 9, characterized in that: The data transmission real-time index is calculated using the following formula: , In the formula, For the The channel contention index for a preset time period, Indicates The data transmission time of the LoRa module in a preset time period, Indicates The initial data transmission time of the LoRa module in a preset time period, Indicates The transmission time reference deviation of the LoRa module in a preset time period.
Citation Information
Patent Citations
A LoRa gateway, control method, and field engineering structure monitoring system
CN113347591B
Sleep mode data transceiving control method of LoRa module
CN116963244A
LoRa high-capacity networking system communication parameter distribution method, system and equipment
CN116744463A
Intelligent equipment management and control system based on Internet of Things
CN118382068A