Resource dynamic allocation method based on LoRa wireless communication, network server and storage medium
By monitoring and predicting the load of LoRa nodes in real time in the LoRa network and dynamically adjusting channel resources, it solves the problem of resource waste and shortage caused by static resource allocation and improves network performance.
Patent Information
- Application Number
- CN202410849302.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-09-06
AI Technical Summary
The existing LoRa network uses a static resource allocation method that can easily lead to resource waste or shortage when the network load changes.
The load of LoRa nodes is monitored in real time through the network server, and the decision tree algorithm is used for load prediction. The allocation strategy of channel resources is calculated based on the predicted data, and real-time adjustments are made, including adjustments to parameters such as modulation mode, signal frequency, and signal strength.
It effectively avoids the waste and shortage of channel resources, improves resource utilization, and improves the overall performance of the network.
Smart Images

Figure CN118612873A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wireless communications, and in particular to a resource dynamic allocation method based on LoRa wireless communications, a network server and a storage medium. Background Art
[0002] With the development of the Internet of Things, low-power wide area network (LPWAN) technology has played an increasingly important role in the field of wireless communications. Among them, LoRa (Long Range Radio) technology is widely used. LoRa is a low-power LAN wireless standard with the characteristics of long transmission distance, strong anti-interference ability, low power consumption, and on-demand networking. It has a wide range of applications in smart cities, agricultural monitoring, industrial automation and other fields.
[0003] In the process of LoRa network construction, with the access of a large number of wireless nodes, the self-organizing network needs to achieve wide-area coverage in a specified area under low power consumption conditions, which requires a reasonable resource allocation strategy to meet stable communication needs. At present, static resource allocation strategies are common. This method allocates available resources to each channel in advance. Although it is simple and intuitive, the network load is complex and changeable, and the channel requirements of different nodes are also different, which will lead to waste of channel resources or insufficient resources.
[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:
[0005] The existing LoRa network adopts a static resource allocation method, which easily leads to resource waste or resource shortage when the network load changes. Summary of the invention
[0006] The purpose of the present invention is to provide a resource dynamic allocation method based on LoRa wireless communication, a network server and a storage medium to solve the technical problem that the existing LoRa network in the prior art adopts a static resource allocation method, which easily leads to resource waste or insufficient resources when the network load changes. The preferred technical solutions among the many technical solutions provided by the present invention can produce many technical effects as described below.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] The present invention provides a method for dynamic resource allocation based on LoRa wireless communication, comprising the following steps:
[0009] The network server monitors the load of the LoRa node in real time and receives the real-time load data of each LoRa node through the LoRa gateway;
[0010] According to the load data, predict the load of each of the LoRa nodes based on a decision tree algorithm to obtain load prediction data;
[0011] Based on the load prediction data, an allocation strategy of LoRa channel resources is calculated according to the weights, and the allocation strategy is sent to each of the LoRa nodes;
[0012] According to the allocation strategy, the LoRa channel resources are adjusted in real time through each of the LoRa nodes.
[0013] Optionally, the real-time load data of each LoRa node received through the LoRa gateway includes: data sending frequency, field strength, communication success rate of each LoRa node, and signal strength and signal-to-noise ratio of each LoRa channel.
[0014] Optionally, predicting the load of each of the LoRa nodes based on the load data and based on a decision tree algorithm to obtain load prediction data comprises the following steps:
[0015] Establish a node load prediction model based on decision tree algorithm;
[0016] Extracting features from the load data to obtain load features; the load features are features that reflect the use of the LoRa channel resources; the load features include: historical load data, real-time monitoring load data, the number of LoRa nodes, signal strength, and communication success rate;
[0017] The load characteristics are input into the node load prediction model for prediction to obtain the load prediction data.
[0018] Optionally, the establishing of a node load prediction model based on a decision tree algorithm comprises the following steps:
[0019] Collecting factor data that affects the load change of the LoRa node through the LoRa gateway, preprocessing the factor data, and establishing a sample set and a test set;
[0020] Using the sample set to train a decision tree model to obtain an initial load prediction model;
[0021] The initial load prediction model is tested using the test set to obtain the node load prediction model.
[0022] Optionally, the method further includes: verifying the data purity of the sample set and the test set by information gain or Gini index; and evaluating the quality of the node load prediction model by cross-validation method.
[0023] Optionally, the allocation strategy of calculating LoRa channel resources according to weights based on the load prediction data includes the following steps: according to the load prediction data, establishing a network information table including a LoRa node working information table, a LoRa node field strength table, a LoRa gateway neighbor relationship table, a LoRa gateway working information table and a communication success rate statistics table; and calculating the allocation strategy according to the weights through the network information table.
[0024] Optionally, the real-time adjustment of the LoRa channel resources includes: adjusting the modulation mode, signal frequency, signal loan, spreading factor, preamble length, synchronization word, frame header mode, coding rate, low-speed optimization switch, IQ flip, LNA gain mode and transmission power of the LoRa channel.
[0025] Optionally, before the network server monitors the load of the LoRa node in real time and receives the real-time load data of each LoRa node through the LoRa gateway, initial resource allocation is required, including the following steps: allocating initial resources to each LoRa node based on historical data and initial settings.
[0026] A network server, comprising:
[0027] one or more processors;
[0028] A memory is used to store one or more computer programs, and one or more processors are used to execute one or more computer programs stored in the memory, so that one or more processors perform a resource dynamic allocation method based on LoRa wireless communication as described in any one of the above items.
[0029] A computer-readable storage medium having a computer program stored thereon. When the computer program is executed by the network server, the network server executes a resource dynamic allocation method based on LoRa wireless communication as described in any one of the above items.
[0030] Implementing one of the above technical solutions of the present invention has the following advantages or beneficial effects:
[0031] The present invention adopts a dynamic resource allocation method in the LoRa wireless communication process. The network server monitors the load of the LoRa node in real time, and can obtain the load situation of the LoRa node in real time. According to the load information collected by monitoring, a decision tree algorithm is used to predict the resource demand in the future. Then, according to the predicted information, the LoRa channel resources are dynamically adjusted to avoid insufficient resources in some channels and waste of resources in some channels, thereby improving the utilization rate of resources and further improving the overall performance of the network. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] 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. It is obvious that the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0033] Figure 1 It is a flow chart of a method for dynamic resource allocation based on LoRa wireless communication according to an embodiment of the present invention;
[0034] Figure 2 It is a flowchart of step S2 of a method for dynamic resource allocation based on LoRa wireless communication in an embodiment of the present invention;
[0035] Figure 3 It is a flowchart of step S21 of a method for dynamic resource allocation based on LoRa wireless communication in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of the present invention clearer, the various exemplary embodiments to be described below will refer to the corresponding drawings, which constitute a part of the exemplary embodiments, wherein various exemplary embodiments that may be used to implement the present invention are described. Unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation methods described in the following exemplary embodiments do not represent all implementation methods consistent with the present disclosure. It should be understood that they are only examples of processes, methods, devices, etc. that are consistent with some aspects of the present disclosure as detailed in the attached claims, and other embodiments may also be used, or the embodiments listed herein may be modified in structure and function without departing from the scope and essence of the present invention.
[0037] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", etc. indicate the orientation or positional relationship based on the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the elements referred to must have a specific orientation, be constructed and operated in a specific orientation. The terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. The term "multiple" means two or more. The terms "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, an integral connection, a mechanical connection, an electrical connection, a communication connection, a direct connection, an indirect connection through an intermediate medium, and can be the internal connection of two elements or the interaction relationship between two elements. The term "and / or" includes any and all combinations of one or more related listed items. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0038] In order to illustrate the technical solution of the present invention, a specific embodiment is used below for description, and only the parts related to the embodiment of the present invention are shown.
[0039] Embodiment 1:
[0040] like Figure 1 As shown, the present invention provides a resource dynamic allocation method based on LoRa wireless communication, comprising the following steps: S1, a network server monitors the load of a LoRa node in real time, and receives real-time load data of each LoRa node through a LoRa gateway; S2, based on the load data, predicting the load of each LoRa node based on a decision tree algorithm to obtain load prediction data; S3, based on the load prediction data, calculating the allocation strategy of LoRa channel resources according to the weight, and sending the allocation strategy to each LoRa node; S4, according to the allocation strategy, adjusting the LoRa channel resources in real time through the LoRa node.
[0041] This embodiment provides a resource dynamic allocation method based on LoRa wireless communication and is applied to the field of LoRa wireless communication. A dynamic resource allocation method is adopted in the LoRa wireless communication process. The load of the LoRa node is monitored in real time by a network server, and the load condition of the LoRa node can be obtained in real time. According to the load information collected by monitoring, a decision tree algorithm is used to predict the resource demand in the future. Then, according to the predicted information, the LoRa channel resources are dynamically adjusted to avoid insufficient resources in some channels and waste of resources in some channels, thereby improving resource utilization and improving the overall performance of the network.
[0042] The LoRa network structure of this embodiment adopts a star topology network structure. The center of the star structure is the LoRa gateway. A LoRa gateway is connected to multiple LoRa nodes (such as terminal devices, etc.), and the LoRa gateway can communicate with each LoRa node. The network server is responsible for managing these LoRa gateways and LoRa nodes. LoRa nodes are used to collect and send data, and the LoRa gateway is responsible for receiving data from LoRa nodes and forwarding it to the network server; the network server can manage the resource allocation of LoRa nodes based on this data information.
[0043] Next, combine Figure 1-3 The specific implementation steps of the resource dynamic allocation method based on LoRa wireless communication provided by this embodiment are introduced in detail:
[0044] First, execute step S1, the network server monitors the load of the LoRa node in real time, and receives the real-time load data of each LoRa node through the LoRa gateway. The network server monitors the load of each LoRa node in the network in real time, and the LoRa node packages these load conditions as load data and sends them to the LoRa gateway, which forwards them to the network server. The real-time load data of the LoRa node includes: the data transmission frequency, field strength, communication success rate of each LoRa node, and the signal strength and signal-to-noise ratio of each LoRa channel. Through real-time monitoring, the load changes and communication quality of each node in the network can be captured instantly, and then the number of LoRa gateways, LoRa channels and communication parameters can be timely adjusted in real time, thereby avoiding network congestion and data transmission delays, and improving communication efficiency and reliability.
[0045] As an optional implementation, before step S1, initial resource allocation is also required, which also includes the following steps: allocating initial resources to each LoRa node based on historical data and initial settings. Each LoRa node first communicates with the network according to the allocated initial resources to provide data support for subsequent prediction.
[0046] Secondly, execute step S2, predict the load of each LoRa node based on the load data and the decision tree algorithm to obtain load prediction data. The decision tree algorithm is used to predict the load situation in the future, providing a basis for the subsequent formulation of resource allocation strategies.
[0047] Specifically, step S2 includes the following steps: S21, establish a node load prediction model based on the decision tree algorithm; the decision tree algorithm is highly robust and can flexibly process different types of data, and can make reasonable and effective predictions for various types of load data. S22, extract features from the load data to obtain load features; load features are features that reflect the use of LoRa channel resources; optionally, load features include: historical load data, real-time monitoring load data, number of LoRa nodes, signal strength, and communication success rate. These load features have strong classification capabilities and can greatly affect the classification results and ensure prediction accuracy. S23, input the load features into the node load prediction model for prediction to obtain load prediction data. Load prediction helps the network adjust resource allocation in advance to avoid insufficient or excessive resources, thereby optimizing network performance and reducing communication delays.
[0048] As an optional implementation, step S21 includes the following steps: S211, collecting data on factors that affect the load change of LoRa nodes through the LoRa gateway, preprocessing the factor data, and establishing a sample set and a test set; the data purity of the sample set and the test set can be verified by information gain or Gini index; information gain represents the change in information transmission after dividing the sample set and the test set. The larger the information gain, the higher the data purity of the established sample set and test set, and the better the effect of training and testing the model; the Gini index is a measure of data impurity. The smaller the Gini index, the higher the data purity of the sample set and the test set, and the more suitable it is for training and testing the model. S212, using the sample set to train the decision tree model to obtain an initial load prediction model; S213, using the test set to test the initial load prediction model to obtain a node load prediction model. The trained model is likely to be unsatisfactory, so a test set is also needed to optimize the model, and the quality of the node load prediction model can be evaluated by cross-validation. By selecting features that are highly correlated with load, such as the number of nodes, signal strength, and communication success rate, and then using cross-validation to evaluate and optimize the initial load prediction model, the node load model can accurately predict future load trends and demands, thereby helping the system optimize resource allocation and improve network performance.
[0049] Next, execute step S3, calculate the allocation strategy of LoRa channel resources according to the weight based on the load prediction data, and send the allocation strategy to each LoRa node.
[0050] Specifically, step S3 includes the following steps: according to the load prediction data, a network information table including a LoRa node work information table, a LoRa node field strength table, a LoRa gateway neighbor relationship table, a LoRa gateway work information table and a communication success rate statistics table is established, and the allocation strategy is calculated according to the weight through the network information table. That is, the allocation strategy is calculated according to the degree of influence of each network information table on the LoRa channel. The greater the influence of the information, the greater the weight in the calculation process. The allocation strategy is sent to each LoRa node, and the LoRa node can dynamically allocate resources on each LoRa channel according to the allocation strategy.
[0051] Finally, in step S4, each LoRa node adjusts the LoRa channel resources in real time according to the allocation strategy.
[0052] Specifically, the LoRa channel resources are adjusted in real time, including: the modulation mode, signal frequency, signal loan, spreading factor, preamble length, synchronization word, frame header mode, coding rate, low-speed optimization switch, IQ flip, LNA gain mode and transmission power of the LoRa channel. By collecting the information reported by the LoRa node to the network server, the data cleaning and feature extraction of LoRa node working information, node field strength information, gateway neighbor relationship, gateway working information, communication success rate statistics, etc. are carried out, and then the load prediction is carried out. After analyzing the prediction results, the allocation strategies such as the scale allocation of LoRa gateways and LoRa nodes and the distribution of node communication parameters are formulated to achieve the optimal utilization of network resources. The dynamic resource allocation strategy can effectively improve the adaptability and flexibility of the network and avoid the resource waste and communication delay problems that may be caused by the static allocation strategy.
[0053] The embodiment is only a specific example and does not represent only one implementation mode of the present invention.
[0054] Embodiment 2:
[0055] The present invention also provides a network server, comprising one or more processors and a memory; wherein the memory is used to store one or more computer programs, and the one or more processors are used to execute one or more computer programs stored in the memory, so that the processor executes the features / steps of an embodiment of a resource dynamic allocation method based on LoRa wireless communication described in Embodiment 1.
[0056] Embodiment three:
[0057] Those skilled in the art can understand that all or part of the features / steps of the above-mentioned method embodiments can be implemented by methods, data processing systems or computer programs, and these features can be implemented without hardware, entirely by software, or by a combination of hardware and software. The aforementioned computer program can be stored in one or more computer-readable storage media, and the storage medium stores the computer program. When the computer program is executed by a network server, the network server executes the steps of the embodiment of a method for dynamic resource allocation based on LoRa wireless communication described in the above-mentioned embodiment 1.
[0058] The aforementioned storage media that can store program codes include: static hard disks, solid-state hard disks, random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), optical storage devices, magnetic storage devices, flash memory, magnetic disks or optical disks and / or combinations of the above devices, that is, it can be implemented by any type of volatile or non-volatile storage device or a combination thereof.
[0059] The above description is only the preferred embodiment of the present invention. It is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application belong to the protection scope of the present invention.
Claims
1. A method for dynamic resource allocation based on LoRa wireless communication, characterized in that: The following steps are involved: The network server monitors the load of the LoRa node in real time and receives the real-time load data of each LoRa node through the LoRa gateway; According to the load data, predict the load of each of the LoRa nodes based on a decision tree algorithm to obtain load prediction data; Based on the load prediction data, an allocation strategy of LoRa channel resources is calculated according to the weights, and the allocation strategy is sent to each of the LoRa nodes; According to the allocation strategy, the LoRa channel resources are adjusted in real time through each of the LoRa nodes.
2. A method for dynamic resource allocation based on LoRa wireless communication according to claim 1, characterized in that: The real-time load data of each LoRa node received through the LoRa gateway includes: data transmission frequency, field strength, communication success rate of each LoRa node, and signal strength and signal-to-noise ratio of each LoRa channel.
3. A method for dynamic resource allocation based on LoRa wireless communication according to claim 1, characterized in that: According to the load data, the load of each LoRa node is predicted based on a decision tree algorithm to obtain load prediction data, comprising the following steps: Establish a node load prediction model based on decision tree algorithm; Extracting features from the load data to obtain load features; the load features are features that reflect the use of the LoRa channel resources; the load features include: historical load data, real-time monitoring load data, the number of LoRa nodes, signal strength, and communication success rate; The load characteristics are input into the node load prediction model for prediction to obtain the load prediction data.
4. A method for dynamic resource allocation based on LoRa wireless communication according to claim 3, characterized in that: The establishment of a node load prediction model based on a decision tree algorithm comprises the following steps: Collecting factor data that affects the load change of the LoRa node through the LoRa gateway, preprocessing the factor data, and establishing a sample set and a test set; Using the sample set to train a decision tree model to obtain an initial load prediction model; The initial load prediction model is tested using the test set to obtain the node load prediction model.
5. A method for dynamic resource allocation based on LoRa wireless communication according to claim 4, characterized in that: The method further includes: verifying the data purity of the sample set and the test set by information gain or Gini index; and evaluating the quality of the node load prediction model by cross-validation method.
6. A method for dynamic resource allocation based on LoRa wireless communication according to claim 1, characterized in that: The allocation strategy of calculating the LoRa channel resources according to the weights based on the load prediction data includes the following steps: according to the load prediction data, a network information table including a LoRa node working information table, a LoRa node field strength table, a LoRa gateway neighbor relationship table, a LoRa gateway working information table and a communication success rate statistics table is established, and the allocation strategy is calculated according to the weights through the network information table.
7. A method for dynamic resource allocation based on LoRa wireless communication according to claim 1, characterized in that: The real-time adjustment of the LoRa channel resources includes: adjusting the modulation mode, signal frequency, signal loan, spreading factor, preamble length, synchronization word, frame header mode, coding rate, low-speed optimization switch, IQ flip, LNA gain mode and transmission power of the LoRa channel.
8. A method for dynamic resource allocation based on LoRa wireless communication according to claim 1, characterized in that: Before the network server monitors the load of the LoRa node in real time and receives the real-time load data of each LoRa node through the LoRa gateway, the method also includes the following steps: allocating initial resources to each LoRa node based on historical data and initial settings.
9. A network server, characterized in that: include: one or more processors; A memory for storing one or more computer programs, and one or more processors for executing one or more computer programs stored in the memory, so that one or more processors execute a method for dynamic resource allocation based on LoRa wireless communication as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: A computer program is stored on the storage medium. When the computer program is executed by the network server, the network server executes a resource dynamic allocation method based on LoRa wireless communication as described in any one of claims 1 to 8.
Citation Information
Cited By
Wireless communication method, system, device, medium and program product
CN119997139A
LoRa network intelligent scheduling method and system facing interference environment
CN121013186A
LoRa antenna coverage intelligent evaluation and optimization system for smart city
CN121037858A
LoRa antenna coverage intelligent evaluation and optimization system for smart city
CN121037858B
