Lora sensor reporting conflict solving method
By using technical means such as time slice allocation and conflict detection in the LORA sensor, the problem of sensor reporting conflicts in the State Grid low-power sensor network is solved, ensuring that the sensor data can be uploaded smoothly.
Patent Information
- Application Number
- CN202510215647.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-30
AI Technical Summary
After the State Grid low-power sensor network is formed, due to the large number of sensors, multiple sensors report messages at the same time, resulting in the problem of the inability to upload sensor data.
The single packet message upload method, shard message upload method, time slice calculation method, time slice allocation method, time segment multi-channel access method, sensor polling method, link dynamic self-healing method, time synchronization time slot allocation method, conflict detection and dynamic backing method, and data fusion and redundancy filtering method are adopted to solve the problem of sensor reporting conflict through technical means such as time slice allocation and conflict detection.
When multiple sensors arrive at the same time, ensure that the first arrival sensor can be allocated to the time slice, and the messages from other sensors are discarded and processed until all sensors are allocated to the time slice, solving the problem that sensor data cannot be uploaded.
Smart Images

Figure CN120076052A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of solving the reporting conflicts of LoRa sensors. Specifically, it relates to a method for solving the reporting conflicts of LoRa sensors. Background Art
[0002] In recent years, with the advancement of the construction of smart grids, the application of Internet of Things technology in power systems has become increasingly widespread. Among them, the low-power wide-area network (LPWAN) has become an ideal choice for realizing sensor data collection and uploading due to its significant advantages such as low power consumption and long-distance transmission. For example, in the fields of intelligent meter reading, environmental monitoring, and equipment status monitoring, LPWAN technology can effectively reduce the energy consumption of sensor nodes, extend the battery life, and at the same time support long-distance data transmission, meeting the needs of the smart grid for the access of a large number of terminal devices;
[0003] The State Grid low-power network has advantages such as low power consumption and long transmission distance, and is suitable for uploading sensor data. As shown in the attached Figure 1 After the State Grid low-power sensors are networked, due to the large number of sensors, there is a problem that multiple sensors report messages at the same time, resulting in conflicts and the inability to upload sensor data. Summary of the Invention
[0004] In view of the problems in the related art, the present invention proposes a method for solving the reporting conflicts of LoRa sensors to overcome the above-mentioned technical problems existing in the existing related technologies.
[0005] To this end, the specific technical solution adopted by the present invention is as follows:
[0006] A method for solving the reporting conflicts of LoRa sensors includes a single-packet message uploading method, a fragmented message uploading method, a time slice calculation method, a time slice allocation method, a time division multiple access method, a sensor polling method, a link dynamic self-healing method, a time synchronization time slot allocation method, a conflict detection and dynamic backoff method, and a data fusion and redundancy filtering method. The single-packet message uploading method includes the following steps:
[0007] S101: The system starts;
[0008] S102: The gateway calculates the time slices according to the configured sensor types and quantities;
[0009] S103: After receiving the data reported by the sensor, allocate the corresponding time slices according to the sensor type and ID;
[0010] S104: When a conflict occurs, the system only allocates time slices to the first received sensor, and discards the others and waits for them to report data next time;
[0011] S105: After the sensor receives the allocated time slice, it enters the sleep state;
[0012] S106: The sensor waits for the end of the next sleep period to report data.
[0013] Furthermore, the method for uploading fragmented messages includes the following steps:
[0014] S201: The system starts;
[0015] S202: The gateway calculates the time slices according to the configured sensor types and quantities;
[0016] S203: After receiving the first fragment reported by the sensor, allocate the corresponding time slice according to the sensor type and ID;
[0017] S204: When a conflict occurs, the system only allocates time slices to the first received sensor, and discards the others and waits for them to report data next time;
[0018] S205: After the sensor receives the allocated time slice, it enters the sleep state;
[0019] S206: The sensor waits for the end of the next sleep period to report data.
[0020] Furthermore, the method for calculating time slices includes the following steps:
[0021] S301: According to the characteristics of uploading single-packet messages, the entire process of access, data packet uploading, and response receiving can be completed within 15 s. Therefore, allocate a 30-s time slice for splitting single-packet messages, and reserve half of the redundant time;
[0022] S302: For fragmented messages, according to the amount of data of the accessed sensors, assume that the smallest fragmented message needs to be divided into four packets for one report, and the largest fragmented message needs to be divided into seven packets for one upload;
[0023] S303: The time slice required for each fragment refers to the single-packet message, and the upload time slice for the entire packet = the number of fragments x 30 s.
[0024] Furthermore, the method for allocating time slices includes the following steps:
[0025] S401: Obtain the time slices required for each sensor to upload messages by the method for calculating time slices. The number of fragments required for the data on each sensor is obtained according to the sensor type, and these are used as the basic configuration data of the system;
[0026] S403: When a sensor data arrives, if there is a conflict, resolve the conflict with reference to the message conflict resolution logic. If not, calculate the time slot required for this sensor to upload, and then calculate the time slots of other sensors based on the quantity and type of other sensors in the system. Then, the next upload time point of the current sensor = current time + the time slot of this sensor + the time slots required for all other sensors.
[0027] Further, the time division multiple access method includes the following steps:
[0028] S501: Reasonably plan the time slots of each sensor according to the quantity of sensors in the network and the expected data transmission frequency, ensuring that each sensor has an exclusive time period for data upload;
[0029] S502: Ensure that all sensors can communicate according to the predetermined time slots, establish an accurate synchronization mechanism, and use the base station or central controller to send synchronization signals to keep all sensors in time agreement;
[0030] S503: As time goes by, the data volume of the sensors changes. Optimize resource allocation by dynamically adjusting the time slots to avoid the inefficiency caused by fixed time slots.
[0031] Further, the sensor polling method includes the following steps:
[0032] S601: Determine the polling order between the central controller and each sensor, and decide the priority according to the importance of the sensor or the size of the historical data volume;
[0033] S602: Set a reasonable polling interval according to the actual needs to ensure the timeliness of the data and avoid increasing the system burden due to overly frequent polling;
[0034] S603: During the polling process, if a certain sensor fails to respond, set up a retry mechanism for retry and record relevant logs for subsequent analysis.
[0035] Further, the link dynamic self-healing method includes the following steps:
[0036] S701: Use a link dynamic self-healing low-power wireless sensor network system;
[0037] S702: Continuously monitor the network status through the built-in monitoring module. Once a link quality degradation or conflict is detected, immediately start the adaptive reconstruction program;
[0038] S703: Based on the real-time monitoring results, automatically adjust the network topology structure, change the routing path, and reallocate channels to maintain high-reliability data transmission.
[0039] Further, the time synchronization time slot allocation method includes the following steps:
[0040] S801: Achieve the time synchronization of all sensors through Beidou / GPS or Network Time Protocol (NTP);
[0041] S802: The master node (such as the edge gateway) divides time slots according to the number of sensors and service priorities. High-priority sensors are allocated fixed time slots, and low-priority ones adopt a random competition mechanism;
[0042] S802: Periodically broadcast the time slot table, and sensors send data only in the specified time slots.
[0043] Further, the collision detection and dynamic backoff method includes the following steps:
[0044] S901: Introduce Carrier Sense Multiple Access with Collision Avoidance (CSMA / CA) and dynamic backoff algorithms to optimize collision handling in the random competition scenario. Sensors listen to the channel before sending. If the channel is detected to be busy, the sending is delayed;
[0045] S902: Adopt an exponential backoff strategy, and the random waiting time doubles successively after a collision to reduce the probability of repeated collisions;
[0046] S903: Adjust the backoff window in combination with service priorities to ensure the fast retransmission of high-priority data.
[0047] Further, the data fusion and redundancy filtering method includes the following steps:
[0048] S1001: The edge computing node performs fusion processing on the collision data and filters redundant information;
[0049] S1002: Use weighted belief entropy to evaluate the credibility of collision data, eliminate outliers, and fuse multi-sensor data based on a statistical model (such as Kalman filtering) to improve data consistency;
[0050] S1003: Remove duplicates from the sensor data in the same area, only upload differentiated or key data, and use a compression algorithm (Payload encoding of LoraWAN) to reduce the data volume.
[0051] The beneficial effects of the present invention are:
[0052] In actual use of the present invention, when multiple sensors arrive at the same time, the gateway assigns a time slice to the sensor that arrives with the first shard, and directly discards the messages of other sensors without processing. After completing the time slice sharding of the first sensor, it waits for the next message conflict and performs another time slice allocation until all sensors are assigned time slices, thus solving the problem that after networking low-power sensors of the State Grid, due to the large number of sensors, message conflicts occur when multiple sensors report messages at the same time, resulting in the inability to upload sensor data. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0054] Figure 1 FIG. is a schematic diagram of data conflict in the prior art in a method for resolving reporting conflicts of lora sensors according to an embodiment of the present invention;
[0055] Figure 2 FIG. is a data flow diagram of a method for resolving reporting conflicts of lora sensors according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0057] According to an embodiment of the present invention, there is provided a method for resolving reporting conflicts of lora sensors, including a single-packet message upload method, a sharded message upload method, a time slice calculation method, a time slice allocation method, a time division multiple access method, a sensor polling method, a link dynamic self-healing method, a time synchronization time slot allocation method, a conflict detection and dynamic backoff method, and a data fusion and redundancy filtering method. The single-packet message upload method includes the following steps.
[0058] Embodiment 1:
[0059] As Figure 1-2 shown, in the method for resolving reporting conflicts of lora sensors according to an embodiment of the present invention, the single-packet message upload method includes the following steps:
[0060] S101: The system starts;
[0061] S102: The gateway calculates the time slices according to the configured sensor types and quantities.
[0062] S103: After receiving the data reported by the sensors, allocate the corresponding time slices according to the sensor types and IDs.
[0063] S104: When a conflict occurs, the system only allocates time slices to the first received sensor, and discards the others and waits for their next data reports.
[0064] S105: After receiving the allocated time slices, the sensors enter the sleep state.
[0065] S106: The sensors wait for the end of the next sleep period to report data.
[0066] Embodiment 2:
[0067] As Figure 1-2 shown, according to the method for resolving the reporting conflicts of lora sensors according to the embodiments of the present invention, the method for uploading fragmented messages includes the following steps:
[0068] S201: The system starts.
[0069] S202: The gateway calculates the time slices according to the configured sensor types and quantities.
[0070] S203: After receiving the first fragment reported by the sensors, allocate the corresponding time slices according to the sensor types and IDs.
[0071] S204: When a conflict occurs, the system only allocates time slices to the first received sensor, and discards the others and waits for their next data reports.
[0072] S205: After receiving the allocated time slices, the sensors enter the sleep state.
[0073] S206: The sensors wait for the end of the next sleep period to report data.
[0074] Embodiment 3:
[0075] As Figure 1-2 shown, according to the method for resolving the reporting conflicts of lora sensors according to the embodiments of the present invention, the method for calculating time slices includes the following steps:
[0076] S301: According to the characteristics of single-packet message uploading, the entire process of access, packet uploading, and response receiving can be completed within 15 s. Therefore, allocate a 30-s time slice for the segmented single-packet message, and reserve half of the redundant time.
[0077] S302: The sub-packaged messages. Assuming that the smallest sub-packaged message needs to be divided into four packets for one-time reporting according to the data volume of the access sensor, and the largest sub-packaged message needs to be divided into seven packets for one-time uploading.
[0078] S303: The time slots required for each sub-packet refer to the single-packet message. The uploading time slot of the entire packet = the number of sub-packets x 30s.
[0079] Example 4:
[0080] As Figure 1-2 shown, according to the lora sensor reporting conflict resolution method of the embodiment of the present invention, the time slot allocation method includes the following steps:
[0081] S401: Obtain the time slots required for each sensor to upload messages through the time slot calculation method. The number of sub-packets required for the data on each sensor is obtained according to the sensor type, and these are used as the basic configuration data of the system.
[0082] S403: When the data of a sensor arrives, if there is a conflict, refer to the message conflict resolution logic to resolve the conflict. If not, calculate the time slot required for this sensor to upload, and then calculate the time slots of other sensors according to the number and type of other sensors in the system. Then, the next upload time point of the current sensor = the current time + the time slot of this sensor + the time slots required for all other sensors.
[0083] When the data of other sensors arrives, the next upload time point of this sensor can be calculated according to the above method. The system sends the time difference from the current time to the next upload time point to the sensor, which is used as the sleep interval of the sensor, and thus the conflict-free data upload of the entire system can be completed. (Note that the LORA upload mode is to upload one by one in sequence, without the concept of concurrency).
[0084] Example 5:
[0085] As Figure 1-2 shown, according to the lora sensor reporting conflict resolution method of the embodiment of the present invention, the time division multiple access method includes the following steps:
[0086] S501: Reasonably plan the time slots of each sensor according to the number of sensors in the network and the expected data transmission frequency to ensure that each sensor has a dedicated time period for data upload.
[0087] S502: Ensure that all sensors can communicate according to the predetermined time slots, establish an accurate synchronization mechanism, and use the base station or central controller to send synchronization signals to make all sensors keep the time consistent.
[0088] S503: As time goes by, the amount of data from the sensors changes. By dynamically adjusting the time slots, resource allocation is optimized to avoid the inefficiency caused by fixed time slots.
[0089] Example Six:
[0090] As Figure 1-2 shown, for the lora sensor reporting conflict resolution method according to the embodiments of the present invention, the sensor polling method includes the following steps:
[0091] S601: Determine the polling order between the central controller and each sensor, and decide the priority according to the importance of the sensor or the size of the historical data volume;
[0092] S602: Set a reasonable polling interval according to actual needs to ensure the timeliness of data and avoid excessive polling from increasing the system burden;
[0093] S603: During the polling process, if a certain sensor fails to respond, set up a retry mechanism for retrying and record relevant logs for subsequent analysis.
[0094] Example Seven:
[0095] As Figure 1-2 shown, for the lora sensor reporting conflict resolution method according to the embodiments of the present invention, the link dynamic self-healing method includes the following steps:
[0096] S701: Use a link dynamic self-healing low-power wireless sensor network system;
[0097] S702: Continuously monitor the network status through the built-in monitoring module. Once a decrease in link quality or a conflict is detected, immediately start the adaptive reconstruction program;
[0098] S703: Based on the real-time monitoring results, automatically adjust the network topology, change the routing path, and reallocate channels to maintain highly reliable data transmission.
[0099] Example Eight:
[0100] As Figure 1-2 shown, for the lora sensor reporting conflict resolution method according to the embodiments of the present invention, the time synchronization time slot allocation method includes the following steps:
[0101] S801: Achieve time synchronization of all sensors through Beidou / GPS or Network Time Protocol (NTP);
[0102] S802: The master node (such as the edge gateway) divides time slots according to the number of sensors and service priorities. High-priority sensors are allocated fixed time slots, and low-priority ones adopt a random competition mechanism;
[0103] S802: Periodic broadcast time slot table. The sensor only sends data in the specified time slots.
[0104] Reduce the probability of collision and ensure the priority transmission of critical data.
[0105] Embodiment Nine:
[0106] As Figure 1-2 shown, for the lora sensor reporting conflict resolution method according to the embodiment of the present invention, the conflict detection and dynamic backoff method includes the following steps:
[0107] S901: Introduce Carrier Sense Multiple Access with Collision Avoidance (CSMA / CA) and dynamic backoff algorithm to optimize conflict handling in the random competition scenario. The sensor listens to the channel before sending. If the channel is detected to be busy, the sending is delayed.
[0108] S902: Adopt an exponential backoff strategy. The random waiting time after a collision doubles successively to reduce the probability of repeated collisions.
[0109] S903: Adjust the backoff window in combination with the service priority to ensure the rapid retransmission of high-priority data.
[0110] It can adaptively adjust the sending timing and reduce network congestion caused by collisions.
[0111] Embodiment Ten:
[0112] As Figure 1-2 shown, for the lora sensor reporting conflict resolution method according to the embodiment of the present invention, the data fusion and redundancy filtering method includes the following steps:
[0113] S1001: Perform fusion processing on the conflict data through the edge computing node and filter redundant information.
[0114] S1002: Use weighted belief entropy to evaluate the credibility of conflict data, eliminate outliers, and perform fusion on multi-sensor data based on a statistical model (such as Kalman filtering) to improve data consistency.
[0115] S1003: Remove duplicates from the sensor data in the same area and only upload differentiated or critical data. Adopt a compression algorithm (Payload encoding of LoraWAN) to reduce the data volume.
[0116] It can improve data reliability and reduce network load.
[0117] To facilitate the understanding of the above technical solutions of the present invention, the working principle or operation mode of the present invention in the actual process will be described in detail below.
[0118] In summary, the solution logic for message conflicts:
[0119] 1. Multiple sensors arrive at the same time.
[0120] 2. The gateway assigns a time slice to the first sensor that arrives with a shard. Messages from other sensors are directly discarded without processing, completing the time slice sharding for the first sensor.
[0121] 3. Wait for the next message conflict and perform another time slice assignment until all sensors are assigned a time slice.
[0122] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A solution to the conflict of reporting by lora sensors, characterized in that: The invention comprises a single-packet message uploading method, a fragmented message uploading method, a time slice calculation method, a time slice allocation method, a time division multiple access method, a sensor polling method, a link dynamic self-healing method, a time slot allocation method for time synchronization, a conflict detection and dynamic backoff method, and a data fusion and redundancy filtering method. The single-packet message uploading method comprises the following steps: S101: System startup; S102: The gateway calculates the time slice according to the configured sensor type and quantity; S103: after receiving the data reported by the sensor, a corresponding time slice is allocated according to the sensor type and ID; S104: When a conflict occurs, the system only allocates time slices to the first sensor that receives the data, and discards the others and waits for them to report data next time; S105: The sensor enters sleep mode after receiving the allocated time slice; S106: The sensor waits for the next sleep state to end and then reports data.
2. A method for resolving conflict reporting of lora sensors according to claim 1, characterized in that: The fragment message uploading method comprises the following steps: S201: System startup; S202: The gateway calculates the time slice according to the configured sensor type and quantity; S203: after receiving the first fragment reported by the sensor, a corresponding time slice is allocated according to the sensor type and ID; S204: When a conflict occurs, the system only allocates time slices to the first sensor that receives the data, and discards the others and waits for them to report data next time; S205: The sensor enters sleep mode after receiving the allocated time slice; S206: The sensor waits for the next sleep state to end and then reports data.
3. A method for resolving conflict reporting of lora sensors according to claim 2, characterized in that: The time slice calculation method comprises the following steps: S301: According to the characteristics of single-packet message upload, the entire process of access, data packet upload, and response reception can be completed within 15 seconds. Therefore, a 30-second time slice is allocated to the split single-packet message, and half of the redundant time is reserved. S302: Packetized messages, based on the amount of data from the connected sensor, assuming that the smallest packetized message needs to be reported in four packets at a time, and the largest packetized message needs to be uploaded in seven packets at a time; S303: The time slice required for each sub-packet refers to the single-packet message, and the upload time slice of the entire package = the number of sub-packets x 30s.
4. A method for resolving conflict reporting of lora sensors according to claim 3, characterized in that: The time slice allocation method comprises the following steps: S401: The time slice required for each sensor to upload a message is obtained by a time slice calculation method. The number of sub-packets required for the data on each sensor is obtained according to the sensor type. These are used as basic configuration data of the system. S403: When a sensor data arrives, if there is a conflict, refer to the message conflict resolution logic to resolve the conflict. If not, calculate the time slice required for this sensor to upload, and then calculate the time slices of other sensors based on the number and type of other sensors in the system. Then, the time point for the next upload of the current sensor = current time + time slice of this sensor + time slices required for all other sensors.
5. A method for resolving conflict reporting of lora sensors according to claim 4, characterized in that: The time division multiple access method comprises the following steps: S501: According to the number of sensors in the network and the expected data transmission frequency, the time slot of each sensor is reasonably planned to ensure that each sensor has a dedicated time period for data uploading; S502: Ensure that all sensors can communicate according to the predetermined time slot, establish an accurate synchronization mechanism, and use the base station or central controller to send synchronization signals so that all sensors maintain consistent time; S503: As time goes by, the amount of sensor data changes. The resource allocation is optimized by dynamically adjusting the time slots to avoid the inefficiency caused by fixed time slots.
6. A method for resolving conflict reporting of lora sensors according to claim 5, characterized in that: The sensor polling method comprises the following steps: S601: Determine the polling order between the central controller and each sensor, and determine the priority according to the importance of the sensor or the amount of historical data; S602: Set a reasonable polling interval according to actual needs to ensure the timeliness of data and avoid excessive polling that increases the system burden; S603: During the polling process, if a sensor fails to respond, a retry mechanism is set to retry and relevant logs are recorded for subsequent analysis.
7. A method for resolving conflict reporting of lora sensors according to claim 6, characterized in that: The link dynamic self-healing method comprises the following steps: S701: Low power wireless sensor network system using link dynamic self-healing; S702: Continuously monitor the network status through the built-in monitoring module, and once a link quality degradation or conflict is detected, immediately start the adaptive reconstruction program; S703: Based on the real-time monitoring results, the network topology is automatically adjusted to change the routing path and reallocate channels to maintain high-reliability data transmission.
8. A method for resolving conflict reporting of lora sensors according to claim 1, characterized in that: The time slot allocation method for time synchronization comprises the following steps: S801: Synchronize the time of all sensors in the network through Beidou / GPS or Network Time Protocol (NTP); S802: The master node (such as an edge gateway) divides the time slots according to the number of sensors and service priorities. High-priority sensors are assigned fixed time slots, and low-priority sensors use a random competition mechanism. S802: Periodically broadcast the time slot table. The sensor sends data only in the specified time slot.
9. A method for resolving conflict reporting of lora sensors according to claim 1, characterized in that: The conflict detection and dynamic backoff method comprises the following steps: S901: Introduce carrier sense (CSMA / CA) and dynamic backoff algorithm to optimize conflict handling in random contention scenarios. The sensor listens to the channel before sending, and delays sending if it detects that the channel is busy. S902: Use an exponential backoff strategy to double the random waiting time after a conflict to reduce the probability of repeated conflicts; S903: Adjust the backoff window in accordance with the service priority to ensure fast retransmission of high priority data.
10. A method for resolving conflict reporting of lora sensors according to claim 9, characterized in that: The data fusion and redundancy filtering method comprises the following steps: S1001: fusing conflicting data through edge computing nodes and filtering redundant information; S1002: Use weighted credibility entropy to evaluate the credibility of conflicting data, remove outliers, and fuse multi-sensor data based on statistical models (such as Kalman filtering) to improve data consistency; S1003: De-duplicate sensor data in the same area, upload only differentiated or key data, and use compression algorithm (LoraWAN Payload encoding) to reduce the amount of data.