A communication optimization method and device based on street lamp pole position
By obtaining the position information of street lamp poles in the intelligent street lamp system, evaluating the communication quality and calculating the shortest path, determining the position and number of the second single lamp controller to forward data, the problem of unstable communication between the single lamp controller and the control center is solved, and communication efficiency and reliability are improved.
Patent Information
- Application Number
- CN202411937791.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-12-26
AI Technical Summary
In the intelligent street light system, the communication quality between the single-light controller and the control center is difficult to maintain stable communication quality in complex urban environments, resulting in some single-light controllers being unable to directly establish stable communication connections with the gateway.
By obtaining the location information of all street light poles in the target cluster, the communication quality of the single-light controller is evaluated and the shortest path between the gateway and the single-light controller with poor communication quality is calculated. The weight value is calculated based on the shortest path and signal strength, and the position and number of the second single-light controller are determined to forward the gateway data to the required single-light controller through these controllers.
Improve the communication efficiency, reliability and flexibility of the street light system, ensure that each single-light controller can communicate stably with the control center, reduce communication delay and packet loss rate, and reduce street light failure and maintenance costs caused by communication failure.
Smart Images

Figure CN119363651B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data communications, and in particular to a communication optimization method and device based on the location of street lamp poles. Background Art
[0002] In modern urban lighting systems, the application of intelligent street lighting systems is becoming more and more widespread. This system not only improves the lighting efficiency of the city, but also realizes remote monitoring and maintenance through the precise management of the location of street light poles. As the lighting system expands, how to ensure that the single lamp controller on each street light pole can stably communicate with the control center has become an urgent problem to be solved.
[0003] To meet this challenge, existing technologies usually use a variety of means to improve communication quality. For example, the coverage can be expanded by increasing the number of gateways, or the signal strength can be enhanced by adjusting the transmission power of a single lamp controller. Although the above methods can improve communication quality to a certain extent, they still face many problems in practical applications. Especially in large-scale urban environments, due to factors such as complex terrain and building obstructions, single lamp controllers in certain areas may not be able to directly establish a stable communication connection with the gateway. This results in poor communication quality of some single lamp controllers, which in turn affects the normal operation of the entire system.
[0004] Therefore, a more effective solution is needed to optimize the communication quality and ensure that each single lamp controller can communicate stably with the control center. Summary of the invention
[0005] The present application provides a communication optimization method and device based on the location of street lamp poles, which effectively improves the communication efficiency, reliability and flexibility of the street lamp system.
[0006] In a first aspect of the present application, a communication optimization method based on the location of a street lamp pole is provided, which is applied to a control center, and the method comprises:
[0007] Obtain the location information of all street light poles in the target cluster, send a broadcast query command to all single light controllers through the gateway, and evaluate the communication quality of all single light controllers according to the response to the broadcast query command. The single light controller is installed in the inspection port or on the lamp head of each street light pole, and the gateway is installed at the street light distribution box;
[0008] When there is a first single lamp controller whose communication quality is not at a preset level, calculating the shortest path between the gateway and the first single lamp controller;
[0009] Calculate a weight value according to the shortest path and the signal strength, and determine the position and first number of the second single lamp controller according to the weight value and the position information of the first single lamp controller;
[0010] The data of the gateway is forwarded to the first single lamp controller through the second single lamp controller.
[0011] Optionally, the calculating the shortest path between the gateway and the first single lamp controller includes:
[0012] The gateway is set as the starting node, all single lamp controllers are taken as vertices, and a weighted graph is established according to the actual physical distance or communication link quality between the vertices;
[0013] Initialize a distance array for storing the shortest distance from the starting node to each vertex in the weighted graph, set the distance from the starting node to itself to zero, set the distance from the starting node to all vertices to infinity, and create an unvisited vertex set, the unvisited vertex set including all vertices except the starting node;
[0014] Selecting a vertex closest to the starting node from the unvisited vertex set as the current vertex, and for each target adjacent vertex of the current vertex, calculating a first path length from the current vertex to the target adjacent vertex, wherein the first path length is the distance from the current vertex to the starting node plus the edge weight from the current vertex to the target adjacent vertex, and when the first path length is less than a second path length recorded in the distance array of the target adjacent vertex, updating the distance of the target adjacent vertex in the distance array to the first path length;
[0015] Until the unvisited vertex set is empty, the shortest path from the gateway to the first single lamp controller is determined from the distance array.
[0016] Optionally, calculating the weight value according to the shortest path and the signal strength includes:
[0017] The weight value is calculated by the following formula:
[0018] w=k1*d+k2 / s
[0019] Among them, w represents the weight value, d represents the shortest path, s represents the signal strength, k1 represents the weight coefficient of distance, and k2 represents the weight coefficient of signal strength.
[0020] Optionally, determining the position and the first number of the second single lamp controllers according to the weight value and the position information of the first single lamp controller includes:
[0021] Arrange the weight values in ascending order, select a preset number of third single-lamp controllers in the front order, and generate an initial population including a plurality of node position combinations according to the preset number of third single-lamp controllers, where one node position combination corresponds to a group of data forwarding node position combinations;
[0022] Create a fitness function based on the number of forwarding nodes, data forwarding path length, signal quality, and network coverage;
[0023] A target data forwarding node position combination with the highest fitness is selected through a genetic algorithm, and the position and the first number of the second single lamp controllers are determined according to the target data forwarding node position combination.
[0024] Optionally, the creating a fitness function according to the number of forwarding nodes, the length of the data forwarding path, the signal quality and the network coverage includes:
[0025] The fitness function is calculated by the following formula:
[0026] F=w_N*(1-N_norm)+w_L*(1-L_norm)+w_Q*Q_norm+w_C*C_norm
[0027] Among them, F represents the fitness function, w_N represents the weight of the number of forwarding nodes, N_norm represents the normalized number of forwarding nodes, w_L represents the weight of the data forwarding path length, L_norm represents the normalized data forwarding path length, w_Q represents the weight of the signal quality, Q_norm represents the normalized signal quality, w_C represents the weight of the network coverage, and C_norm represents the normalized network coverage.
[0028] Optionally, the method further includes:
[0029] Determine the target distance between the target single lamp controller and the gateway, and determine the waiting time of the target single lamp controller according to the target distance and a preset off-peak upload interval, so that the target single lamp controller responds after delaying the waiting time after receiving the broadcast query instruction.
[0030] Optionally, the method further includes:
[0031] The total time is determined according to the second number of all the single-lamp controllers and the unit time for transmitting data once, the total time is divided into multiple time slices according to the first number, and the time slices are matched with the second single-lamp controllers so that the second single-lamp controller transmits data in the corresponding time slices.
[0032] In a second aspect of the present application, a communication optimization system based on the location of a street lamp pole is provided, comprising an evaluation module, a calculation module, an execution module and a transmission module, wherein:
[0033] An evaluation module is configured to obtain the location information of all street light poles in the target cluster, send a broadcast query command to all single light controllers through a gateway, and evaluate the communication quality of all single light controllers according to the response to the broadcast query command, wherein the single light controller is installed in the inspection port or on the lamp head of each street light pole, and the gateway is installed at the street light distribution box;
[0034] A calculation module, configured to calculate the shortest path between the gateway and the first single lamp controller when there is a first single lamp controller whose communication quality is not at a preset level;
[0035] an execution module, configured to calculate a weight value according to the shortest path and the signal strength, and determine a position and a first number of second single lamp controllers according to the weight value and the position information of the first single lamp controller;
[0036] A transmission module is configured to forward the data of the gateway to the first single lamp controller through the second single lamp controller.
[0037] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any one of the methods described above.
[0038] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any of the methods described above is executed.
[0039] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0040] 1. By obtaining the location information of all street light poles in the target cluster and evaluating the communication quality of single light controllers, communication problems can be discovered and solved in a timely manner. When a single light controller with poor communication quality is found, the shortest path between the gateway and the controller can be calculated to transmit data more efficiently and reduce communication delays and packet loss rates.
[0041] 2. Calculate the weight value based on the shortest path and signal strength, and determine the location and number of the second single light controller accordingly. The network structure can be dynamically adjusted to adapt to different communication environments and needs. This dynamic adjustment helps to optimize the allocation of network resources and improve the efficiency and stability of the overall communication network.
[0042] 3. By introducing a second single-lamp controller as a data forwarding node, the network coverage can be flexibly expanded, especially in areas where it is complex or difficult to communicate directly. This expansion method not only improves the flexibility of the network, but also reduces the dependence on a single communication path and enhances the robustness of the network;
[0043] 4. By accurately evaluating the communication quality and dynamically adjusting the network structure, potential communication problems can be discovered and solved in a timely manner, reducing street light failures and maintenance costs caused by communication failures. At the same time, it also helps to optimize the overall energy efficiency of the street light system and reduce energy consumption and operating costs;
[0044] 5. The optimized communication network can ensure the stable operation of the street lighting system and improve the lighting quality and reliability. In the fields of smart cities and smart transportation, this optimized communication network can also provide reliable communication support for other smart devices and services, further enriching urban functions and improving the quality of life of residents. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a flowchart of a communication optimization method based on street lamp pole position disclosed in an embodiment of the present application;
[0046] Figure 2 It is a schematic diagram of the distribution of a single lamp controller disclosed in an embodiment of the present application;
[0047] Figure 3 is another flow chart of the communication optimization method based on the street lamp pole position disclosed in the embodiment of the present application;
[0048] Figure 4 It is a module schematic diagram of a communication optimization system based on street lamp pole position disclosed in an embodiment of the present application;
[0049] Figure 5 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.
[0050] Explanation of the reference numerals: 401, evaluation module; 402, calculation module; 403, execution module; 404, transmission module; 501, processor; 502, communication bus; 503, user interface; 504, network interface; 505, memory. DETAILED DESCRIPTION
[0051] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0052] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0053] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0054] This embodiment discloses a communication optimization method based on the location of street lamp poles, which is applied to a control center. Figure 1 is a flow chart of a communication optimization method based on street lamp pole position disclosed in an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0055] S101, obtaining the location information of all street light poles in the target cluster, sending a broadcast query command to all single light controllers through the gateway, and evaluating the communication quality of all single light controllers according to the response to the broadcast query command. The single light controller is installed in the inspection port or on the lamp head of each street light pole, and the gateway is installed at the street light distribution box;
[0056] S102: when there is a first single lamp controller whose communication quality is not at a preset level, calculating the shortest path between the gateway and the first single lamp controller;
[0057] S103, calculating a weight value according to the shortest path and the signal strength, and determining the position and first number of the second single lamp controller according to the weight value and the position information of the first single lamp controller;
[0058] S104: forward the data of the gateway to the first single lamp controller through the second single lamp controller.
[0059] In the urban lighting system, each street light pole has its precise location in the geographic information system (GIS). This location information is usually stored in the urban lighting GIS pipeline database. By accessing this database, the control center or cloud platform can obtain the location information of all street light poles in the target cluster (i.e., street lights in a specific area or street). This information is the basis for subsequent network communication quality evaluation and optimization. The single-lamp controller is installed in the inspection port or lamp head of each street light pole. After power-on, they will join the wireless self-organizing network (such as LoRa / Zigbee / 443M, etc.). The gateway, as the edge device of this network, is installed at the street light distribution box and plays the role of data transfer. The control center / cloud platform sends a broadcast query command to all single-lamp controllers in the network through the gateway. This command is usually used to check the online status and network connection of each single-lamp controller. When the single-lamp controllers receive the broadcast query command, they will send a response signal to the control center / cloud platform. The control center / cloud platform evaluates the communication quality of each single-lamp controller based on the status of these response signals. The specific evaluation method may include: grading the communication quality of each single light controller according to factors such as the speed at which the single light controller responds to instructions (i.e., delay time), the accuracy of the response (i.e., whether the instruction is correctly understood and the correct response is given), and the stability of the response (i.e., whether the instruction can be continuously and stably responded to over a period of time). If the communication quality of some single light controllers is found to be lower than the preset level (for example, the preset level is level 1, indicating that each broadcast instruction can be responded to immediately) during the evaluation process, these single light controllers are marked as "first single light controllers". The control center / cloud platform needs to take further measures to improve the communication quality of these single light controllers. In order to optimize the network communication quality, the control center / cloud platform needs to calculate the shortest path between the gateway and the first single light controller. This usually involves the analysis of the network topology to determine the optimal path for data packets to be transmitted in the network. After determining the shortest path, the control center / cloud platform also needs to consider the signal strength factor. Signal strength refers to the strength level that the data packet can maintain during transmission, which directly affects the stability and reliability of data transmission. Therefore, the control center / cloud platform will calculate a weight value based on the signal strength on the shortest path to evaluate the pros and cons of the path. After determining the weight values, the control center / cloud platform will determine the second single light controller that can be used as a relay node to help improve the communication quality of the first single light controller based on these weight values and the location information of the first single light controller. At the same time, the number and location distribution of these relay nodes also need to be determined to ensure the coverage and stability of network communication. The control center / cloud platform will configure the second single light controller as a relay node, through which the gateway data is forwarded to the first single light controller.In this way, even if the direct communication quality of the first single lamp controller is poor, it can maintain communication with the gateway through these relay nodes, thereby realizing functions such as street lamp telemetry, telesignaling and remote control.
[0060] By sending broadcast query instructions to all single-lamp controllers and evaluating the communication quality based on the responses, it is possible to accurately identify which single-lamp controllers do not meet the preset standards. This method is efficient and accurate, can quickly locate the problem, and provide strong support for subsequent optimization measures. When a single-lamp controller with poor communication quality is found, the shortest path between the gateway and the controller is calculated, which helps to reduce the delay and packet loss rate of data transmission and improve the efficiency and stability of network communication. This optimization measure can ensure that the optimal path is selected when the data packet is transmitted in the network, thereby making full use of network resources. The weight value is calculated based on the shortest path and signal strength, and the location and number of the second single-lamp controller (i.e., relay node) are determined based on the weight value and the location information of the first single-lamp controller. This method can intelligently select the most suitable relay node to assist in data transmission. These relay nodes can enhance the coverage of the signal and improve the reliability and stability of data transmission. Through the above optimization measures, the communication quality of the single-lamp controller in the street lamp system can be significantly improved, and communication failures and maintenance costs can be reduced. At the same time, this optimization method can also improve the overall energy efficiency and reliability of the system, providing a strong guarantee for the stable operation of the street lamp system.
[0061] Figure 2 Schematic diagram of the distribution of a single lamp controller disclosed in the embodiment of the present application. Figure 2As shown, from left to right are single lamp controller No. 1 and single lamp controller No. 80. The control center repeatedly sends broadcast instructions to 80 single lamp controllers through the LoRa gateway, and grades the communication quality of the single lamp controllers in the entire network according to the response. Due to the distance limitation, it is preset that 20 single lamp controllers have a communication quality level of level 1, 30 single lamp controllers have a communication quality level of level 2, and 30 single lamp controllers have a communication quality level of level 3. In this embodiment of the present invention, after calculation by the control center, the single lamp controller of the No. 20 lamp pole is specified in the broadcast instruction for data forwarding. After data forwarding, the single-lamp controller on lamp pole No. 40, whose communication quality was not level 1, can also respond to the command of the control center; after calculation by the control center, the single-lamp controller on lamp pole No. 40 is selected for data forwarding, and after data forwarding, the single-lamp controller on lamp pole No. 60, whose communication quality was not level 1, can also respond to the command of the control center; after calculation by the control center, the single-lamp controller on lamp pole No. 60 is selected for data forwarding, and after data forwarding, the single-lamp controller on lamp pole No. 75, whose communication quality was not level 1, can also respond to the command of the control center; after calculation by the control center, the single-lamp controller on lamp pole No. 75 is selected for data forwarding, and after data forwarding, the single-lamp controller on lamp pole No. 80, whose communication quality was not level 1, can also respond to the command of the control center; when the network situation changes and devices with communication quality level 2 or 3 appear again, the control center and LoRa gateway will optimize the network communication path in real time.
[0062] Figure 3 is another flow chart of the communication optimization method based on the street lamp pole position disclosed in the embodiment of the present application, such as Figure 3 As shown, the communication optimization method includes step S301, installing a single lamp controller and a gateway on the cable line; step S302, the control center sends a broadcast instruction to the single lamp controller through the gateway; step S303, the single lamp controller responds to the broadcast instruction in a staggered manner; step S304, judging whether there is a single lamp controller whose communication quality level is not 1; if yes, executing step S305, specifying the single lamp controller that needs data forwarding according to the location information, and re-executing step S302; if not, directly executing step S302.
[0063] Optionally, the calculating the shortest path between the gateway and the first single lamp controller includes:
[0064] The gateway is set as the starting node, all single lamp controllers are taken as vertices, and a weighted graph is established according to the actual physical distance or communication link quality between the vertices;
[0065] Initialize a distance array for storing the shortest distance from the starting node to each vertex in the weighted graph, set the distance from the starting node to itself to zero, set the distance from the starting node to all vertices to infinity, and create an unvisited vertex set, the unvisited vertex set including all vertices except the starting node;
[0066] Selecting a vertex closest to the starting node from the unvisited vertex set as the current vertex, and for each target adjacent vertex of the current vertex, calculating a first path length from the current vertex to the target adjacent vertex, wherein the first path length is the distance from the current vertex to the starting node plus the edge weight from the current vertex to the target adjacent vertex, and when the first path length is less than a second path length recorded in the distance array of the target adjacent vertex, updating the distance of the target adjacent vertex in the distance array to the first path length;
[0067] Until the unvisited vertex set is empty, the shortest path from the gateway to the first single lamp controller is determined from the distance array.
[0068] Set the gateway as the starting node (usually marked as S) and all single-lamp controllers as vertices in the graph. Each vertex represents the location of a single-lamp controller. Build a weighted graph based on the actual physical distance between each vertex (single-lamp controller) or the quality of the communication link (such as signal strength, packet loss rate, etc.). The edge weight can be a comprehensive indicator that reflects the difficulty of communication from one single-lamp controller to another. Create a distance array (usually called dist[]) to store the shortest distance from the starting node (gateway) to each vertex in the weighted graph. The distance from the starting node to itself is set to zero (dist[S]=0). The distance from the starting node to all other vertices is set to infinity (indicating that the path has not been found yet), or a sufficiently large value to indicate "unknown" or "unvisited". Create an unvisited vertex set (usually called P) containing all vertices except the starting node. This set is used to track vertices for which the shortest path has not yet been determined. Select the vertex closest to the starting node from the unvisited vertex set P as the current vertex (U). This is usually achieved by finding the current smallest non-zero value in the distance array. For each target adjacent vertex V of the current vertex U, calculate the length of the first path from U to V. This length is the distance from U to the starting node (dist[U]) plus the edge weight from U to V (w(U,V)). If the length of the first path from U to V is less than the second path length (dist[V]) recorded in the distance array for V, update dist[V] to this shorter path length. Remove the current vertex U from the unvisited vertex set P and mark it as visited. Repeat the above steps until the unvisited vertex set P is empty, that is, the shortest path has been determined for all vertices. When the distance array dist[] is completely filled, the shortest path from the gateway to any given single-lamp controller can be determined by backtracking. This is usually achieved by starting from the target single-lamp controller and tracing back to the starting node along the "shortest" edge recorded in dist[]. Determine the shortest path length from the gateway to the first single-lamp controller from the distance array dist[], and obtain the specific path information through the path reconstruction step.
[0069] By establishing a weighted graph and considering the actual physical distance between each vertex or the quality of the communication link as the edge weight, this method can accurately calculate the shortest path from the gateway to the first single lamp controller. This is crucial for optimizing the communication network, reducing data transmission delays, and improving the overall performance of the system. The distance array and the set of unvisited vertices are used to gradually update the shortest path information, thereby avoiding repeated calculations and unnecessary computational overhead. This strategy is particularly effective when dealing with large-scale networks and can significantly improve computational efficiency. Not only is it applicable to the case where physical distance is used as the edge weight, other factors such as communication link quality and signal strength can also be used as edge weights according to actual needs to adapt to different application scenarios and network environments. By accurately calculating the shortest path, it can ensure that the optimal path is selected when the data packet is transmitted in the network, thereby reducing the delay and packet loss rate of data transmission and improving the reliability and stability of the system. This is particularly important for scenarios such as street lighting systems that require continuous and stable operation.
[0070] Optionally, calculating the weight value according to the shortest path and the signal strength includes:
[0071] The weight value is calculated by the following formula:
[0072] w=k1*d+k2 / s
[0073] Among them, w represents the weight value, d represents the shortest path, s represents the signal strength, k1 represents the weight coefficient of distance, and k2 represents the weight coefficient of signal strength.
[0074] The shortest path is the length of the shortest communication path from the gateway to the first single lamp controller. This value is calculated by the Dijkstra algorithm and reflects the physical distance or logical hops of the data packet transmitted in the network. s represents the signal strength, which is the quality or strength of the signal sent by each single lamp controller. This value is usually obtained through actual measurement or simulation, reflecting the quality of the communication link between nodes. k1 is the weight coefficient of the distance, which is used to adjust the degree of influence of the distance on the weight value. This value can be flexibly configured on the platform to adapt to different network environments and application requirements. k2 is the weight coefficient of the signal strength, which is used to adjust the degree of influence of the signal strength on the weight value. Similarly, this value can also be configured on the platform. The calculation result of the weight value comprehensively considers the two factors of the shortest path and signal strength, and provides a basis for selecting the most suitable single lamp controller for data forwarding. Specifically: when d is small, it means that the communication path between the gateway and the unanswered single lamp controller is short, and the delay and packet loss rate of the data packet transmission are low. Therefore, in the weight value, a smaller value of d will help to reduce the value of w; when s is large, it means that the signal strength of the single lamp controller that has been connected to the network is high and the communication link quality is good. In the weight value, a larger value of s will make the value of k2 / s smaller, which is conducive to reducing the value of w. By properly configuring the values of k1 and k2, the influence of distance and signal strength on the weight value can be balanced, so that the selected single lamp controller can achieve the best communication performance.
[0075] Optionally, determining the position and the first number of the second single lamp controllers according to the weight value and the position information of the first single lamp controller includes:
[0076] Arrange the weight values in ascending order, select a preset number of third single-lamp controllers in the front order, and generate an initial population including a plurality of node position combinations according to the preset number of third single-lamp controllers, where one node position combination corresponds to a group of data forwarding node position combinations;
[0077] Create a fitness function based on the number of forwarding nodes, data forwarding path length, signal quality, and network coverage;
[0078] A target data forwarding node position combination with the highest fitness is selected through a genetic algorithm, and the position and the first number of the second single lamp controllers are determined according to the target data forwarding node position combination.
[0079] According to the previously calculated weight values, all possible single-lamp controllers (i.e., the third single-lamp controllers) are sorted. The principle of sorting is to sort by weight value from small to large, so that the single-lamp controllers with smaller weight values will be ranked in front. A preset number (this number can be set according to actual needs and network scale) of single-lamp controllers with smaller weight values are selected from the sorted single-lamp controllers as candidate data forwarding nodes. These candidate nodes will constitute the initial population in the subsequent genetic algorithm. For the selected preset number of third single-lamp controllers, an initial population containing multiple node position combinations is generated. Each node position combination represents a set of possible data forwarding node position combinations, that is, a possible solution. These solutions will be used as inputs to the genetic algorithm to find the optimal solution through iterative optimization. In order to evaluate the pros and cons of each solution, a fitness function needs to be created. This function will calculate the fitness value of each solution based on multiple factors, including: the number of forwarding nodes, it is hoped that as few forwarding nodes as possible will be selected to reduce network complexity and cost; the length of the data forwarding path, a shorter path means lower data transmission delay and packet loss rate; signal quality, good signal quality can ensure reliable data transmission; network coverage, to ensure that the entire network area can be effectively covered to avoid communication blind spots. The fitness function will take these factors into consideration and assign a fitness value to each solution. Solutions with higher fitness values have better performance. The initial population is iteratively optimized using a genetic algorithm. A genetic algorithm is a search algorithm that simulates natural selection and genetic mechanisms, which can find the optimal solution in a complex search space. In each generation of the genetic algorithm, a part of the excellent solutions will be selected as parents according to the fitness value, and new offspring will be generated through operations such as crossover and mutation. These offspring will inherit the excellent genes of the parents and may produce new excellent gene combinations. Through multiple generations of iterative optimization, the genetic algorithm will gradually converge to the optimal solution or a near-optimal solution. In this process, the best solution of each generation will be continuously tracked and recorded. When the genetic algorithm reaches the preset number of iterations or convergence conditions, the solution with the highest fitness value is selected as the final data forwarding node position combination. This combination will determine the location and number of the second single-lamp controllers. These second single-lamp controllers will serve as data forwarding nodes, responsible for forwarding the gateway's data to the first single-lamp controllers that originally needed to communicate but could not communicate directly.
[0080] By sorting the weight values and selecting a preset number of third single-lamp controllers that are ranked first, it can be ensured that the selected single-lamp controllers have a higher importance or influence. This selection method helps to find the optimal data forwarding node position combination more efficiently in the subsequent steps. By generating an initial population containing multiple node position combinations and searching using a genetic algorithm, the optimal solution can be intelligently found in a huge solution space. As a heuristic search algorithm, the genetic algorithm has the characteristics of strong global search capabilities and is not easy to fall into a local optimal solution. Therefore, it can more effectively find the target data forwarding node position combination with the highest fitness. The creation of the fitness function takes into account multiple factors such as the number of forwarding nodes, the length of the data forwarding path, the signal quality, and the network coverage, which helps to comprehensively consider multiple performance indicators in the optimization process, so as to find a more comprehensive and balanced solution. Determining the location and number of the second single-lamp controller according to the target data forwarding node position combination with the highest fitness can ensure that the selected location not only meets the needs of data transmission, but also maximizes the use of resources, thereby improving the efficiency and reliability of the entire system.
[0081] Optionally, the creating a fitness function according to the number of forwarding nodes, the length of the data forwarding path, the signal quality and the network coverage includes:
[0082] The fitness function is calculated by the following formula:
[0083] F=w_N*(1-N_norm)+w_L*(1-L_norm)+w_Q*Q_norm+w_C*C_norm
[0084] Among them, F represents the fitness function, w_N represents the weight of the number of forwarding nodes, N_norm represents the normalized number of forwarding nodes, w_L represents the weight of the data forwarding path length, L_norm represents the normalized data forwarding path length, w_Q represents the weight of the signal quality, Q_norm represents the normalized signal quality, w_C represents the weight of the network coverage, and C_norm represents the normalized network coverage.
[0085] The number of forwarding nodes refers to the number of relay nodes involved in the data forwarding process. The number of forwarding nodes is normalized so that it can be compared with other factors on the same scale. The normalized value (N_norm) is usually between 0 and 1, where 0 represents the best (i.e., the least number of forwarding nodes) and 1 represents the worst (i.e., the largest number of forwarding nodes). The data forwarding path length refers to the total distance that the data travels from the source node to the destination node. It is also normalized to reflect the relative merits of the path length. The normalized value (L_norm) is also between 0 and 1, where 0 represents the best (i.e., the shortest path) and 1 represents the worst (i.e., the longest path). Signal quality refers to the stability and clarity of data during transmission, which is usually related to factors such as signal strength and noise level. Since signal quality is a positive indicator (i.e., the larger the value, the better), its normalization method is different from other factors. Usually, the original value of signal quality is transformed linearly or nonlinearly so that its normalized value (Q_norm) is also between 0 and 1, but at this time 1 represents the best (i.e. the best signal quality) and 0 represents the worst (i.e. the worst signal quality). Note that in the formula, Q_norm appears with a positive sign to reflect its positive indicator characteristics. Network coverage refers to the proportion of the area in the network that can receive signals or services to the total area. The same normalization is performed to reflect the relative advantages and disadvantages of network coverage. The normalized value (C_norm) is also between 0 and 1, 0 represents the worst (i.e. the lowest network coverage) and 1 represents the best (i.e. the highest network coverage). Weight refers to the importance or influence of each key factor in the fitness function. The weight assignment can be flexibly adjusted according to the needs of the actual application scenario. For example, if network coverage is critical to the application, the weight of network coverage (w_C) can be set higher; conversely, if signal quality is more critical, the weight of signal quality (w_Q) can be set higher.
[0086] Optionally, the method further includes:
[0087] Determine the target distance between the target single lamp controller and the gateway, and determine the waiting time of the target single lamp controller according to the target distance and a preset off-peak upload interval, so that the target single lamp controller responds after delaying the waiting time after receiving the broadcast query instruction.
[0088] When the control center / cloud platform queries the data of all single-lamp controllers under the gateway, it is implemented by sending a broadcast query command. In order to avoid data congestion caused by all single-lamp controllers uploading data at the same time after receiving the broadcast command, a peak-shifting query algorithm is formulated. The algorithm determines the response delay time of each single-lamp controller based on the distance between the single-lamp controller and the gateway and the preset peak-shifting upload interval. It is necessary to know the specific distance of the target single-lamp controller from the gateway, which can be expressed as d0 (unit: meter). This distance information can be obtained through measurement during installation, parameter transmission in the communication protocol, or other methods. The preset peak-shifting upload interval is a fixed time value, expressed as t (unit: milliseconds). This value can be determined based on the actual situation of network communication, the data upload rate requirements, and the need to avoid data congestion. According to the target distance d and the preset peak-shifting upload interval t, the waiting time of the target single-lamp controller is calculated. The calculation formula is: waiting time = d*t. This formula means that the single-lamp controller farther away from the gateway will have a longer waiting time, thereby achieving the purpose of uploading data in a peak-shifting manner according to the distance. When the target single-lamp controller receives the broadcast query command, it will delay its response according to the waiting time calculated in the previous step. After the waiting time is over, the target single lamp controller will upload its data to the gateway.
[0089] By setting different waiting times for different target single-lamp controllers, data can be uploaded at different peaks. This means that each single-lamp controller will not send data to the gateway at the same time, thus avoiding network congestion and data conflict. This decentralized data upload method helps to keep the network unobstructed and improve the efficiency and reliability of data transmission. In the street light system, the energy consumption of the single-lamp controller is an important consideration. By setting a reasonable waiting time, the single-lamp controller can be prevented from responding immediately after receiving the broadcast query command, thereby reducing unnecessary energy consumption. In addition, staggered uploading can also make the system run more smoothly and reduce energy waste caused by frequent communication. Although the waiting time is set, this method does not simply delay the response. Instead, it optimizes the response speed of the entire system by responding at the right time. By accurately calculating the waiting time of each target single-lamp controller, it can be ensured that they communicate with the gateway at the best time, so as to quickly respond to the gateway's query instructions.
[0090] Optionally, the method further includes:
[0091] The total time is determined according to the second number of all the single-lamp controllers and the unit time for transmitting data once, the total time is divided into multiple time slices according to the first number, and the time slices are matched with the second single-lamp controllers so that the second single-lamp controller transmits data in the corresponding time slices.
[0092] Assume that in a street light system, there are a total of 100 single-light controllers (the second number z=100). Now, the control center decides to forward data through 10 single-light controllers (the first number n=10) to achieve group control of all single-light controllers. Each single-light controller that forwards data can transmit to different numbers of single-light controllers, namely m1=10, m2=10, ..., mn=10 (note that the sum of m1 to mn should be equal to or close to 100 here). The time required for each data transmission is 1 second (unit time t=1 second). According to the second number of all single-light controllers (z=100) and the unit time for transmitting data once (t=1 second), it can be calculated that if each single-light controller needs to receive data directly, the total time is 100 seconds (because each controller needs 1 second to receive data). But in this example, the data is actually distributed through 10 repeaters (i.e., single-light controllers), so the time needs to be re-divided according to the number of repeaters. The total time is divided into multiple time slices according to the first number (n=10). Since the goal is to have each transponder transmit data during its exclusive time slice, we can simply divide the total time (100 seconds) by the number of transponders to get the length of the time slice that each transponder should occupy. But in this example, we are more concerned with the proportion of the total time occupied by each transponder rather than the absolute length of time. Therefore, the proportion of time occupied by the nth transponder is mn / (z*t), where mn is the number of single light controllers that the transponder can transmit to, and these time slices are mapped to the second single light controller (i.e. the single light controller designated for data forwarding). This means that each transponder will transmit data to the single light controller it covers during its exclusive time slice. For example, the first transponder (which can transmit to 10 single light controllers) will occupy 10 / (100*1) = about 0.1 of the total time. Similarly, the second transponder will occupy about 0.1, and so on, until the tenth transponder occupies about 0.1. The time slice corresponding to each transponder is determined according to the total time and the occupancy ratio. For example, the time slice corresponding to the first transponder is 100*0.1=10 seconds.
[0093] Through time slice division, it can be ensured that each second single lamp controller performs data transmission within a specific time slice, avoiding conflicts and waiting for data transmission. This helps to optimize the efficiency of data transmission, reduce the delay of data transmission, and improve the response speed of the entire street light control system. The time slice division method can disperse data transmission into different time periods, thereby balancing the load of the network. This helps to prevent network congestion and overload, and ensure the stability and reliability of data transmission. By reasonably allocating time slices, network resources can be fully utilized and waste of resources can be avoided. At the same time, the method can also adjust the length and number of time slices according to actual needs to adapt to street light control systems of different scales and needs. With the expansion and upgrade of the street light control system, new single lamp controllers may be added to the system. The time slice division method has good scalability and can easily adapt to the new system structure to ensure the continuity and stability of data transmission. The time slice division method simplifies the management of the street light control system. Administrators can easily monitor and manage the data transmission of each single lamp controller based on the results of time slice division to ensure the normal operation of the system.
[0094] This embodiment also discloses a communication optimization system based on the location of street lamp poles. Figure 4 is a module schematic diagram of a communication optimization system based on street lamp pole position disclosed in an embodiment of the present application, such as Figure 4 As shown, the system includes an evaluation module 401, a calculation module 402, an execution module 403 and a transmission module 404, wherein:
[0095] The evaluation module 401 is configured to obtain the location information of all street light poles in the target cluster, send a broadcast query command to all single light controllers through the gateway, and evaluate the communication quality of all single light controllers according to the response to the broadcast query command. The single light controller is installed in the inspection port or on the lamp head of each street light pole, and the gateway is installed at the street light distribution box;
[0096] A calculation module 402, configured to calculate the shortest path between the gateway and the first single lamp controller when there is a first single lamp controller whose communication quality is not at a preset level;
[0097] An execution module 403 is configured to calculate a weight value according to the shortest path and the signal strength, and determine a position and a first number of second single lamp controllers according to the weight value and the position information of the first single lamp controller;
[0098] The transmission module 404 is configured to forward the data of the gateway to the first single lamp controller through the second single lamp controller.
[0099] Optionally, the calculation module 402 is configured to:
[0100] The gateway is set as the starting node, all single lamp controllers are taken as vertices, and a weighted graph is established according to the actual physical distance or communication link quality between the vertices;
[0101] Initialize a distance array for storing the shortest distance from the starting node to each vertex in the weighted graph, set the distance from the starting node to itself to zero, set the distance from the starting node to all vertices to infinity, and create an unvisited vertex set, the unvisited vertex set including all vertices except the starting node;
[0102] Selecting a vertex closest to the starting node from the unvisited vertex set as the current vertex, and for each target adjacent vertex of the current vertex, calculating a first path length from the current vertex to the target adjacent vertex, wherein the first path length is the distance from the current vertex to the starting node plus the edge weight from the current vertex to the target adjacent vertex, and when the first path length is less than a second path length recorded in the distance array of the target adjacent vertex, updating the distance of the target adjacent vertex in the distance array to the first path length;
[0103] Until the unvisited vertex set is empty, the shortest path from the gateway to the first single lamp controller is determined from the distance array.
[0104] Optionally, the execution module 403 is configured to:
[0105] The weight value is calculated by the following formula:
[0106] w=k1*d+k2 / s
[0107] Among them, w represents the weight value, d represents the shortest path, s represents the signal strength, k1 represents the weight coefficient of distance, and k2 represents the weight coefficient of signal strength.
[0108] Optionally, the execution module 403 is configured to:
[0109] Arrange the weight values in ascending order, select a preset number of third single-lamp controllers in the front order, and generate an initial population including a plurality of node position combinations according to the preset number of third single-lamp controllers, where one node position combination corresponds to a group of data forwarding node position combinations;
[0110] Create a fitness function based on the number of forwarding nodes, data forwarding path length, signal quality, and network coverage;
[0111] A target data forwarding node position combination with the highest fitness is selected through a genetic algorithm, and the position and the first number of the second single lamp controllers are determined according to the target data forwarding node position combination.
[0112] Optionally, the execution module 403 is configured to:
[0113] The fitness function is calculated by the following formula:
[0114] F=w_N*(1-N_norm)+w_L*(1-L_norm)+w_Q*Q_norm+w_C*C_norm
[0115] Among them, F represents the fitness function, w_N represents the weight of the number of forwarding nodes, N_norm represents the normalized number of forwarding nodes, w_L represents the weight of the data forwarding path length, L_norm represents the normalized data forwarding path length, w_Q represents the weight of the signal quality, Q_norm represents the normalized signal quality, w_C represents the weight of the network coverage, and C_norm represents the normalized network coverage.
[0116] Optionally, the system further comprises a delay module, wherein the delay module is configured to:
[0117] Determine the target distance between the target single lamp controller and the gateway, and determine the waiting time of the target single lamp controller according to the target distance and a preset off-peak upload interval, so that the target single lamp controller responds after delaying the waiting time after receiving the broadcast query instruction.
[0118] Optionally, the system further includes a slicing module, wherein the slicing module is configured to:
[0119] The total time is determined according to the second number of all the single-lamp controllers and the unit time for transmitting data once, the total time is divided into multiple time slices according to the first number, and the time slices are matched with the second single-lamp controllers so that the second single-lamp controller transmits data in the corresponding time slices.
[0120] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0121] This embodiment also discloses an electronic device, referring to Figure 5 The electronic device may include: at least one processor 501 , at least one communication bus 502 , a user interface 503 , a network interface 504 , and at least one memory 505 .
[0122] The communication bus 502 is used to realize the connection and communication between these components.
[0123] The user interface 503 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.
[0124] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0125] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented separately through a chip.
[0126] Among them, the memory 505 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be optionally at least one storage device located away from the aforementioned processor 501. As Figure 5 As shown, the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application program of a communication optimization method based on the location of a street lamp pole.
[0127] exist Figure 5 In the electronic device shown, the user interface 503 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 501 can be used to call the application program of the communication optimization method based on the location of the street light pole stored in the memory 505. When executed by one or more processors 501, the electronic device executes one or more methods in the above-mentioned embodiments.
[0128] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0129] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0130] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0131] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0132] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0133] 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 memory. 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, and the computer software product is stored in a memory 505, including a number of instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory 505 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.
[0134] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A communication optimization method based on the location of street lamp poles, characterized in that: Applied to a control center, the method comprises: Obtain the location information of all street light poles in the target cluster, send a broadcast query command to all single light controllers through the gateway, and evaluate the communication quality of all single light controllers according to the response to the broadcast query command. The single light controller is installed in the inspection port or on the lamp head of each street light pole, and the gateway is installed at the street light distribution box; When there is a first single lamp controller whose communication quality is not at a preset level, calculating the shortest path between the gateway and the first single lamp controller; Calculate a weight value according to the shortest path and the signal strength, and determine the position and first number of the second single lamp controller according to the weight value and the position information of the first single lamp controller; forwarding the data of the gateway to the first single lamp controller through the second single lamp controller, The determining the position and the first number of the second single lamp controllers according to the weight value and the position information of the first single lamp controller comprises: Arrange the weight values in ascending order, select a preset number of third single-lamp controllers in the front order, and generate an initial population including a plurality of node position combinations according to the preset number of third single-lamp controllers, where one node position combination corresponds to a group of data forwarding node position combinations; Create a fitness function based on the number of forwarding nodes, data forwarding path length, signal quality, and network coverage; A target data forwarding node position combination with the highest fitness is selected through a genetic algorithm, and the position and the first number of the second single lamp controllers are determined according to the target data forwarding node position combination.
2. The communication optimization method based on the street lamp pole position according to claim 1 is characterized in that: The calculating the shortest path between the gateway and the first single lamp controller comprises: The gateway is set as the starting node, all single lamp controllers are taken as vertices, and a weighted graph is established according to the actual physical distance or communication link quality between the vertices; Initialize a distance array for storing the shortest distance from the starting node to each vertex in the weighted graph, set the distance from the starting node to itself to zero, set the distance from the starting node to all vertices to infinity, and create an unvisited vertex set, the unvisited vertex set including all vertices except the starting node; Selecting a vertex closest to the starting node from the unvisited vertex set as the current vertex, and for each target adjacent vertex of the current vertex, calculating a first path length from the current vertex to the target adjacent vertex, wherein the first path length is the distance from the current vertex to the starting node plus the edge weight from the current vertex to the target adjacent vertex, and when the first path length is less than a second path length recorded in the distance array of the target adjacent vertex, updating the distance of the target adjacent vertex in the distance array to the first path length; Until the unvisited vertex set is empty, the shortest path from the gateway to the first single lamp controller is determined from the distance array.
3. The communication optimization method based on the street lamp pole position according to claim 1 is characterized in that: Calculating the weight value according to the shortest path and the signal strength includes: The weight value is calculated by the following formula: w=k1*d+k2 / s Among them, w represents the weight value, d represents the shortest path, s represents the signal strength, k1 represents the weight coefficient of distance, and k2 represents the weight coefficient of signal strength.
4. The communication optimization method based on the street lamp pole position according to claim 3 is characterized in that: The creation of a fitness function according to the number of forwarding nodes, the length of the data forwarding path, the signal quality and the network coverage includes: The fitness function is calculated by the following formula: F=w_N*(1-N_norm)+w_L*(1-L_norm)+w_Q*Q_norm+w_C*C_norm Among them, F represents the fitness function, w_N represents the weight of the number of forwarding nodes, N_norm represents the normalized number of forwarding nodes, w_L represents the weight of the data forwarding path length, L_norm represents the normalized data forwarding path length, w_Q represents the weight of the signal quality, Q_norm represents the normalized signal quality, w_C represents the weight of the network coverage, and C_norm represents the normalized network coverage.
5. The communication optimization method based on the street lamp pole position according to claim 1 is characterized in that: The method further comprises: Determine the target distance between the target single lamp controller and the gateway, and determine the waiting time of the target single lamp controller according to the target distance and a preset off-peak upload interval, so that the target single lamp controller responds after delaying the waiting time after receiving the broadcast query instruction.
6. The communication optimization method based on the street lamp pole position according to claim 1 is characterized in that: The method further comprises: The total time is determined according to the second number of all the single-lamp controllers and the unit time for transmitting data once, the total time is divided into multiple time slices according to the first number, and the time slices are matched with the second single-lamp controllers so that the second single-lamp controller transmits data in the corresponding time slices.
7. A communication optimization system based on street lamp pole location, characterized in that: It includes an evaluation module, a calculation module, an execution module and a transmission module, wherein: An evaluation module is configured to obtain the location information of all street light poles in the target cluster, send a broadcast query command to all single light controllers through a gateway, and evaluate the communication quality of all single light controllers according to the response to the broadcast query command, wherein the single light controller is installed in the inspection port or on the lamp head of each street light pole, and the gateway is installed at the street light distribution box; A calculation module, configured to calculate the shortest path between the gateway and the first single lamp controller when there is a first single lamp controller whose communication quality is not at a preset level; an execution module, configured to calculate a weight value according to the shortest path and the signal strength, and determine a position and a first number of second single lamp controllers according to the weight value and the position information of the first single lamp controller; a transmission module, configured to forward the data of the gateway to the first single lamp controller through the second single lamp controller, The determining the position and the first number of the second single lamp controllers according to the weight value and the position information of the first single lamp controller comprises: Arrange the weight values in ascending order, select a preset number of third single-lamp controllers in the front order, and generate an initial population including a plurality of node position combinations according to the preset number of third single-lamp controllers, where one node position combination corresponds to a group of data forwarding node position combinations; Create a fitness function based on the number of forwarding nodes, data forwarding path length, signal quality, and network coverage; A target data forwarding node position combination with the highest fitness is selected through a genetic algorithm, and the position and the first number of the second single lamp controllers are determined according to the target data forwarding node position combination.
8. An electronic device, characterized in that: It includes a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 6 is performed.
Citation Information
Patent Citations
Communication method and device, computer readable medium and electronic device
CN110913453A
Intelligent street lamp centralized monitoring management scheme based on 5G transmission
CN118802994A