Campus intelligent monitoring system and method based on loRa and sensor data fusion
The campus intelligent monitoring system, which integrates LoRa and sensor data, dynamically manages data transmission queues and optimizes storage space, solves the data transmission stability and real-time issues of the campus monitoring system, and realizes the timely transmission of key data and efficient operation of the system.
Patent Information
- Application Number
- CN202511124853.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-08-12
AI Technical Summary
The existing campus monitoring system has deficiencies in the stability, real-timeness and reliability of data transmission, and it is difficult to meet the requirements of modern campuses for the efficiency, stability and accuracy of intelligent monitoring systems.
By integrating LoRa communication technology with sensor data, establishing a sensor distribution model, dynamically managing data transmission queues, and using machine learning models to predict priority values, storage space allocation is optimized to ensure that high-priority data is transmitted in a timely manner even in network congestion.
It improves data transmission efficiency, avoids network congestion and delays, ensures timely transmission of key data, and enhances the flexibility and responsiveness of the system, especially in security monitoring and environmental monitoring, enabling rapid response and avoiding safety hazards.
Smart Images

Figure CN120639716B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent monitoring technology, and in particular to a campus intelligent monitoring system and method based on the fusion of LoRa and sensor data. Background Art
[0002] With the continuous expansion of campus scale and the increasing complexity of facilities, the demand for monitoring campus environment, safety, equipment operation status, etc. is growing. Existing wireless communication technology has certain applications in campus monitoring, but it still has deficiencies in the stability, real-time nature and reliability of data transmission. Similar prior art includes a Chinese patent application with publication number CN108924174A, which proposes a campus environment monitoring method, terminal, platform, system and storage medium, including: monitoring whether an environmental detector sends a connection request; when a connection request sent by an environmental detector is detected, obtaining local classroom information and an identifier of the environmental detector; establishing a mapping relationship between the local classroom information and the identifier of the environmental detector; sending the mapping relationship data between the local classroom information and the identifier of the environmental detector to a preset campus environment monitoring platform, so that the preset campus environment monitoring platform can associate the environmental monitoring data with the corresponding classroom according to the mapping relationship data after obtaining the environmental monitoring data reported by all environmental detectors. This invention collects the environmental monitoring data reported by all environmental detectors through the campus environment monitoring platform and associates the environmental monitoring data with the classroom through the mapping relationship data, thereby achieving the purpose of monitoring the environmental conditions of each classroom on campus as a whole.
[0003] Similar prior art also includes Chinese patent application publication number CN109873859A, which proposes a campus area ambient air quality monitoring system and method based on ZigBee wireless sensor network and cloud platform technology. The system includes an ambient air quality information acquisition terminal, an embedded main control unit, and a human-computer interaction terminal. This invention utilizes a self-built computer-based cloud platform server, combined with a ZigBee wireless sensor network and sensor system to collect campus area ambient air quality information. The embedded main control unit and Wi-Fi wireless network communication establish communication between the human-computer interaction terminal and the monitoring station, enabling real-time monitoring of campus area ambient air quality. Multiple human-computer interaction terminals are available, allowing students and faculty to view campus area ambient air quality status anytime, anywhere, providing a visual campus area ambient air quality monitoring platform. Both patents address the data collection and monitoring information acquisition issues for campus monitoring. However, the field of campus intelligent monitoring suffers from issues such as poor data transmission reliability, irrational resource allocation, and low intelligence in data processing, making it difficult to meet the efficiency, stability, and accuracy requirements of modern campus intelligent monitoring systems. Summary of the Invention
[0004] This application provides a campus intelligent monitoring system and method based on the fusion of LoRa and sensor data, which is used to predict the transmission priority value in real time based on the predicted link performance and machine learning model, realize the dynamic management of the data transmission queue, and ensure that high-priority data can be transmitted in time even in the case of network congestion. The method includes:
[0005] Establish a sensing distribution model based on the campus map, environmental information, and the distribution locations of multiple sensor modules;
[0006] Periodically obtaining link performance of each sensor module, and obtaining a transmission priority value and a corresponding first transmission data volume of each sensor module according to the importance of the sensor data of each sensor module, the first buffer data volume, and the corresponding link performance;
[0007] Each sensor module sends corresponding sensor data to the gateway unit based on the corresponding transmission priority value and the first data transmission amount, and the gateway unit adds the sensor data to the corresponding transmission queue based on the transmission priority value;
[0008] Obtaining a predicted priority value through the real-time updated sensing distribution model, the data importance of each sensing module, the second buffer data volume, and the machine learning model, and dynamically allocating storage space for each sending queue based on the predicted priority value of each sensing module and the corresponding second buffer data volume;
[0009] The gateway unit forwards the sensor data in the sending queue to the monitoring unit based on the corresponding sending priority value, and the monitoring unit extracts and marks the monitoring information on the sensing distribution model.
[0010] As a preferred technical solution of the present invention, adding the sensor data to the corresponding sending queue based on the sending priority value includes:
[0011] After the gateway unit receives the sensor data sent by each sensor module, it adds the sensor data to the corresponding sending queue according to the sending priority value corresponding to each sensor data, and adds the sensor data corresponding to the sensor modules whose sending priority value is greater than the first threshold, less than or equal to the first threshold and greater than the second threshold, and less than or equal to the second threshold to the first queue, the second queue and the third queue respectively, wherein the sending queue includes the first queue, the second queue and the third queue.
[0012] As a preferred technical solution of the present invention, the acquisition of the transmission priority value and the corresponding first transmission data volume of each sensor module includes:
[0013] The link performance of each of the sensing modules is periodically obtained through the gateway unit, and the data importance, the first cached data volume and the link performance corresponding to each of the sensing modules are normalized and weighted to obtain the sending priority value, and the product of the data sending ratio corresponding to the sending priority value and the first cached data volume is used as the first data sending volume of the corresponding sensing module, wherein the weight of the link performance is greater than the weight of the data importance, and the weight of the data importance is greater than the weight of the first cached data volume, and the link performance includes signal strength and communication rate.
[0014] As a preferred technical solution of the present invention, dynamically allocating storage space for the corresponding sending queue of the sensor module includes:
[0015] By periodically collecting environmental information and meteorological information on campus and updating it into the sensing distribution model, the predicted link performance is obtained, and the second cache data volume, data importance and the predicted link performance corresponding to each sensing module are input into the machine learning model to obtain the predicted priority value of each sensing module in the future time period. The second data sending volume is calculated based on the predicted priority value of each sensing module and the corresponding second cache data volume. The sum of the second data sending volumes corresponding to the sensor modules of the same sending queue is calculated based on the predicted priority value of each sensing module and is used as the capacity of the corresponding sending queue, and storage space is allocated to the corresponding sending queue based on the capacity.
[0016] As an optimal technical solution of the present invention, a sensor module whose importance of sensor data is greater than a set level and whose corresponding first cache data volume is greater than a set number is used as the first module, and a second module whose corresponding sending priority value within the set range of the first module is less than the sending priority value of the first module and whose link performance data is the largest is used as the target module, and the sending priority value and data sending volume of the target module are calculated based on the importance of the sensor data corresponding to the first module, the first cache data volume and the link performance of the target module, and the sensor data of the first module is forwarded through the target module based on the sending priority value and the data sending volume.
[0017] As a preferred technical solution of the present invention, forwarding the sensor data in the sending queue to the monitoring unit includes:
[0018] The gateway unit forwards the sensor data according to the sending priority value of the sending queue corresponding to the sensor data, wherein the sending order of the sending queue is sorted from large to small according to the sending priority value of the corresponding sensor data, wherein, according to the sorting, the sensor data in the sending queue with a front sorting is sent, and then the sensor data of the sending queue with a back sorting is forwarded.
[0019] As a preferred technical solution of the present invention, the training of the machine learning model includes:
[0020] Historical environmental information and meteorological information are mapped into the sensing distribution model, and the position information of each sensing module relative to the gateway unit and the historical link performance information of each sensing module are obtained. The historical link performance information, historical cache data volume, data importance and corresponding historical priority value corresponding to each sensing module are used as sample data, and the sample data are normalized. Based on the normalized sample data, the machine learning model is trained through a machine learning algorithm.
[0021] As a preferred technical solution of the present invention, the sensor data at least includes water usage information, electricity usage information, ambient temperature, humidity and light information on campus, and also includes security monitoring information on campus.
[0022] The present invention provides a campus intelligent monitoring system based on LoRa and sensor data fusion, which is used to implement the above method. The system includes:
[0023] A modeling unit, configured to establish a sensing distribution model based on a campus map, environmental information, and the distribution locations of multiple sensor modules;
[0024] a calculation unit, configured to periodically obtain link performance of each sensing module, and obtain a transmission priority value and a corresponding first transmission data volume of each sensing module according to the importance of sensing data of each sensing module, the first buffered data volume, and the corresponding link performance;
[0025] a sensing unit, configured for each sensing module to send corresponding sensing data to the gateway unit based on the corresponding transmission priority value and the first data transmission amount;
[0026] a gateway unit, configured to add the sensor data to a corresponding transmission queue based on a transmission priority value;
[0027] an allocation unit, configured to obtain a predicted priority value by using the real-time updated sensing distribution model, the data importance of each sensing module, the second cache data volume, and a machine learning model, and dynamically allocate storage space to each sending queue based on the predicted priority value of each sensing module and the corresponding second cache data volume;
[0028] The gateway unit is further configured to forward the sensor data in the sending queue to the monitoring unit based on the corresponding sending priority value;
[0029] A monitoring unit is used to extract monitoring information based on the sensing data and mark it on the sensing distribution model.
[0030] The present invention provides a computer-readable storage medium having instructions stored thereon, and the above-mentioned method is implemented when the instructions are executed by a processor.
[0031] Effect
[0032] By combining LoRa communication and sensor data fusion, the present invention dynamically adjusts the transmission priority of sensor data based on sensor data and link performance in different areas of the campus. Each sensor module calculates a transmission priority value based on real-time link performance, data importance, and cached data volume, thereby implementing data priority scheduling. This allows critical data to be transmitted first when network load is high, avoiding data congestion and delays, and improving transmission efficiency. Dynamically adjusting the storage space of the transmission queue ensures that the capacity of each queue is properly allocated even when link performance fluctuates. Based on the predicted priority value and cached data volume of each sensor module, a machine learning model can intelligently predict future data transmission needs, thereby optimizing storage space allocation. This process enhances system flexibility, avoids data loss or transmission interruptions caused by insufficient or overloaded caches, and enables the system to promptly acquire and process important sensor information. For example, security monitoring information, such as fire alarms and water and electricity safety monitoring, can be transmitted in real time through the system, ensuring rapid response at critical moments and avoiding safety hazards caused by information delays. Furthermore, the queue management mechanism based on transmission priority values ensures that high-priority data can be transmitted promptly even in network congestion. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 Flowchart of a campus intelligent monitoring method based on LoRa and sensor data fusion in an embodiment;
[0035] Figure 2 This is a flow chart of the sensor data sending method of the first module in the real-time example;
[0036] Figure 3 A flowchart of a method for dynamically allocating storage space for a sensor module corresponding to a sending queue in an embodiment;
[0037] Figure 4 This is a structural diagram of the campus intelligent monitoring system based on the fusion of LoRa and sensor data in the embodiment. DETAILED DESCRIPTION
[0038] The embodiments of the present application provide a campus intelligent monitoring method and system based on the fusion of LoRa and sensor data. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or that are inherent to these processes, methods, products or devices.
[0039] For ease of understanding, the specific process of the embodiment of the present application is described below. Figure 1 As shown, an embodiment of the campus intelligent monitoring method based on LoRa and sensor data fusion of the present application includes:
[0040] Step S1: establishing a sensing distribution model based on a campus map, environmental information, and the distribution locations of multiple sensor modules;
[0041] Specifically, a sensing distribution model is constructed by combining the map, environmental data and distribution information of the sensor modules within the campus. The above map is the geographic information of the campus, and the above environmental information at least includes the distribution of vegetation, buildings and mobile objects on campus. The distribution model provides the location of the sensor module and related environmental information. In this sensing distribution model, the real-time monitoring data of each sensor module will be associated with its location, environmental conditions and meteorological information. With the above technical solution, the system can display the real-time data status of each area on campus in an intuitive manner, and lay the foundation for the subsequent prediction of real-time link performance. The sensing distribution model helps the system to perform efficient data management and scheduling in space, and improves the visualization and monitoring capabilities of the system.
[0042] Step S2: periodically obtaining the link performance of each sensor module, and obtaining a transmission priority value and a corresponding first transmission data volume of each sensor module according to the importance of the sensor data of each sensor module, the first buffer data volume, and the corresponding link performance;
[0043] Specifically, by periodically collecting link performance data (such as signal strength and communication rate) from each sensor module, and combining the data importance of each sensor module and the data volume of the cache area, i.e., the above-mentioned first cache data volume, the sending priority value of each module is calculated through weighted normalization. The higher the sending priority value, the higher the priority of the data, and the system will allocate more resources for data transmission accordingly. The above technical solution can dynamically adjust the sending priority of each sensor module according to the real-time link performance and data importance, ensuring that important data can be transmitted first, while effectively utilizing the system's bandwidth resources, so that the transmission of critical data can be guaranteed when the link performance fluctuates, and will not be interfered with by low-priority data.
[0044] Step S3: Each sensor module sends corresponding sensor data to the gateway unit based on the corresponding priority value and the first data transmission amount, and the gateway unit adds the sensor data to the corresponding transmission queue based on the transmission priority value;
[0045] Specifically, the sensing module sends the monitoring data to the gateway unit based on the calculated transmission priority value and the corresponding first transmission data volume. The gateway will add the data to different transmission queues based on the transmission priority value of each data. High-priority data is added to the high-priority queue first, thereby ensuring that important data is processed first. The above technical solution, through this priority queue management mechanism, can effectively schedule data transmission and ensure that high-priority data will not be delayed due to network congestion or the transmission of low-priority data. This helps to improve the real-time response capability of the system and ensure the timely transmission of critical data.
[0046] Step S4: obtaining a predicted priority value through the real-time updated sensing distribution model, the data importance of each sensing module, the second buffer data volume, and the machine learning model, and dynamically allocating storage space for each sending queue based on the predicted priority value of each sensing module and the corresponding second buffer data volume;
[0047] Specifically, the real-time updated sensing distribution model can predict the real-time predicted link performance. Based on the predicted link performance and the data importance of the sensing module, the second cache data volume, i.e., the current cache data volume and other information, and combined with the machine learning model, the future sending priority value is predicted. According to the predicted sending priority value and the second cache data volume, the system dynamically adjusts the capacity of each sending queue and allocates appropriate storage space to the sending queue corresponding to the sensing data with different sending priority values, thereby optimizing the data transmission efficiency of the sending queue. In the above technical solution, through the predictive ability of the machine learning model, the system can predict the future sending priority value and cache requirements of each module in advance, and dynamically adjust the allocation of storage space of the corresponding sending queue based on this information, which improves the flexibility and efficiency of data transmission and avoids data loss or transmission delay due to insufficient storage space.
[0048] Step S5: the gateway unit forwards the sensing data in the sending queue to the monitoring unit based on the corresponding sending priority value, and the monitoring unit extracts and marks the monitoring information in the sensing distribution model.
[0049] Specifically, the gateway unit forwards the sensor data in the sending queue to the monitoring unit according to the priority value of the sensor data in the sending queue. The monitoring unit extracts monitoring information based on this data and marks it into the sensing distribution model to display the current data and status in real time. In this way, the monitoring unit can obtain timely and accurate data and make a faster response.
[0050] Furthermore, obtaining the transmission priority value and the corresponding first transmission data volume of each sensor module includes:
[0051] The link performance of each of the sensing modules is periodically obtained through the gateway unit, and the data importance, the first cached data volume and the link performance corresponding to each of the sensing modules are normalized and weighted to obtain the sending priority value, and the product of the data sending ratio corresponding to the sending priority value and the first cached data volume is used as the first data sending volume of the corresponding sensing module, wherein the weight of the link performance is greater than the weight of the data importance, and the weight of the data importance is greater than the weight of the first cached data volume, and the link performance includes signal strength and communication rate.
[0052] Specifically, when LoRa is networked in the initial state, in order to ensure the accuracy of campus monitoring, the link performance of each of the LoRa communication-based sensor modules is in an ideal state. However, due to the presence of objects passing between the sensor module and the gateway unit, weather reasons or other interference, the corresponding sensor module communication link performance will deteriorate. When the sensor module packages the corresponding sensor data and sends it to the gateway unit, the signal strength, data sending time and the first cache data volume that the corresponding sensor module has not had time to send are added to the sensor data packet. After the gateway unit receives the sensor data packet, the signal strength is parsed, and the communication rate is calculated based on the sending time, receiving time and the data volume in the sensor data packet, that is, the ratio of the data volume to the difference between the receiving time and the sending time. The communication rate and signal strength are scored using the link performance scoring standard, and the score is used as the link performance, thereby quantifying the link performance. The importance level is also divided according to the importance of each of the sensor data, and the importance level is used as the importance of the sensor data. Since the link performance directly affects the priority of the sensor module, each The importance of sensor module data also affects its transmission priority. For example, critical monitoring data (such as water and electricity safety sensor data) may require a higher priority. The amount of cached data also affects priority, as sensor modules with full caches require priority processing to avoid data loss. Therefore, the link performance and the amount of first cached data are weighted to obtain a transmission priority value for each sensor module. Furthermore, a first data transmission amount for each sensor module is calculated based on the transmission priority value and the cached data amount. The first data transmission amount is calculated as the product of the data transmission ratio corresponding to the transmission priority value and the first cached data amount. Different transmission priority values correspond to different data transmission ratios, and a larger transmission priority value corresponds to a larger data transmission ratio. By dynamically calculating the transmission priority value and first data transmission amount for each sensor module, the above technical solution ensures that high-priority sensor modules can obtain more resources when the network load is high and upload important data in a timely manner. Low-priority sensor modules upload data when network conditions are better, avoiding network congestion and data loss. Dynamic adjustment of priority and transmission amount can maximize the utilization efficiency of network resources.
[0053] Further, adding the sensor data to a corresponding transmission queue based on the transmission priority value includes:
[0054] After the gateway unit receives the sensor data sent by each sensor module, it adds the sensor data to the corresponding sending queue according to the sending priority value corresponding to each sensor data, and adds the sensor data corresponding to the sensor modules whose sending priority value is greater than the first threshold, less than or equal to the first threshold and greater than the second threshold, and less than or equal to the second threshold to the first queue, the second queue and the third queue respectively, wherein the sending queue includes the first queue, the second queue and the third queue.
[0055] Specifically, the gateway unit manages the data transmission order by sending a priority value corresponding to each queue in the sending queue. The sending priority value reflects the urgency or importance of the data. The higher the sending priority value, the more important the data is and needs to be transmitted first. After receiving the data, the gateway unit allocates the sensor data to different queues according to the priority of the sensor data corresponding to the sensor module. Specifically, the three queues represent three different priority levels, wherein the priority of the first queue is greater than the priority of the second queue, and the priority of the second queue is greater than the priority of the third queue, and ensures that the sensor data with high priority is sent first. The above technical solution can process sensor data more efficiently, especially when the network load is high. High-priority data is quickly processed and transmitted, and low-priority data is sent at the appropriate time according to network conditions, thereby ensuring the real-time and stability of the system. This method effectively avoids high-priority sensor data from being squeezed out by low-priority data, ensuring the timeliness and accuracy of monitoring data, especially when it comes to important data such as safety and health, it can ensure that this information is transmitted and processed in a timely manner, improving the responsiveness and reliability of the campus monitoring system.
[0056] Furthermore, if Figure 2 As shown, the sensor module whose sensed data importance is greater than the set level and whose corresponding first cache data volume is greater than the set number is taken as the first module, and the second module whose corresponding sending priority value within the set range of the first module is less than the sending priority value of the first module and whose link performance data is the largest is taken as the target module, and the sending priority value and data sending volume of the target module are calculated based on the sensed data importance corresponding to the first module, the first cache data volume and the link performance of the target module, and the sensed data of the first module is forwarded through the target module based on the sending priority value and the data sending volume.
[0057] Specifically, priority transmission of data is achieved through a collaborative multi-module network. First, when the data importance of the sensor module exceeds the set value and its cached data volume reaches the set threshold, that is, the data of the above-mentioned sensor module is relatively important, and due to the poor link performance, the accumulated data volume is large. If it is not sent in time, important sensor data may be lost. Therefore, the sensor module is selected as the first module. The first cached data volume of the above-mentioned first module can be calculated by the gateway unit through the remaining cached data volume in the last sent sensor data packet, that is, the first cached data volume at the time of the above-mentioned sending, and the current first cached data volume is calculated by the time difference between the acquisition cycle of the above-mentioned first module and the current time from the above-mentioned sent sensor data packet, and the above-mentioned first module is determined by the above-mentioned gateway unit, wherein the above-mentioned first cached data volume is the current cached data volume of the above-mentioned second module. By sending a detection signal through the gateway unit and obtaining a return signal from the second module, the link performance of the second module can be further evaluated. If the link performance of the second module meets the set requirements and its sending priority is low, it will be used as the target module, that is, the link performance is good, but due to the corresponding sensor data packet The sensing module whose sensing data is less important and / or whose first buffered data volume is smaller is used as the target module, and a forwarding instruction signal is sent to the target module. Since the link performance between the first module and the gateway unit is poor due to interference or obstruction by objects, but the target module is closer to the first module, it is possible that the link performance between the two is better. Therefore, the target module establishes a data forwarding path with the first module through the forwarding instruction. The target module forwards the sensing data of the first module to the monitoring unit based on its link performance. This mechanism effectively optimizes the data transmission path, ensuring that when the network load is high, data can be forwarded through the appropriate module, thereby improving the real-time performance and stability of the system. The above technical solution enables the sensing module to use other modules to forward data when the link performance is not ideal or the buffered data volume is too large, and the sensing data is more important, thereby avoiding data loss or transmission delay. The link performance of the target module is greater than the set level requirement, ensuring that data can be forwarded through an efficient and stable path. By giving priority to forwarding data to modules with better link performance, the efficiency of data transmission can be improved when network resources are limited, ensuring that important data will not be delayed due to network congestion or insufficient resources. This method effectively improves the response speed and stability of the campus monitoring system, especially when facing the challenges of large-scale monitoring and complex environmental conditions, and can maintain the efficient operation of the system.
[0058] Furthermore, the storage space is dynamically allocated to the corresponding sending queue of the sensor module, such as Figure 3 Shown, including:
[0059] By periodically collecting environmental information and meteorological information on campus and updating it into the sensing distribution model, the predicted link performance is obtained, and the second cache data volume, data importance and the predicted link performance corresponding to each sensing module are input into the machine learning model to obtain the predicted priority value of each sensing module in the future time period. The second data sending volume is calculated based on the predicted priority value of each sensing module and the corresponding second cache data volume. The sum of the second data sending volumes corresponding to the sensor modules of the same sending queue is calculated based on the predicted priority value of each sensing module and is used as the capacity of the corresponding sending queue, and storage space is allocated to the corresponding sending queue based on the capacity.
[0060] Specifically, due to various environmental factors (such as obstruction by objects) and weather changes (strong winds or rainy and snowy weather) on campus, the link performance between the sensor module and the gateway unit may fluctuate. At this time, if the cache area is not dynamically adjusted according to the link performance, it may affect the real-time and accuracy of data transmission. Therefore, by periodically collecting environmental information and meteorological information on campus, wherein the above environmental information at least includes the object obstruction between the corresponding sensor module and the gateway unit, the moving speed of the object or the duration of other interference sources, and the above meteorological information includes weather change information and duration, and the above environmental information and the above meteorological information are updated to the above sensing distribution model to obtain the predicted link performance. Due to the optimization of the above sensing module The priority value is not only affected by the above-mentioned predicted link performance, but the sending priority value of the above-mentioned sensor module is also related to the corresponding second cache data volume. When the above-mentioned sensor module sends the sensor data packet to the above-mentioned gateway unit, the sensor data packet carries the remaining cache data volume and sending time of the above-mentioned sensor module, and calculates the data collection volume based on the ratio of the time difference between the last sending time and the next sending time of the above-mentioned sensor module, that is, the next sending cycle, and the data collection cycle, and takes the sum of the above-mentioned total data collection amount and the above-mentioned remaining cache data volume as the total data volume, that is, the above-mentioned second cache data. The above-mentioned second cache data volume, the importance of the corresponding sensor data of the above-mentioned sensor module and the above-mentioned predicted link performance are input into the above-mentioned machine learning model. The above-mentioned sensing distribution model is a historical cycle. The prediction model trained with environmental information, historical meteorological information and corresponding historical link performance is used, and the above-mentioned predicted link performance, the above-mentioned second cache data volume and the above-mentioned sensor data importance are normalized and weighted to obtain the above-mentioned predicted priority value in the future time period, wherein the above-mentioned future time period refers to the next sending cycle time period, and the weights of the above-mentioned predicted link performance, the above-mentioned second cache data volume and the above-mentioned sensor data importance are the same as the weight corresponding to each item in the sending priority value calculation process in the above-mentioned step S2, and the second data sending volume is also obtained through the predicted priority value and the second cache data volume corresponding to each of the above-mentioned sensor modules. For example: the second cache data volume of the sensor module whose predicted priority value is greater than the first threshold is taken as the above-mentioned second data sending volume, and the predicted priority value is taken as the second data sending volume. 80% of the second cached data volume of the sensor modules whose predicted priority value is less than or equal to the first threshold and greater than the second threshold is used as the corresponding second data sending volume, 50% of the second cached data volume of the sensor modules whose predicted priority value is less than or equal to the second threshold is used as the corresponding second data sending volume, the sum of the second data sending volumes of the sensor modules corresponding to each sending queue is calculated and used as the capacity of the corresponding sending queue, and space is allocated to each sending queue based on the above capacity. The above technical solution dynamically allocates space to sending queues of different priorities, wherein the larger the above predicted priority value is, the higher the priority of the corresponding sensor module is, thereby avoiding the situation where multiple sensor modules send corresponding sensor data to the above gateway unit due to the large amount of data.The limited buffer capacity can avoid problems such as overflow of the sending queue or data transmission delay, thereby improving the efficiency of data transmission and the stability of the monitoring system, while also avoiding the computational burden of allocating storage space in real time when the gateway unit receives sensor data.
[0061] Furthermore, forwarding the sensor data in the sending queue to the monitoring unit includes:
[0062] The gateway unit forwards the sensor data according to the sending priority value of the sending queue corresponding to the sensor data, wherein the multiple queues in the sending queue are sorted from large to small according to the sending priority value of the corresponding sensor data, wherein the sensor data in the queue with the highest sorting is sent first, and after the data in the queue with the highest sorting is sent, the sensor data in the queue with the lowest sorting is forwarded.
[0063] Specifically, since when the above-mentioned gateway unit receives the above-mentioned sensor data sent by each different sensor module, the sensor data corresponding to the above-mentioned sensor module is added to different above-mentioned sending queues according to the sending priority value, and the larger the sending priority value, the higher the corresponding priority, therefore, the multiple queues in the above-mentioned sending queue are sorted according to the sending priority value of the sensor data therein, wherein the above-mentioned sending queue includes a first queue, a second queue and a third queue. The gateway unit starts to forward from the queue with the highest sending priority value, that is, the above-mentioned first queue, to the monitoring unit, and ensures that after these data transmissions are completed, it starts to process the sensor data in the sending queues with lower sorting, that is, then forwards the sensor data in the above-mentioned second queue and third queue in turn. The above-mentioned technical solution can ensure that in the data transmission process of multiple queues, the most important data is transmitted first to avoid delays or loss of key data. This mechanism is particularly suitable for application scenarios that require real-time monitoring and processing, such as campus environmental monitoring, security monitoring, etc. In these scenarios, it is crucial to ensure the timely transmission of important data.
[0064] Furthermore, the training of the machine learning model includes:
[0065] Historical environmental information and meteorological information are mapped into the sensing distribution model, and the position information of each sensing module relative to the gateway unit and the historical link performance information of each sensing module are obtained. The historical link performance information, historical cache data volume, data importance and corresponding historical priority value corresponding to each sensing module are used as sample data, and the sample data are normalized. Based on the normalized sample data, the machine learning model is trained through a machine learning algorithm.
[0066] Specifically, by mapping historical environmental information and meteorological information into the sensing distribution model, historical link performance is obtained, and data such as the relative position, historical link performance, historical cached data volume and data importance of each sensor module are collected. These historical data will be used as sample data, and after normalization, they will be input into the machine learning model for training. The core of the training process is to combine the link performance, cached data volume and data importance of the sensor module with the priority value, and train the model through the machine learning algorithm so that the model can predict the sending priority value and future link performance of each sensor module according to different input conditions, thereby laying the foundation for the effective dynamic allocation of sending queue storage space.
[0067] Furthermore, the sensor data includes at least water usage information, electricity usage information, ambient temperature, humidity and light information on campus, and also includes security monitoring information on campus.
[0068] Specifically, the above-mentioned security monitoring information includes fire alarm, water and electricity safety, fire safety and student abnormal behavior information. The above-mentioned security monitoring information is alarm information. The above-mentioned security monitoring content is monitored, acquired and analyzed through the sensor module to obtain the analysis results, and the above-mentioned analysis results are used as the above-mentioned security monitoring information. The above-mentioned security monitoring content is mostly video, and the data volume is large and is not suitable for direct transmission through LoRa. Therefore, the above-mentioned security monitoring information is the analysis result after the corresponding sensor module analyzes the above-mentioned monitoring content. Through the above-mentioned technical solution, a variety of campus information can be collected.
[0069] The present invention also provides a campus intelligent monitoring system based on LoRa and sensor data fusion, which is used to implement the above method, such as Figure 4 As shown, the system includes:
[0070] A modeling unit, configured to establish a sensing distribution model based on a campus map, environmental information, and the distribution locations of multiple sensor modules;
[0071] a calculation unit, configured to periodically obtain link performance of each sensing module, and obtain a transmission priority value and a corresponding first transmission data volume of each sensing module according to the importance of sensing data of each sensing module, the first buffered data volume, and the corresponding link performance;
[0072] a sensing unit, configured for each sensing module to send corresponding sensing data to the gateway unit based on the corresponding transmission priority value and the first data transmission amount;
[0073] a gateway unit, configured to add the sensor data to a corresponding transmission queue based on a transmission priority value;
[0074] an allocation unit, configured to obtain a predicted priority value by using the real-time updated sensing distribution model, the data importance of each sensing module, the second cache data volume, and a machine learning model, and dynamically allocate storage space to each sending queue based on the predicted priority value of each sensing module and the corresponding second cache data volume;
[0075] The gateway unit is further configured to forward the sensor data in the sending queue to the monitoring unit based on the corresponding sending priority value;
[0076] A monitoring unit is used to extract monitoring information based on the sensing data and mark it on the sensing distribution model.
[0077] The present invention also provides a computer-readable storage medium having instructions stored thereon, and the above-mentioned method is implemented when the instructions are executed by a processor.
[0078] In summary, the present invention, by combining LoRa communication and sensor data fusion, can dynamically adjust the transmission priority value of sensor data based on sensor data and link performance in different areas of the campus. Each sensor module calculates a transmission priority value based on real-time link performance, data importance, and cached data volume, thereby implementing data priority scheduling. This allows critical data to be transmitted first when the network load is high, avoiding data transmission congestion and delays, and improving transmission efficiency. By dynamically adjusting the storage space of the transmission queue, the capacity of each queue can be reasonably allocated when the link performance changes. Based on the predicted priority value and cached data volume of each sensor module, the machine learning model can intelligently predict future data transmission needs, thereby optimizing storage space allocation. This process enhances the flexibility of the system and avoids data loss or transmission interruption caused by insufficient or overloaded cache. By updating the sensor distribution model and monitoring data in real time, the system can promptly obtain and process important sensor information. For example, security monitoring information such as fire alarms, water and electricity safety monitoring, and environmental data can be transmitted in real time through the system, ensuring rapid response at critical moments and avoiding safety hazards caused by information delays. In addition, the queue management mechanism based on the sending priority value ensures that high-priority data can be transmitted in a timely manner even in network congestion.
[0079] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0080] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program code.
[0081] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A campus intelligent monitoring method based on LoRa and sensor data fusion, characterized in that: The method comprises: Establish a sensing distribution model based on the campus map, environmental information, and the distribution locations of multiple sensor modules; Periodically obtaining link performance of each sensor module, and obtaining a transmission priority value and a corresponding first transmission data volume of each sensor module according to the importance of the sensor data of each sensor module, the first buffer data volume, and the corresponding link performance; Each sensor module sends corresponding sensor data to the gateway unit based on the corresponding transmission priority value and the first transmission data volume, and the gateway unit adds the sensor data to the corresponding transmission queue based on the transmission priority value; Obtaining a predicted priority value through the real-time updated sensing distribution model, the importance of the sensing data of each sensing module, the amount of second buffered data, and a machine learning model, and dynamically allocating storage space for each sending queue based on the predicted priority value of each sensing module and the corresponding amount of second buffered data; The gateway unit forwards the sensor data in the sending queue to the monitoring unit based on the corresponding sending priority value, and the monitoring unit extracts and marks the monitoring information on the sensing distribution model.
2. The method according to claim 1, characterized in that Adding the sensor data to a corresponding transmission queue based on the transmission priority value includes: After the gateway unit receives the sensor data sent by each sensor module, it adds the sensor data to the corresponding sending queue according to the sending priority value corresponding to each sensor data, and adds the sensor data corresponding to the sensor modules whose sending priority value is greater than the first threshold, less than or equal to the first threshold and greater than the second threshold, and less than or equal to the second threshold to the first queue, the second queue and the third queue respectively, wherein the sending queue includes the first queue, the second queue and the third queue.
3. The method according to claim 1, characterized in that Acquiring the transmission priority value and the corresponding first transmission data volume of each sensor module includes: The link performance of each of the sensing modules is periodically obtained through the gateway unit, and the importance of the sensing data corresponding to each of the sensing modules, the first cache data volume and the link performance are normalized and weighted to obtain the sending priority value, and the product of the data sending ratio corresponding to the sending priority value and the first cache data volume is used as the first sending data volume of the corresponding sensing module, wherein the weight of the link performance is greater than the weight of the sensing data importance, and the weight of the sensing data importance is greater than the weight of the first cache data volume, and the link performance includes signal strength and communication rate.
4. The method according to claim 1, wherein Dynamically allocating storage space for the corresponding sending queue of the sensor module, including: By periodically collecting environmental information and meteorological information on campus and updating it into the sensing distribution model, the second cache data volume, sensor data importance and the sensing distribution model corresponding to each sensing module are input into the machine learning model to obtain the predicted priority value of each sensing module in the future time period, and the second data sending volume is calculated based on the predicted priority value of each sensing module and the corresponding second cache data volume. The sum of the second data sending volumes corresponding to the sensor modules of the same sending queue is calculated based on the predicted priority value of each sensing module and used as the capacity of the corresponding sending queue, and storage space is allocated to the corresponding sending queue based on the capacity.
5. The method according to claim 1, wherein The sensor module whose importance of sensor data is greater than the set level and whose corresponding first cache data volume is greater than the set number is taken as the first module, and the second module whose corresponding sending priority value within the set range of the first module is smaller than the sending priority value of the first module and whose link performance data is the largest is taken as the target module, and the sending priority value and the first sending data volume of the target module are calculated based on the importance of the sensor data corresponding to the first module, the first cache data volume and the link performance of the target module, and the sensor data of the first module is forwarded through the target module based on the sending priority value and the first sending data volume.
6. The method according to claim 1, characterized in that Forwarding the sensor data in the sending queue to the monitoring unit, comprising: The gateway unit forwards the sensor data according to the sending priority value of the sending queue corresponding to the sensor data, wherein the sending order of the sending queue is sorted from large to small according to the sending priority value of the corresponding sensor data, wherein, according to the sorting, the sensor data in the sending queue with a front sorting is sent, and then the sensor data of the sending queue with a back sorting is forwarded.
7. The method according to claim 1, characterized in that The training of the machine learning model includes: Historical environmental information and meteorological information are mapped into the sensing distribution model, and the position information of each sensing module relative to the gateway unit and the historical link performance information of each sensing module are obtained. The historical link performance information, historical cache data volume, sensing data importance and corresponding historical priority value corresponding to each sensing module are used as sample data, and the sample data are normalized. Based on the normalized sample data, the machine learning model is trained through a machine learning algorithm.
8. The method according to claim 1, characterized in that The sensor data includes at least water usage information, electricity usage information, ambient temperature, humidity and light information on campus, and also includes campus security monitoring information.
9. A campus intelligent monitoring system based on LoRa and sensor data fusion, used to implement the method according to any one of claims 1 to 8, characterized in that: The system comprises: An establishing unit, configured to establish a sensing distribution model based on a campus map, environmental information, and distribution locations of a plurality of sensor modules; a calculation unit, configured to periodically obtain link performance of each sensing module, and obtain a transmission priority value and a corresponding first transmission data volume of each sensing module according to the importance of sensing data of each sensing module, the first buffered data volume, and the corresponding link performance; a sensing unit, configured for each sensing module to send corresponding sensing data to the gateway unit based on the corresponding sending priority value and the first sending data amount; a gateway unit, configured to add the sensor data to a corresponding transmission queue based on a transmission priority value; an allocation unit, configured to obtain a predicted priority value by using the real-time updated sensing distribution model, the importance of the sensing data of each sensing module, the amount of second buffered data, and a machine learning model, and dynamically allocate storage space to each sending queue based on the predicted priority value of each sensing module and the corresponding amount of second buffered data; The gateway unit is further configured to forward the sensor data in the sending queue to the monitoring unit based on the corresponding sending priority value; A monitoring unit is used to extract and mark monitoring information on the sensing distribution model based on the sensing data.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Campus environment monitoring methods, platforms and system, terminals and storage medium
CN108924174A
A campus area environment air quality monitoring system and method
CN109873859A
Data packet transmission method and device, equipment and storage medium
CN114390006A
Internet-based data service system
CN119743496A