Intelligent control box special for intelligent street lamp

By adopting multivariate mapping module, decoupling control module and real-time multitasking module in the smart street light intelligent control box, the problem of difficult to deal with complex urban lighting management needs in the existing technology is solved, and accurate control parameter prediction and high-priority task response are achieved, energy saving efficiency and system stability are improved.

CN120111752APending Publication Date: 2025-06-06NANYANG GREAT OPTOELECTRONIC TECH CO LTD

Patent Information

Application Number
CN202510078491.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

When handling complex urban lighting management needs, existing smart street light intelligent control boxes are difficult to accurately handle the nonlinear relationship between multiple variables, resulting in lagging or inaccurate adjustment of control parameters, affecting energy saving effect and operating efficiency. In addition, non-preemptive scheduling and lack of resource locking or priority inheritance mechanisms lead to high-priority tasks being unable to respond in time, affecting real-time and system stability.

Method used

The multivariate mapping module is used to learn the nonlinear mapping relationship between multivariate through deep belief networks to build a multivariate coupling model; combined with the decoupling control module, independent component analysis and rolling time domain optimization algorithm are used to achieve precise control parameter prediction; the elastic time slice allocation mechanism and priority dynamic evaluation module are used in the real-time multitasking module to detect and eliminate priority inversion.

Benefits of technology

By accurately identifying the nonlinear relationship between multivariables, the energy-saving efficiency and operating effect of smart street lamps are improved, ensuring the stability and consistency of lighting quality. At the same time, timely response to high-priority tasks and effective utilization of resources are achieved, the problems of traditional scheduling delay and priority reversal are overcome, and the real-time and stability of the system are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005247798360000101
    Figure BDA0005247798360000101
  • Figure BDA0005247798360000151
    Figure BDA0005247798360000151
  • Figure BDA0005247798360000201
    Figure BDA0005247798360000201
Patent Text Reader

Abstract

The invention discloses a special intelligent control box for an intelligent street lamp, relates to the technical field of industrial automation, and solves the problems that in an existing intelligent street lamp control method, parameter adjustment under multivariable coupling is difficult, and response time is uncertain and priority is reversed due to non-preemptive scheduling. Comprising a multivariable mapping module, a decoupling control module, a real-time multi-task scheduling module and a priority dynamic evaluation module, according to the scheme, the nonlinear coupling model is constructed through the multivariable mapping module, and precise control is realized by using the decoupling control module; the real-time multi-task scheduling module adopts an elastic time slice allocation mechanism to optimize resource allocation; the priority dynamic evaluation module monitors and eliminates priority inversion through a resource allocation graph algorithm; according to the invention, the control capability of the intelligent street lamp on a complex process is greatly improved, and the system response speed, production efficiency and stability are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial automation technology, and more specifically to an intelligent control box dedicated to a smart street lamp. Background Art

[0002] With the advancement of smart city construction, smart street lights have become an important part of the intelligent upgrade of urban infrastructure. In this context, the smart control box dedicated to smart street lights plays a key role as a core component. At present, the smart control box of smart street lights integrates a variety of advanced technologies, such as PLC (programmable logic controller), DCS (distributed control system) and Internet of Things communication technology, to achieve precise control and efficient management of street lights. For example, patent CN220457626U discloses a smart street light control box based on PLC technology, whose design includes a power line carrier communication module, a sensor interface and a remote control platform. The control box collects data such as light intensity, ambient temperature and humidity, energy consumption, etc., and adjusts the light brightness and switch status in combination with an algorithm to achieve energy-saving control of street lights. The patent document also mentions that its power line communication technology can reduce wiring costs and improve maintenance efficiency through remote management. These characteristics make the patented product have a certain market competitiveness, especially in scenarios such as road lighting and park lighting. In addition, patent CN212992662U discloses an intelligent control box suitable for smart street lights, whose main highlights are structural design and heat dissipation performance optimization. The patent proposes that by adding modular components and optimizing the internal heat dissipation channel design, the stability of equipment operation and the convenience of maintenance are improved. Although these patented products have made certain progress in functionality and stability, there are still the following deep-seated problems that have not been solved in actual applications, especially when facing today's complex urban lighting management needs:

[0003] First, urban lighting management involves multiple variables, such as light intensity, pedestrian flow, traffic conditions, etc., which have highly nonlinear relationships. The control algorithms of existing patents are usually based on simple rules or linear models, which are difficult to accurately handle the complex coupling between variables, resulting in delayed or inaccurate parameter adjustment, thus affecting the energy saving effect and operating efficiency of street lamps. Secondly, in multi-task execution scenarios, non-preemptive scheduling may cause high-priority tasks to fail to respond in time due to low-priority tasks occupying resources. For example, at the scene of a sudden traffic accident, the communication and scheduling mechanism mentioned in the patent may affect emergency lighting scheduling due to scheduling delays, and cannot meet the needs of high real-time scenarios. In addition, in resource competition scenarios, the patent control box does not provide an effective resource locking or priority inheritance mechanism, which easily leads to high-priority tasks being blocked due to low-priority tasks holding resources. For example, during major urban events, if the lighting control in the core area fails to respond in time due to priority inversion, it may affect the smooth progress of the event and bring social and economic losses. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a smart control box dedicated to a smart street lamp to solve the problems raised in the background technology.

[0005] The present invention adopts the following technical solution: an intelligent control box for smart street lamps, comprising: a multivariable mapping module, a decoupling control module, a real-time multitasking scheduling module and a priority dynamic evaluation module;

[0006] The multivariable mapping module is used to take the real-time data of the operation process of the smart street lamp as input, including but not limited to light intensity, ambient temperature and humidity, pedestrian flow and traffic conditions; learn the nonlinear mapping relationship between multiple variables through the deep belief network, and build a multivariable coupling model to identify the nonlinear relationship and change trend between variables;

[0007] The decoupling control module is used to separate the coupled variables into independent components based on the multivariable coupling model through an independent component analysis algorithm, and then predict the optimal control parameters of each variable at a future time according to current and historical data through a predictive control algorithm optimized in a rolling time domain, and output the optimized control instructions to the actuator;

[0008] The real-time multi-task scheduling module is used to receive requirements from different industrial tasks, dynamically allocate CPU resources according to the priority and deadline of the task through a flexible time slice allocation mechanism, and output the task execution status and resource usage;

[0009] The priority dynamic evaluation module is used to monitor the execution status of tasks in the system in real time through a resource allocation graph algorithm, detect priority inversion, and resolve the priority inversion.

[0010] As a further technical solution of the present invention, the learning method of the deep belief network learning the nonlinear mapping relationship between multiple variables is as follows: first, a network structure is constructed by stacking multiple layers of restricted Boltzmann machines (RBMs), and each layer of RBM is pre-trained by a contrastive divergence algorithm. The contrastive divergence algorithm initializes the visible layer state, calculates the activation probability of the hidden layer nodes according to the energy function, samples the hidden layer state, and then uses the hidden layer state as input to reversely calculate the reconstruction state of the visible layer, and optimizes the parameters of the RBM by minimizing the difference between the reconstruction error and the original input, so that the RBM learns the local features of the industrial data; during the pre-training process, the hidden layer of the lower RBM is used as the visible layer of the upper RBM, so that the network extracts abstract features of different levels from the original data; after the pre-training is completed, the deep belief network is optimized by a fine-tuning mechanism; the fine-tuning mechanism connects the deep belief network to the Softmax regression layer, uses the back propagation algorithm, takes the nonlinear mapping relationship between multiple variables as the objective function, calculates the error between the predicted value and the true value, and adjusts the parameters of all layers in the network by a gradient descent algorithm, and stops training if the error reaches the preset accuracy requirement, otherwise, continues to adjust the parameters until the accuracy requirement is met.

[0011] As a further technical solution of the present invention, the formula expression of the energy function is:

[0012]

[0013] In formula (1), v represents the visible layer node state vector; v i represents the state of the i-th visible layer node, representing a certain state of different variables of industrial equipment, and its value is 1 or 0; h represents the state vector of the hidden layer node; h j Represents the state of the jth hidden layer node, which is used to mine potential feature patterns in multivariate data; n v Represents the number of visible layer nodes, corresponding to the number of variables monitored and analyzed in industrial equipment; n h represents the number of hidden layer nodes; a i represents the bias parameter of the visible layer node i; b j represents the bias parameter of hidden layer node j, which is used to adjust the difficulty of activating hidden layer node j; w ij n represents the weight parameter connecting the visible layer node i and the hidden layer node j, which is used to determine the strength of the association between the visible layer variable and the hidden layer feature; c represents the number of additional constraints introduced to combine specific knowledge or constraints of industrial equipment; c k Represents the weight of the kth constraint, which is used to adjust the constraint n c The degree of influence on the energy function; f k(v,h) represents the kth constraint function, which is defined based on the visible and hidden layer states.

[0014] As a further technical solution of the present invention, the decoupling control module includes an independent component analysis unit, a prediction model construction unit, a rolling time domain optimization unit and an instruction output unit; the independent component analysis unit uses an independent component analysis algorithm to find a separation matrix through centering, whitening and iterative optimization, separates the coupled variables into independent components, and outputs independent variable component data; the prediction model construction unit builds a prediction model based on independent variable component data and historical data through a time series analysis method, learns the law of variable change, and outputs variable future state prediction data to the rolling time domain optimization unit; the rolling time domain optimization unit combines the operating objectives and constraints of the industrial equipment, solves in the control time domain through a rolling time domain optimization algorithm, and outputs the optimal control parameters at the current moment to the instruction output unit; the instruction output unit outputs control instructions to the industrial equipment actuator through an actuator interface protocol conversion method.

[0015] As a further technical solution of the present invention, the working method of the independent component analysis algorithm is: based on the industrial equipment coupling variables output by the multivariable coupling model, first remove the mean in the data through centering and whitening preprocessing, and make the covariance matrix of the data become a unit matrix; then introduce negative entropy to continuously iteratively optimize the objective function for separating independent components to obtain a separation matrix; the negative entropy is used to measure the degree of deviation of the data distribution from the Gaussian distribution; in each iteration, the separation matrix is ​​updated by the gradient ascent algorithm, and if the change in the negative entropy value in multiple consecutive iterations is less than a preset threshold, the algorithm is considered to converge.

[0016] As a further technical solution of the present invention, the working method of the rolling horizon optimization predictive control algorithm is as follows: first, define the prediction horizon N p and control time domain N c , where N p ≤N c ; The prediction time domain N p It is used to determine the time span for predicting the future variable state. The control time domain is used to determine the length of each calculation of the optimal control sequence. A dynamic prediction equation is constructed based on a multivariable coupling model to predict the future N p The state of each variable at each moment; at each sampling moment, the state space model of the industrial equipment is assumed to be x k+1 =f(x k ,u k ), where x k is the system state vector at time k, containing the independent variable components, u k is the control input vector at time k; the system state at each future moment is calculated by iteration, and the formula is:

[0017] x k+l|k =f(x k+l-1|k ,u k+i-1|k )(i=1,2,...,N p ) (2)

[0018] In formula (2), x k+l|k represents the system state at time k+l predicted based on the information at time k, u k+i-1|k The control input at time k+i-1 is calculated based on the information at time k; then, define the industrial equipment operation objective function J to balance the impact of product quality, energy consumption and control input changes; solve the optimization problem of the industrial equipment operation objective function J through the interior point method to obtain the optimal control sequence at the current moment During the solution process, if the algorithm converges to a solution that meets the preset accuracy requirements, the first control variable u in the optimal control sequence at the current moment is k|k As the control parameter output at the current moment; after each sampling cycle, the prediction time domain and control time domain are rolled forward by one sampling cycle, and the prediction and optimization solution are re-performed to adapt to the real-time dynamic changes of the industrial process.

[0019] As a further technical solution of the present invention, the real-time multi-task scheduling module includes a task analysis module, a priority evaluation module, a strategy allocation module and an allocation execution module; the task information analysis module is used to receive the demand information of different industrial tasks, and disassemble and analyze the data carried by the task including the task type, expected execution time, resource demand type and quantity through a data structure analysis method, and output it to the priority evaluation module; the priority evaluation module constructs a task priority evaluation model through a fuzzy hierarchical analysis method, analyzes the task and outputs the task priority to the strategy allocation module; the strategy allocation module is used to adopt a flexible time slice allocation mechanism, and through a time slice allocation algorithm based on linear programming, maximizes the overall efficiency of the system and meets the task deadline as the objective function, takes the task priority, expected execution time, and resource demand as constraints, constructs a linear programming model and solves the optimal allocation strategy; the allocation execution and monitoring module is based on the output strategy of the strategy allocation module, and allocates CPU resources to each task according to the allocated time slice through a multi-level feedback queue scheduling algorithm.

[0020] As a further technical solution of the present invention, the working steps of the flexible time slice allocation mechanism include:

[0021] Step 1: Define the task set T = {T 1 ,T 2 ,...,T n}, for each task T r , let task Tr The priority of task P r , Task T r The estimated execution time is D r , the resource demand vector is R r = {R r1 ,R r2 ,...,R rm}, let R rj Represents task T r The demand for the jth resource includes CPU, memory, and specific sensor data flow. At the same time, the task correlation factor matrix A = {a rj}, where a rj Represents task T r With T J The degree of correlation between them and the task real-time coefficient u is defined r , used to measure the task's requirements for timely data processing;

[0022] Step 2: Considering the completion status, priority, correlation and real-time factors of the tasks, define the overall efficiency index E of the system. The formula is:

[0023]

[0024] In formula (3), F r Represents task T r The actual completion time of r Represents task T r Deadline:

[0025] Step 3: For each resource j, resource constraints, time constraints and association constraints are performed through resource evaluation, time compliance judgment and task management analysis;

[0026] Step 4: Use the interior point method to solve the optimal time slice allocation strategy; in the solution process, continuously iterate and adjust the time slice allocation plan {t 1 ,t 2 ,...,t n}, each iteration calculates the value of the objective function E and compares it with the result of the previous iteration. If the difference between the two calculation results is less than the preset threshold, the algorithm is judged to have converged and the optimal time slice allocation strategy is obtained;

[0027] Step 5: pass the obtained optimal time slice allocation strategy to the CPU scheduler, triggering the CPU scheduler to allocate CPU time slices to each industrial task according to this strategy.

[0028] As a further technical solution of the present invention, the detection method of the resource allocation graph algorithm for detecting priority inversion is: first, a graph data structure generation algorithm is used to take tasks and resources as nodes, and based on the resource request and allocation relationship, directed edges are created to construct a resource allocation graph; then the resource allocation graph is traversed through a depth-first search method; during the traversal process, an access identifier is set for each node, and when a node marked as being accessed is visited again and a loop is formed, it is determined that a priority inversion has occurred.

[0029] As a further technical solution of the present invention, the priority dynamic evaluation module adopts the method of resolving priority inversion as follows: first, the remaining execution time, resource occupancy and related task information of the low-priority task involved in priority inversion in the industrial production process are obtained through the task information acquisition mechanism; if it is judged that the remaining execution time of the low-priority task is lower than the preset threshold, the busy waiting strategy is adopted to execute the low-priority task to release the occupied resources; if it is judged that the remaining execution time of the low-priority task is higher than or equal to the preset threshold, the priority of the low-priority task is increased through the priority adjustment mechanism, or through resource reorganization, other alternative resources are adjusted to be allocated to the high-priority task to relieve the blockage.

[0030] Based on the above technical solution, the positive and beneficial effects of the present invention are:

[0031] 1. The present invention uses a multivariable mapping module, takes real-time data (such as light intensity, ambient temperature and humidity, pedestrian flow, traffic conditions, etc.) during the operation of smart street lamps as input, uses a deep belief network to learn the nonlinear mapping relationship between multiple variables, and constructs a multivariable coupling model. It realizes the accurate identification of nonlinear relationships and changing trends between variables, and effectively solves the problem of control parameter adjustment caused by the inability to accurately handle complex coupling relationships. It improves the adaptability of smart street lamps to complex urban environments, significantly improves energy-saving efficiency and operating effects, and ensures the stability and consistency of street lamp lighting quality. For example, in road lighting, the brightness can be accurately adjusted according to real-time traffic to improve energy consumption management efficiency.

[0032] 2. The present invention uses a decoupling control module, based on a multivariable coupling model, and uses an independent component analysis (ICA) algorithm to separate coupled variables into independent components. It also uses a predictive control algorithm based on rolling plot optimization (MPC) to predict the optimal control parameters of each variable at future times based on current and historical data, thereby achieving accurate and timely adjustment of lighting parameters. This method not only improves the response speed and control accuracy of the system, but also solves the problem of excessive energy consumption or insufficient lighting effects of street lamps caused by improper parameter adjustment, and significantly improves the overall efficiency of urban lighting management.

[0033] 3. The present invention adopts a flexible time slice allocation mechanism through a real-time multi-task scheduling module, dynamically allocates CPU resources according to the priority and deadline of the task, and maximizes the overall efficiency of the system through a time slice allocation algorithm based on linear programming, thereby achieving timely response to high-priority tasks and effective utilization of resources. This effectively overcomes the delay problem caused by traditional non-preemptive scheduling and solves the problem of uncertain system response time, especially in scenarios with high real-time requirements, such as emergency lighting scheduling at traffic accident sites, to avoid the inability to respond to key tasks in a timely manner and improve the reliability and flexibility of the smart street light system.

[0034] 4. The priority dynamic evaluation module of the present invention monitors the execution of tasks in the system in real time through the resource allocation graph algorithm, detects priority inversion, and resolves it through busy waiting, raising the priority of low-priority tasks, or resource reorganization. It realizes timely discovery and resolution of priority inversion problems, avoiding serious consequences for urban lighting management caused by priority inversion. It ensures the stability and reliability of the smart street light system, and reduces management confusion and resource waste caused by priority inversion. In key scenarios such as major events or holiday lighting, it ensures the smooth progress of the lighting control process and improves the quality and economic benefits of urban lighting services. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 This is a schematic diagram of the principle of a smart control box dedicated to a smart street lamp of the present invention;

[0036] Figure 2 This is a working principle framework diagram of the deep belief network of the present invention;

[0037] Figure 3 It is a schematic diagram of the framework of the decoupling control module of the present invention;

[0038] Figure 4 It is a working method framework diagram of the independent component analysis algorithm of the present invention;

[0039] Figure 5 It is a working method framework diagram of the resource allocation graph algorithm of the present invention;

[0040] Figure 6 It is a structural diagram of a method for resolving priority inversion by a priority dynamic evaluation module of the present invention. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] In the present invention, Figure 1 As shown: A smart control box for smart street lamps includes:

[0043] The multivariate mapping module is used to take the real-time data of the operation process of the smart street lamp as input, including but not limited to light intensity, ambient temperature and humidity, pedestrian flow and traffic conditions; learn the nonlinear mapping relationship between multiple variables through the deep belief network, and build a multivariate coupling model to identify the nonlinear relationship and change trend between variables; Figure 2 As shown: The learning method of the deep belief network to learn the nonlinear mapping relationship between multiple variables is: first, the network structure is constructed by stacking multiple layers of restricted Boltzmann machines (RBM), and each layer of RBM is pre-trained by the contrastive divergence algorithm. The contrastive divergence algorithm initializes the visible layer state, calculates the activation probability of the hidden layer nodes according to the energy function, samples the hidden layer state, and then uses the hidden layer state as input to reversely calculate the reconstruction state of the visible layer, and optimizes the parameters of the RBM by minimizing the difference between the reconstruction error and the original input, so that the RBM learns the local features of the smart street lamp operation data; during the pre-training process, the hidden layer of the lower RBM is used as the visible layer of the upper RBM, so that the network extracts different levels of abstract features from the original data; after the pre-training is completed, the deep belief network is optimized by the fine-tuning mechanism. The fine-tuning mechanism connects the deep belief network to the Softmax regression layer, uses the back propagation algorithm, takes the nonlinear mapping relationship between the multiple variables of the smart street lamp as the objective function, calculates the error between the predicted value and the true value, and adjusts the parameters of all layers in the network by the gradient descent algorithm. If the error reaches the preset accuracy requirement, the training is stopped, otherwise the parameters are continuously adjusted until the accuracy requirement is met. Among them, the formula expression of the energy function is:

[0044]

[0045] In formula (1), v represents the visible layer node state vector of the smart street light operation data; v i represents the state of the i-th visible layer node, representing a certain state of different variables in the operation process of the smart street lamp, and its value is 1 or 0; h represents the state vector of the hidden layer node; h j represents the state of the jth hidden layer node, which is used to mine the potential feature patterns in the smart street lamp operation data; n v Represents the number of visible layer nodes, corresponding to the number of variables monitored and analyzed in the smart street lamp operation data; n h represents the number of hidden layer nodes; a i represents the bias parameter of the visible layer node i; b j represents the bias parameter of hidden layer node j, which is used to adjust the difficulty of activating hidden layer node j; w ijn represents the weight parameter connecting the visible layer node i and the hidden layer node j, which is used to determine the strength of the association between the visible layer variable and the hidden layer feature; c represents the number of additional constraints introduced, which is used to combine the specific knowledge or constraints of smart street lights; c k Represents the weight of the kth constraint, which is used to adjust the constraint n c The degree of influence on the energy function; f k (v,h) represents the kth constraint function, which is defined based on the visible and hidden layer states.

[0046] In a specific embodiment, the multivariate mapping module constructs a multivariate coupling model through the nonlinear mapping relationship between multiple variables learned by the deep belief network. The model can accurately describe the mutual influence and change trend between variables such as temperature, carbon content, furnace pressure, etc. For example, when the temperature changes, the model can predict the possible changes in carbon content and furnace pressure, providing a scientific basis for the control of industrial production processes.

[0047] In the actual application of the smart control box for smart street lights, the working method of the multivariable mapping module is as follows:

[0048] First, sensors distributed at key locations of industrial production equipment collect data in real time on industrial production processes, such as temperature, carbon content, furnace pressure, etc. These sensors convert physical quantities into electrical signals, which are digitized by the data acquisition system to provide raw data input for the multivariable mapping module.

[0049] The collected raw data may have problems such as noise and missing values. Therefore, it is necessary to preprocess the data, including data cleaning (removing noise and outliers) and data normalization (mapping the data to a specific interval, such as [0,1]), to improve data quality and ensure that the multivariate mapping module can effectively learn data features.

[0050] Next, the preprocessed data is input into the multivariate mapping module, and the model is trained according to the pre-training and fine-tuning process of the deep belief network described above. During the training process, the model parameters are continuously adjusted so that the model can accurately learn the nonlinear mapping relationship between multiple variables. The training process can be completed in the built-in computing unit of the control box or by connecting to an external high-performance computing device.

[0051] The trained model receives the latest data from sensors in real time and predicts the trend of variable changes in the industrial production process based on the learned nonlinear mapping relationship. For example, it predicts the changes in carbon content and furnace pressure when the temperature rises, so as to adjust the production parameters in time and avoid abnormalities in the production process.

[0052] Finally, the model’s prediction results are compared with the actual production data, and the model is further optimized based on the error feedback. If the prediction results deviate greatly from the actual situation, it means that the model may need to further adjust the parameters or data preprocessing methods to continuously improve the accuracy and reliability of the model.

[0053] In the specific implementation, the hardware implementation platform of the multivariable mapping module specifically includes various types of sensor interfaces for connecting temperature sensors, carbon content sensors, furnace pressure sensors, etc. These interfaces are compatible with sensors of different types and specifications to ensure accurate collection of various industrial production data. There is also a data acquisition and preprocessing unit, which is used to digitize the analog signals collected by the sensor and perform preliminary data preprocessing, such as filtering and amplification. It usually uses high-performance analog-to-digital converters (ADCs) and digital signal processors (DSPs) to quickly and accurately process large amounts of real-time data. Hardware devices such as field programmable gate arrays (FPGAs), graphics processing units (GPUs) or dedicated neural network processors (NPUs) are used. FPGAs have high flexibility and parallel processing capabilities and can quickly realize hardware acceleration of neural networks; GPUs have advantages in large-scale matrix operations and are suitable for training deep neural networks; NPUs are chips specially designed for neural network calculations, with the characteristics of high efficiency and low power consumption. In addition, random access memory (RAM) is used to temporarily store data, and flash memory (Flash) is used to store model parameters and important data for a long time. Ethernet interface, serial port, etc. are used to exchange data with other equipment in the industrial production system, transmit the prediction results of the multivariable mapping module to the production control system, and realize real-time control of the industrial production process.

[0054] Based on the above hardware components, Experiment 1 was designed to verify the positive and beneficial effects of the multivariable mapping module over the traditional method. The experiment was divided into two groups: Group A applied the multivariable mapping module, and Group B used the traditional PID controller. Each group conducted five experiments, and the key parameter changes and final results of each experiment were recorded. The traditional method (Group B) adopted the traditional control method based on the proportional-integral-differential (PID) controller. The PID controller controls the output of the system by adjusting three parameters (proportional P, integral I, differential D) to achieve the desired target value. This method is widely used in industrial control systems, but due to its linear assumptions and fixed parameter settings, it is difficult to cope with complex nonlinear relationships and dynamically changing working conditions.

[0055] The effects of multivariable mapping module (Group A) and traditional PID controller (Group B) on temperature, carbon content and furnace pressure control in chemical production processes were compared. The experiments were set up in the same hardware environment, including the same sensor configuration and actuators. Each experiment lasted for 2 hours, during which the changes in temperature, carbon content and furnace pressure were recorded every 5 minutes, and the average error and maximum deviation were calculated. The experimental conditions were kept consistent to ensure the validity and reliability of the comparison results. The key parameters were recorded every 5 minutes, and the average error and maximum deviation were calculated after the experiment. The recording process was repeated five times, and the record table is shown in Table 1:

[0056] Table 1 Multivariate mapping module comparison experiment record

[0057]

[0058] Through the comparative experiment of the multivariable mapping module (Group A) and the traditional PID controller (Group B) under the same experimental conditions, it can be clearly seen that the multivariable mapping module has significant advantages in control accuracy and stability. According to the experimental record table, the average errors of temperature, carbon content and furnace pressure of Group A are only 0.8℃, 0.6% and 1.2kPa, respectively, while those of Group B are 2.5℃, 2.0% and 3.5kPa, respectively. In addition, the maximum deviation of Group A is also significantly lower than that of Group B, indicating that the multivariable mapping module can control key parameters more accurately and reduce the fluctuation range. This not only improves the quality stability of the product, but also reduces the risk caused by parameter loss of control. Therefore, the multivariable mapping module performs well in handling complex multivariable coupling relationships and dynamically changing working conditions, providing a more intelligent and reliable solution for modern industry.

[0059] It can be seen from the embodiment that, compared with the traditional linear model, the multivariate mapping module can accurately learn the complex nonlinear mapping relationship between multiple variables based on the deep belief network. Variables in the industrial production process often have complex interactions, and the traditional linear model cannot capture these relationships. The deep belief network can more accurately describe and predict the changes in variables through multi-layer nonlinear transformations, thereby improving the accuracy of production control. Through the stacking and pre-training of multi-layer restricted Boltzmann machines, the multivariate mapping module can automatically extract abstract features of different levels from the original industrial data. These features can more effectively reflect the inherent structure and laws of the data. Compared with the manual feature extraction method, it not only saves a lot of manpower and time, but also can extract more representative features and improve the performance of the model. In addition, the multivariate mapping module has adaptive learning capabilities, and can continuously adjust the model parameters according to the industrial production data collected in real time to adapt to changes in the production process. For example, when the distribution of industrial data changes due to factors such as aging of production equipment and changes in raw materials, the module can timely optimize the model through a fine-tuning mechanism to maintain accurate monitoring and prediction of the production process. Secondly, the module can process multiple industrial production variables at the same time, and comprehensively consider the coupling relationship between variables. Traditional methods can only process a single variable or simply consider the relationship between a few variables, which cannot meet the needs of modern industrial production for multi-variable collaborative control. The multi-variable mapping module provides more comprehensive and accurate decision support for industrial production by building a multi-variable coupling model.

[0060] It also includes: a decoupling control module, which is used to separate the coupled variables into independent components based on the multivariable coupling model through an independent component analysis algorithm, and then predict the optimal control parameters of each variable at a future time according to current and historical data through a predictive control algorithm optimized in a rolling time domain, and output optimized control instructions to the actuator; Figure 3 As shown, the decoupling control module includes an independent component analysis unit, a prediction model construction unit, a rolling time domain optimization unit and an instruction output unit; the independent component analysis unit uses an independent component analysis algorithm to find a separation matrix through centralization, whitening and iterative optimization, separates the coupled variables of the smart street lamp into independent components, and outputs independent variable component data; the prediction model construction unit builds a prediction model based on independent variable component data and historical data through a time series analysis method, learns the law of variable change, and outputs variable future state prediction data to the rolling time domain optimization unit; the rolling time domain optimization unit combines the operating goals and constraints during the operation of the smart street lamp, solves them in the control time domain through a rolling time domain optimization algorithm, and outputs the optimal control parameters at the current moment to the instruction output unit; the instruction output unit outputs control instructions to the industrial equipment actuator through an actuator interface protocol conversion method.

[0061] like Figure 4 As shown, the working method of the independent component analysis algorithm is: based on the coupling variables in the operation process of the smart street lamp output by the multivariable coupling model, first remove the mean in the data through centralization and whitening preprocessing, and make the covariance matrix of the data become a unit matrix; then introduce negative entropy to continuously iteratively optimize the objective function for separating independent components to obtain the separation matrix; the negative entropy is used to measure the degree of deviation of the data distribution from the Gaussian distribution; in each iteration, the separation matrix is ​​updated by the gradient ascent algorithm, and if the change of the negative entropy value in multiple consecutive iterations is less than the preset threshold, the algorithm is considered to converge.

[0062] The working method of the rolling horizon optimization predictive control algorithm is as follows: First, define the prediction horizon N p and control time domain N c , where N p ≤N c ; The prediction time domain N p It is used to determine the time span for predicting the future variable state. The control time domain is used to determine the length of each calculation of the optimal control sequence. A dynamic prediction equation is constructed based on a multivariable coupling model to predict the future N p The state of each variable at each moment; at each sampling moment, the state space model of the smart street lamp is x k+1 =f(x k ,u k ), where x k is the system state vector at time k, containing the independent variable components, u k is the control input vector at time k; the system state at each future moment is calculated by iteration, and the formula is:

[0063] x k+l|k =f(x k+l-1|k ,u k+i-1|k )(i=1,2,...,N p ) (2)

[0064] In formula (2), x k+l|k represents the system state at time k+l predicted based on the information at time k, u k+i-1|k is the control input at time k+i-1 calculated based on the information at time k; then, define the smart street light operation objective function J to balance the impact of product quality, energy consumption and control input changes; solve the optimization problem of the smart street light operation objective function J through the interior point method to obtain the optimal control sequence at the current moment During the solution process, if the algorithm converges to a solution that meets the preset accuracy requirements, the first control variable u in the optimal control sequence at the current moment is k|kAs the control parameter output at the current moment; after each sampling cycle, the prediction time domain and control time domain are rolled forward by one sampling cycle, and the prediction and optimization solution are re-performed to adapt to the real-time dynamic changes of the industrial process.

[0065] In the specific implementation, first of all, Independent Component Analysis (ICA) is a statistical method that aims to extract potential, statistically independent signal sources from multivariate observation data. In the smart control box dedicated to smart street lights, the ICA algorithm is used to decouple the control module to separate independent control variables. The basic assumption of ICA is that the observation data is generated by a set of unknown independent signal sources through a linear mixing process. The goal of the algorithm is to find a linear transformation matrix so that the components of the transformed data are as statistically independent as possible. This is usually achieved by maximizing non-Gaussianity (such as kurtosis) or minimizing mutual information. The ICA algorithm usually includes the following steps: data preprocessing (such as centering, whitening), selecting appropriate nonlinear functions, and iterative optimization algorithms (such as FastICA algorithm) to find the optimal transformation matrix. Finally, the obtained transformation matrix is ​​used to decompose the observation data into independent components.

[0066] During implementation, the independent component analysis unit first collects real-time data during the operation of smart street lights through sensors and preprocesses it to meet the requirements of the ICA algorithm. Then, the ICA algorithm is used to decompose the data to obtain independent control variables. These variables are then used in the subsequent rolling time domain optimization predictive control algorithm. In addition, the ICA algorithm is usually integrated in the processor of the smart control box dedicated to smart street lights. The processor is responsible for performing the calculation tasks of the ICA algorithm, including data preprocessing, matrix operations, nonlinear function calculations, etc. At the same time, the control box also includes the necessary input and output interfaces for communicating with sensors and other control modules.

[0067] Compared with the existing technology, the ICA algorithm reduces the coupling effect between variables by separating independent control variables in smart street light control, thereby improving the accuracy and stability of the control system. In addition, the ICA algorithm can handle nonlinear mixed processes, so that the control system can still maintain stable performance when facing complex working conditions and uncertainties. Secondly, since the ICA algorithm provides independent control variables, it can simplify the controller design process and reduce the complexity of the control system.

[0068] The prediction model building unit uses advanced machine learning algorithms and time series analysis techniques, such as recurrent neural networks (RNN), long short-term memory networks (LSTM) or gated recurrent units (GRU), to model the temporal dependencies between variables. It can not only make accurate predictions of future states, but also provide an important basis for rolling time domain optimization, enabling the system to maintain good tracking performance in the face of uncertainty and interference.

[0069] MPC is a method based on model predictive control, which predicts the future system state based on the model and optimizes the control input according to the predetermined performance indicators. In the smart control box for smart street lights, the RHO algorithm is used to decouple the control module to achieve optimal control of independent components.

[0070] The basic idea of ​​the RHO algorithm is to calculate the optimal control sequence within a finite time window at each sampling moment based on the current system state and the prediction model. Then, only the first control action of the sequence is implemented, and the process is repeated at the next sampling moment. This rolling optimization method enables the control system to adapt to changes and uncertainties in the system state.

[0071] In terms of operation logic, the RHO algorithm usually includes the following steps: establishing a prediction model, defining performance indicators, solving optimization problems, and implementing control actions. Among them, the prediction model is used to predict the future system state, the performance indicators are used to evaluate the quality of the control sequence, and the optimization problem is a constrained optimization problem, which is usually solved by quadratic programming or nonlinear programming techniques.

[0072] During implementation, the rolling time domain optimization unit first uses the independent components obtained by the ICA algorithm as the input variables of the RHO algorithm. Then, a prediction model is established based on historical data and system dynamics, and appropriate performance indicators are defined. At each sampling moment, the RHO algorithm is used to calculate the optimal control sequence and implement the first control action. This process is repeated at each sampling moment to achieve rolling optimization. The RHO algorithm is also integrated in the processor of the smart control box dedicated to smart street lights. The processor is responsible for executing the calculation tasks of the RHO algorithm, including prediction model calculation, performance indicator evaluation, optimization problem solving, etc. At the same time, the control box also includes the necessary input and output interfaces for communicating with the actuator and the host computer.

[0073] Compared with existing technologies, in smart street light control, the RHO algorithm can handle changes and uncertainties in system states, allowing the control system to flexibly adjust control strategies when facing complex working conditions. Through the use of rolling optimization and prediction models, the RHO algorithm can accurately predict and optimize system states, thereby improving control performance. In addition, the structure of the RHO algorithm allows it to be easily integrated and expanded with other control algorithms and modules to meet more complex control system requirements.

[0074] The final command output unit is responsible for sending the optimized control instructions to the actuators, such as valves and pumps, to achieve effective control of the industrial process. At the same time, the command output unit also establishes a perfect feedback mechanism to monitor the working status of the actuators in real time, such as position, flow and other parameters. If any abnormal situation or deviation exceeds the allowable range, the alarm mechanism will be triggered immediately to remind the control system to take corresponding measures, such as adjusting parameter settings or starting backup plans to ensure the stability and reliability of the system. It not only ensures the effective transmission of control instructions, but also enhances the closed-loop control capability of the system, and improves the overall response speed and control accuracy.

[0075] In the specific implementation, the decoupling control module is first connected to various types of sensors through high-speed communication interfaces (such as EtherCAT, Profinet, etc.) to obtain key parameters such as temperature, carbon content, furnace pressure, etc. in real time. After preliminary processing, these data are transmitted to the central processing unit (CPU) through industrial-grade network protocols (such as Modbus TCP / IP) to provide a basis for subsequent analysis. Considering that there may be a large number of sensors and actuators in the industrial environment, the module is designed with a set of distributed edge computing nodes (DEC Nodes) for local data processing and decision making. Each DEC node has a built-in miniaturized AI engine that can perform preliminary data cleaning, aggregation, and feature extraction locally, reducing dependence on the central processing unit and improving the overall response speed. In order to adapt to the ever-changing working conditions, the module supports online learning and model update functions. Synchronizing the latest model through the cloud allows the remote expert team to fine-tune the control logic according to the latest data to ensure that the system is always in the best performance state. This approach not only improves the flexibility and adaptability of the model, but also enhances the intelligence level of the system.

[0076] During implementation, the hardware working environment of the decoupling control module in the smart control box for smart street lights mainly includes: processor, sensor, actuator, input and output interface, power module and storage module; Design Experiment 2, select a group of identical industrial equipment, and apply the decoupling control module (Group A) and the traditional PID control method (Group B) for comparative experiments. Both groups of experiments were carried out under the same experimental conditions, including the same equipment status, working conditions and external environment. Each group conducted five experiments, and recorded the key indicators of control accuracy, response time, and stability for each experiment. During the experiment, Group A used the decoupling control module for independent component analysis and rolling time domain optimization predictive control, while Group B used the traditional PID control method. The experimental record table is shown in Table 2:

[0077] Table 2 Decoupling control module comparison experiment record

[0078]

[0079] By comparing the data in the experimental record table, it can be seen that Group A (decoupling control module) is superior to Group B (traditional PID control method) in terms of control accuracy, response time and stability. Group A has higher control accuracy and a smaller error range; shorter response time, which can respond to system changes more quickly; better stability and smaller standard deviation, indicating smaller system fluctuations. Therefore, the application of the decoupling control module in the smart control box for smart street lights can significantly improve the performance of the control system and has a positive and beneficial effect.

[0080] Compared with the existing technology, the decoupling control module can accurately separate the independent signal sources in the system through independent component analysis, thereby avoiding the control error caused by variable coupling in the traditional control method. The combination of the prediction model construction unit and the rolling time domain optimization unit enables the decoupling control module to maintain stable control performance in the presence of uncertainty and interference. In addition, the decoupling control module can dynamically adjust the control parameters according to the real-time status and historical data of the system to adapt to the control requirements under different working conditions. Secondly, each unit of the decoupling control module is relatively independent, so it can be easily expanded and upgraded according to actual needs to adapt to more complex control systems.

[0081] A real-time multi-task scheduling module is used to receive demands from different industrial tasks, dynamically allocate CPU resources according to the priority and deadline of the task through a flexible time slice allocation mechanism, and output the task execution status and resource usage; the real-time multi-task scheduling module includes a task parsing module, a priority evaluation module, a strategy allocation module and an allocation execution module; the task information parsing module is used to receive demand information from different industrial tasks, disassemble and analyze the data carried by the task including the task type, expected execution time, resource demand type and quantity through a data structure parsing method, and output it to the priority evaluation module; the priority evaluation module constructs a task priority evaluation model through a fuzzy hierarchical analysis method, analyzes the task and outputs the task priority to the strategy allocation module; the strategy allocation module is used to adopt a flexible time slice allocation mechanism, and through a time slice allocation algorithm based on linear programming, maximizes the overall efficiency of the system and meets the task deadline as the objective function, takes the task priority, expected execution time, and resource demand as constraints, constructs a linear programming model and solves the optimal allocation strategy; the allocation execution and monitoring module allocates CPU resources to each task according to the allocated time slice through a multi-level feedback queue scheduling algorithm based on the output strategy of the strategy allocation module.

[0082] The working steps of the flexible time slice allocation mechanism include:

[0083] Step 1: Define the task set T = {T 1 ,T 2 ,...,T n}, for each task T r , let task T r The priority of task P r , Task T r The estimated execution time is D r , the resource demand vector is R r = {R r1 ,R r2 ,...,R rm}, let R rj Represents task T r The demand for the jth resource includes CPU, memory, and specific sensor data flow. At the same time, the task correlation factor matrix A = {a rj}, where a rj Represents task T r With T J The degree of correlation between them and the task real-time coefficient u is defined r , used to measure the task's requirements for timely data processing;

[0084] Step 2: Considering the completion status, priority, correlation and real-time factors of the tasks, define the overall efficiency index E of the system. The formula is:

[0085]

[0086] In formula (3), F r Represents task T r The actual completion time of r Represents task T r Deadline:

[0087] Step 3: For each resource j, resource constraints, time constraints and association constraints are performed through resource evaluation, time compliance judgment and task management analysis;

[0088] Step 4: Use the interior point method to solve the optimal time slice allocation strategy; in the solution process, continuously iterate and adjust the time slice allocation plan {t 1 ,t 2 ,...,t n}, each iteration calculates the value of the objective function E and compares it with the result of the previous iteration. If the difference between the two calculation results is less than the preset threshold, the algorithm is judged to have converged and the optimal time slice allocation strategy is obtained;

[0089] Step 5: pass the obtained optimal time slice allocation strategy to the CPU scheduler, triggering the CPU scheduler to allocate CPU time slices to each industrial task according to this strategy.

[0090] In a specific embodiment, the task information parsing module first converts the key parameters in the task description (including task type, estimated execution time, resource requirement type and quantity, etc.) into structured data by parsing the input industrial task requirement information. The module uses data structure parsing methods, such as hash tables or tree structures, to quickly extract and store key task information and provide standardized input for subsequent scheduling algorithms.

[0091] The priority evaluation module calculates the task priority through the Fuzzy Analytic Hierarchy Process (FAHP). FAHP decomposes the decision-making process of task priority into multiple criteria layers (such as task urgency, deadline, and resource consumption) by establishing a hierarchical model. Fuzzy logic is used to deal with the uncertainty in task information, such as the estimated error of task execution time. Finally, FAHP outputs the priority score of each task to guide the resource allocation strategy.

[0092] The core of the elastic time slice allocation mechanism is to dynamically adjust the allocation duration of CPU resources according to the task priority. In industrial scenarios with high task diversity, the traditional fixed time slice scheduling mechanism can easily cause low-priority tasks to occupy too many resources or high-priority tasks to fail to receive timely responses. The elastic time slice mechanism dynamically adjusts the time slice length through a linear programming-based time slice allocation algorithm to improve the resource utilization efficiency of high-priority tasks while ensuring that low-priority tasks are not completely deprived of resources.

[0093] When determining multi-dimensional constraints, the elastic time slice allocation mechanism uses the total resource evaluation technology to accurately evaluate the total amount of various resources in the smart control box for smart street lights, such as CPU, memory, and specific sensor data traffic, and clearly define the upper limit of each resource. Then, with the help of task resource demand analysis technology, the demand for different resources for each task is deeply analyzed. On this basis, through the resource allocation rationality judgment logic, it is judged whether the sum of the demand for each resource of all tasks exceeds the total amount that the system can provide. If it exceeds, it means that the resource allocation is unreasonable, and the time slice allocation strategy needs to be adjusted to ensure the sustainable use of system resources and the smooth execution of tasks; if it does not exceed, it is considered that the resource allocation is within a reasonable range at the current stage.

[0094] In terms of time constraints, task time planning technology is used to set the start time and allocate the corresponding time slice length for each task based on the expected execution time and deadline of each task. Through the time compliance judgment logic, check whether the start time of the task plus the allocated time slice length is within the deadline. If it exceeds the deadline, the time slice adjustment mechanism is triggered to re-evaluate the priority of the task, resource requirements and other factors, and make reasonable adjustments to the time slice to ensure that the task can be completed on time; if it is within the deadline, the current time slice allocation plan is maintained, but the progress of task execution is continuously monitored to prevent unexpected situations that lead to time overruns.

[0095] Considering the relationship between tasks, we use task association analysis technology to identify the dependencies between tasks and determine the order of tasks. For tasks with an associated relationship, we use the associated task execution order judgment logic to ensure that the dependent task starts executing only after the dependent task is completed. That is, we determine whether the start time of the dependent task is greater than or equal to the start time of the dependent task plus the length of the time slice required for its execution. If this condition is not met, we adjust the start time and time slice allocation of the dependent task to ensure the correctness of the task execution order and avoid system failures or production delays caused by disordered task order; if the condition is met, we advance the task execution according to the established plan and continue to track the execution status of the associated tasks to ensure the smooth operation of the entire task chain.

[0096] In the elastic time slice allocation mechanism, the interior point method transforms the time slice allocation problem into an optimization problem subject to resource, time and association constraints, with the goal of maximizing the overall efficiency index of the system. The interior point method gradually approaches the optimal solution by finding a path within the feasible domain. In each iteration, the value of the objective function is calculated based on the current time slice allocation plan and compared with the result of the previous iteration. If the difference between the two calculation results is less than the preset threshold, it means that the algorithm has converged, and the time slice allocation plan obtained at this time is the optimal strategy. This iterative solution method can find the time slice allocation plan that satisfies the overall optimal system under complex constraints. The time slice allocation algorithm based on linear programming constructs an optimization model with the goal of maximizing the overall efficiency of the system. The constraints include:

[0097] 1. The total time slice allocated for a task cannot exceed the total amount of system resources.

[0098] 2. The time slice allocation for each task must meet its minimum resource requirements.

[0099] By solving the linear programming model, the optimal time slice allocation plan is output so that high-priority tasks can obtain more resources while considering the deadlines of all tasks.

[0100] 3. Technical principles and operation logic of allocation execution and monitoring

[0101] The allocation execution module allocates time slices through a multi-level feedback queue scheduling algorithm. The algorithm dynamically adjusts the priority of tasks in the queue according to the task execution status. For example, high-priority tasks maintain a shorter rotation time in the queue, while low-priority tasks gradually sink to queues with longer time slices. The real-time monitoring mechanism provides data support for dynamic adjustment by periodically recording the task execution status and resource utilization.

[0102] During implementation, the task parsing module needs to be equipped with a high-performance processor (such as the ARM Cortex series) to implement task parsing and linear programming calculations. In addition, FPGA or GPU is used to accelerate FAHP and linear programming algorithms to improve real-time performance. Secondly, an embedded real-time operating system (such as FreeRTOS) is configured to support multi-task scheduling, and a high-speed communication interface (such as CAN or Ethernet) is integrated to interact with the task executor. Equipped with non-volatile memory (such as NAND Flash) to save task history data and system logs, providing a basis for system optimization.

[0103] Compared with the existing technology, the evaluation model based on FAHP not only takes into account the rigid requirements of the task, but also processes the uncertainty of task parameters through fuzzy logic to improve the scientific nature of priority evaluation. In addition, the flexible time slice mechanism combined with linear programming optimization ensures the response speed of high-priority tasks while avoiding the "hunger" problem of resource allocation. Secondly, the multi-level feedback queue scheduling algorithm adjusts the priority in real time according to the task execution status to improve the system robustness and task processing efficiency. Compared with the traditional fixed time slice scheduling method, this scheme significantly improves the resource utilization efficiency and task response speed, and is particularly suitable for multi-task complex industrial environments. Its flexible priority evaluation and resource allocation strategy ensures that key tasks are completed on time while reducing the impact on low-priority tasks, providing a better solution for intelligent street light control.

[0104] Experiment 3 was designed to simulate the chemical production process. A set of experimental equipment with temperature, pressure and flow control was selected. Multiple real-time tasks were set, such as temperature monitoring and regulation, pressure safety control, flow ratio adjustment, etc. Group A applied a real-time multi-task scheduling module, which used the interior point method to calculate the optimal time slice allocation strategy for task scheduling based on the priority, expected execution time, resource requirements, task association and real-time requirements of the task. Group B adopted a fixed priority scheduling algorithm. Each task was pre-assigned a fixed priority. During the scheduling process, tasks with high priority always had priority to obtain CPU resources for execution. When a high-priority task is ready, it will seize CPU resources regardless of the current execution status of the low-priority task. Under the same initial conditions and experimental environment, each group conducted five experiments. Each experiment recorded the average completion time of the task, the number of times the task missed the deadline, and the overall resource utilization of the system to compare the performance of the two scheduling methods. The experimental record table is shown in Table 3:

[0105] Table 3 Real-time multi-task scheduling module comparison experiment record

[0106]

[0107] From the experimental data, it can be seen that Group A (using the real-time multi-task scheduling module) is significantly better than Group B in terms of average task completion time, and the average completion time is shortened by about 7-12 seconds. In addition, the number of times that Group A tasks missed the deadline was 0, while Group B missed the deadline about 2 times on average per experiment, indicating that Group A can better ensure the real-time performance of tasks. In terms of system resource utilization, Group A is also about 13-19 percentage points higher than Group B, indicating that the real-time multi-task scheduling module can allocate resources more reasonably and improve resource utilization efficiency. Overall, compared with the traditional fixed priority scheduling algorithm, the real-time multi-task scheduling module has significant positive and beneficial effects in task execution efficiency, real-time performance guarantee and resource utilization.

[0108] The priority dynamic evaluation module is used to monitor the execution of tasks in the system in real time through the resource allocation graph algorithm, detect priority inversion, and resolve priority inversion. Figure 5 As shown in FIG, the detection method of the resource allocation graph algorithm for detecting priority inversion is as follows: first, through the real-time state perception mechanism, the resource request, holding and release information of each industrial task (such as equipment inspection tasks, production process control tasks, etc.) and the allocation status data of various resources (such as CPU computing power, storage capacity, etc.) are continuously collected. Based on these data, a resource allocation graph is created using a graph construction algorithm. In this graph, each task and resource is taken as a node, and the relationship between them is represented by directed edges: the edge from the task node to the resource node means that the task makes a request for the corresponding resource; the edge from the resource node to the task node indicates that this resource has been allocated to the task. After the graph is constructed, the resource allocation graph is traversed and analyzed using an improved depth-first search (DFS) ring detection algorithm. During the traversal process, an access status mark is set for each node. When accessing a node, if the node has been marked as being accessed and the current path forms a ring, it is determined that a priority inversion may have occurred. Because in the operation logic of the smart street lamp, this ring may indicate that a high-priority task is blocked by resources occupied by a low-priority task, resulting in a priority inversion. If a possible priority inversion is detected, the causal tracing algorithm is used to deeply trace back the task and resource interaction process that forms the ring. Starting from a certain node in the ring, the specific operation steps and reasons that lead to the formation of the ring are gradually analyzed based on the request and allocation records between the task and the resource. For example, it is determined whether it is caused by unreasonable resource preemption of a certain task or temporary imbalance of the resource allocation strategy. After completing the causal tracing, the detailed information of the priority inversion, including the data such as the tasks, resources and possible causes involved, is output to the resolution strategy module based on heuristic search, so that the module can formulate and implement an effective priority inversion resolution strategy based on this precise information, ensure the normal priority order of task execution in the smart control box dedicated to smart street lights, and maintain stable and efficient operation of the system. If the ring structure is not detected, the resource allocation diagram is continuously monitored in real time, and the above process is repeated continuously to capture possible priority inversion situations in a timely manner.

[0109] Among them, the improved depth-first search algorithm introduces a dual-state marking mechanism based on the traditional DFS algorithm. When traversing the nodes of the resource allocation graph, the traditional DFS only uses one state to mark whether the node has been visited. In this application scenario, the improved algorithm sets two state marks for each node: "visiting" and "completed visit".

[0110] When a node is accessed, it is marked as "accessing" through a status update operation. Then, the adjacent nodes of the node are recursively accessed according to the edge structure of the resource allocation graph. If a node marked as "accessing" is encountered during the recursive access process, it means that a loop is formed from the current node, that is, a loop is detected. Because in the resource allocation logic of smart street lights, a loop in the resource allocation graph may mean that a high-priority task is blocked by the resources occupied by a low-priority task, and then it is judged that a priority inversion may have occurred.

[0111] After visiting all the adjacent nodes of the current node, the current node is marked as "visited" through state transition operation to avoid repeated visits and improve search efficiency. This dual-state marking mechanism enables the improved DFS algorithm to more accurately detect ring structures in complex resource allocation graphs, realize efficient judgment of the possibility of priority inversion, and provide key basis for subsequent causal analysis and priority inversion resolution.

[0112] Further, such as Figure 6 As shown in Figure 1, once the resource allocation graph algorithm detects a priority inversion, the heuristic search-based resolution strategy will be executed according to the following logic:

[0113] First, through the task information acquisition mechanism, the remaining execution time, resource occupancy, and related tasks of the low-priority task involved in the priority inversion are accurately obtained. If it is judged that the remaining execution time of the low-priority task is lower than the preset threshold, and the resources occupied by the task are not competed by other urgent tasks, and its operation will not cause a chain reaction of negative impact on other key tasks (judged by the task impact assessment algorithm), the busy waiting strategy is adopted. That is, the high-priority task is put into a busy waiting state, and the execution status of the low-priority task is continuously monitored until the low-priority task is completed and the resources occupied by it are released, so that the high-priority task can obtain resources and continue to execute, thereby eliminating the priority inversion and ensuring the efficiency and stability of the operation of the smart street lamp. If it is judged that the remaining execution time of the low-priority task is higher than or equal to the preset threshold, the resource demand characteristics and system resource status of the task are further analyzed at this time. If the execution of the low-priority task has a strong dependence on certain specific resources, and these resources are relatively scarce in the system, and raising the priority of the task will not cause serious damage to the priority order of the overall production process (judged by the priority change impact assessment algorithm), the priority of the low-priority task is raised through the priority adjustment mechanism. Doing so enables the system scheduler to allocate more resources to the task first, prompting it to complete and release resources as soon as possible, unblocking high-priority tasks, and restoring the normal task execution priority order of the system. If it is not feasible to increase the priority of low-priority tasks, or there are alternative resources in the system, and these alternative resources can meet the basic needs of high-priority tasks (judged by the resource substitutability analysis algorithm), then perform resource reorganization operations. Through the resource reallocation algorithm, adjust other alternative resources to high-priority tasks, such as reallocating some memory resources or CPU time slices originally allocated to non-urgent tasks to high-priority tasks, so as to unblock high-priority tasks caused by resources being occupied by low-priority tasks, ensure that high-priority tasks can be executed smoothly, and then eliminate the priority inversion problem, and maintain the smooth execution of tasks in the smart control box dedicated to smart street lights. During the entire process of eliminating priority inversion, the execution status and resource allocation of tasks are continuously monitored. If new anomalies occur or priority inversion cannot be effectively resolved, the above judgment and elimination process is restarted until the problem is properly handled or a manual intervention prompt is triggered, notifying the operator to intervene and handle it, so as to avoid adverse effects on industrial production due to priority confusion.

[0114] In a specific embodiment, a resource allocation graph is a graph data structure used to represent the request and allocation relationship between tasks and resources. The nodes in the graph are divided into two categories: task nodes (representing the current task) and resource nodes (representing available resources). A directed edge from a task node to a resource node represents a resource request, and a directed edge from a resource node to a task node represents a resource allocation. Through this representation method, the dependency relationship between tasks and resources in the system can be intuitively described.

[0115] The essence of priority inversion is a deadlock phenomenon. When a high-priority task is blocked because a low-priority task holds resources, priority inversion occurs. In order to detect this phenomenon, the priority dynamic evaluation module uses depth-first search (DFS) to traverse the resource allocation graph:

[0116] During traversal, the access status flag is set for each node: unvisited, accessing, and visited. If a node in the accessing state is visited again during the traversal process and a loop is formed, it indicates that a priority inversion has occurred. In this way, the system can quickly identify the tasks and resources that cause priority inversion.

[0117] In implementation, the priority dynamic evaluation module works as follows:

[0118] (1) Real-time monitoring of tasks and resources: The system continuously monitors the execution of tasks and the allocation status of resources, and constructs a real-time resource allocation graph through a resource allocation graph generation algorithm.

[0119] (2) Detect priority inversion: Use the depth-first search algorithm to traverse the resource allocation graph. When a loop is detected, the system immediately determines the priority inversion problem and records the relevant task and resource information.

[0120] (3) Task information analysis: The module extracts the remaining execution time, resource usage details, and task dependencies of related tasks to provide a basis for selecting mitigation strategies.

[0121] (4) Execution resolution strategy: According to the remaining time of the task, select the busy waiting strategy or the priority adjustment and resource reorganization strategy to dynamically adjust the system resource allocation plan.

[0122] (5) Monitoring and adjustment: After the mitigation strategy is executed, the system continues to monitor changes in tasks and resources to ensure that the priority inversion problem is completely resolved and to prevent similar problems from happening again.

[0123] Compared with the existing technology, the detection method based on resource allocation graph and depth-first search can quickly locate the priority inversion problem, has high detection efficiency and is suitable for complex industrial systems. In addition, the module dynamically selects busy waiting or priority adjustment and resource reorganization strategies according to the execution status of low-priority tasks, avoiding the limitations of traditional fixed resolution methods. Secondly, through efficient hardware acceleration and dynamic adjustment mechanism, the module can maintain high real-time performance and stability in the high-load operation environment of smart street lights.

[0124] In the actual work of applying the priority dynamic evaluation module to the intelligent control box for smart street lights, its hardware working environment includes the following components:

[0125] High-performance embedded computing platforms: such as NVIDIA Jetson Xavier NX or Intel Movidius MyriadX VPU, which provide powerful computing capabilities and good scalability, and support the efficient operation of complex algorithms.

[0126] Rugged and durable industrial-grade housing: dustproof, waterproof and shock-resistant to ensure stable operation in harsh environments; internally equipped with an efficient heat dissipation system to ensure that it will not overheat during long-term operation.

[0127] High-speed communication interface: such as EtherCAT, Profinet, etc., used to connect various types of sensors and actuators to achieve real-time data acquisition and transmission.

[0128] Distributed Edge Computing Nodes (DEC Nodes): Equipped with a miniaturized AI engine, they can perform preliminary data processing and decision-making locally, reducing reliance on the central processor and improving response speed.

[0129] Standardized interface: Modules are connected to each other through standardized interfaces, which facilitates maintenance and upgrades.

[0130] A set of hardware was selected and a comparative experiment was conducted under the same experimental conditions to verify the positive and beneficial effects of the priority dynamic evaluation module over the traditional method. The experiment was divided into two groups: Group A applied the real-time priority dynamic evaluation module, and Group B used the traditional fixed priority scheduling method. Each group conducted five experiments, and the key parameter changes and final results of each experiment were recorded. Among them, the method of Group B assigned a fixed priority to each task, and high-priority tasks were always executed before low-priority tasks. Although simple and easy to implement, it is easy to cause high-priority tasks to be unable to respond in time due to the occupation of resources by low-priority tasks in the case of multi-task concurrency, which in turn causes priority inversion problems and affects the response speed and stability of the system.

[0131] Each experiment lasted for 2 hours, during which the changes in key parameters were recorded every 5 minutes, and the average response time and maximum deviation were calculated. The experimental conditions were kept consistent to ensure the validity and reliability of the comparison results. The experimental data record table is shown in Table 4:

[0132] Table 4 Priority dynamic evaluation module experimental comparison data record table

[0133]

[0134]

[0135] Through the comparative experiment of the priority dynamic evaluation module (Group A) and the traditional fixed priority scheduling method (Group B) under the same experimental conditions, it can be clearly seen that the priority dynamic evaluation module has significant advantages in handling priority inversion. According to the experimental record table, the average response time of Group A is 80ms, the maximum response time deviation is 127ms, the CPU utilization rate is 75%, and the resource utilization efficiency is as high as 92%; while the average response time of Group B is 150ms, the maximum response time deviation is 255ms, the CPU utilization rate is 85%, and the resource utilization efficiency is only 80%. This shows that the priority dynamic evaluation module can not only respond to high-priority tasks more quickly, but also effectively avoid the occurrence of priority inversion, and improve the overall performance and stability of the system. Therefore, the priority dynamic evaluation module provides a more intelligent and reliable solution for modern industry, greatly improving production efficiency and product quality.

[0136] In implementation, the module quickly identifies and effectively resolves priority inversions, ensuring that high-priority tasks can be completed in a timely manner and improving system operation efficiency. Through resource reorganization strategies, the module reduces waste caused by resource contention and improves the utilization efficiency of system resources. The dynamic adjustment mechanism reduces conflicts and delays in task scheduling and improves the operational reliability of smart street lights.

[0137] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that these specific embodiments are only illustrative, and those skilled in the art may omit, replace, and change the details of the above methods and systems in various ways without departing from the principles and essence of the present invention. For example, merging the above method steps so as to perform substantially the same functions in substantially the same manner to achieve substantially the same results is within the scope of the present invention. Therefore, the scope of the present invention is limited only by the appended claims.

Claims

1. A smart control box for smart street lamps, characterized by: include: Multivariable mapping module, decoupling control module, real-time multitasking scheduling module and priority dynamic evaluation module; The multivariable mapping module is used to take real-time data during the operation of the smart street lamp as input, including but not limited to light intensity, ambient temperature and humidity, pedestrian flow and traffic conditions; Through deep belief network learning the nonlinear mapping relationship between multiple variables, a multivariable coupling model is constructed to identify the nonlinear relationship and change trend between variables; The decoupling control module is used to separate the coupled variables into independent components based on the multivariable coupling model through an independent component analysis algorithm, and then predict the optimal control parameters of each variable at a future time according to current and historical data through a predictive control algorithm optimized in a rolling time domain, and output the optimized control instructions to the actuator; The real-time multi-task scheduling module is used to receive requirements from different industrial tasks, dynamically allocate CPU resources according to the priority and deadline of the task through a flexible time slice allocation mechanism, and output the task execution status and resource usage; The priority dynamic evaluation module is used to monitor the execution status of tasks in the system in real time through a resource allocation graph algorithm, detect priority inversion, and resolve the priority inversion.

2. According to claim 1, the intelligent control box for smart street lamps is characterized by: The learning method of the deep belief network for learning the nonlinear mapping relationship between multiple variables is as follows: first, a network structure is constructed by stacking multiple layers of restricted Boltzmann machines (RBMs), and each layer of RBM is pre-trained by a contrastive divergence algorithm. The contrastive divergence algorithm initializes the visible layer state, calculates the activation probability of the hidden layer nodes according to the energy function, obtains the hidden layer state by sampling, and then uses the hidden layer state as input to reversely calculate the reconstruction state of the visible layer, and optimizes the parameters of the RBM by minimizing the difference between the reconstruction error and the original input, so that the RBM learns the local features of the industrial data; during the pre-training process, the hidden layer of the lower RBM is used as the visible layer of the upper RBM, so that the network extracts different levels of abstract features from the original data; After the pre-training is completed, the deep belief network is optimized through a fine-tuning mechanism; the fine-tuning mechanism connects the deep belief network to the Softmax regression layer, uses a back-propagation algorithm, takes the nonlinear mapping relationship between multiple variables as the objective function, calculates the error between the predicted value and the true value, and adjusts the parameters of all layers in the network through a gradient descent algorithm. If the error reaches the preset accuracy requirement, the training is stopped, otherwise the parameters are continuously adjusted until the accuracy requirement is met.

3. The intelligent control box for smart street lamps according to claim 2 is characterized in that: The formula expression of the energy function is: In formula (1), v represents the visible layer node state vector; vi represents the state of the i-th visible layer node, representing a certain state of different variables of industrial equipment, with a value of 1 or 0; h represents the hidden layer node state vector; hj represents the state of the j-th hidden layer node, which is used to mine potential feature patterns in multivariate data; n v Represents the number of visible layer nodes, corresponding to the number of variables n monitored and analyzed in industrial equipment h represents the number of hidden layer nodes; a i represents the bias parameter of the visible layer node i; b represents the bias parameter of the hidden layer node j, which is used to adjust the difficulty of activating the hidden layer node j; w ii n represents the weight parameter connecting the visible layer node i and the hidden layer node j, which is used to determine the strength of the association between the visible layer variable and the hidden layer feature; c represents the number of additional constraints introduced to combine specific knowledge or constraints of industrial equipment; c k Represents the weight of the kth constraint, which is used to adjust the constraint n c The degree of influence on the energy function; f k (v, h) represents the kth constraint function, which is defined based on the visible and hidden layer states.

4. According to claim 1, the intelligent control box for smart street lamps is characterized by: The decoupling control module includes an independent component analysis unit, a prediction model construction unit, a rolling time domain optimization unit and an instruction output unit; the independent component analysis unit uses an independent component analysis algorithm to find a separation matrix through centering, whitening and iterative optimization, separates the coupled variables into independent components, and outputs independent variable component data; the prediction model construction unit builds a prediction model based on independent variable component data and historical data through a time series analysis method, learns the law of variable change, and outputs variable future state prediction data to the rolling time domain optimization unit; the rolling time domain optimization unit combines the operating objectives and constraints of the industrial equipment, solves in the control time domain through a rolling time domain optimization algorithm, and outputs the optimal control parameters at the current moment to the instruction output unit; the instruction output unit outputs control instructions to the industrial equipment actuator through an actuator interface protocol conversion method.

5. According to claim 1, the intelligent control box for smart street lamps is characterized by: The working method of the independent component analysis algorithm is as follows: based on the industrial equipment coupling variables output by the multivariable coupling model, firstly, the mean value in the data is removed by centralization and whitening preprocessing, and the covariance matrix of the data is changed into a unit matrix; then, negative entropy is introduced to continuously iteratively optimize the objective function for separating independent components, and obtain the separation matrix; the negative entropy is used to measure the degree of deviation of the data distribution from the Gaussian distribution; In each iteration, the separation matrix is ​​updated by the gradient ascent algorithm. If the change of the negative entropy value in multiple consecutive iterations is less than a preset threshold, the algorithm is considered to have converged.

6. The intelligent control box for smart street lamps according to claim 1 is characterized in that: The working method of the rolling horizon optimization predictive control algorithm is as follows: First, define the prediction horizon N p and control time domain N c , where N p ≤N c ; The prediction time domain N p It is used to determine the time span for predicting the future variable state, and the control time domain is used to determine the length of each calculation of the optimal control sequence; Based on the multivariable coupling model, a dynamic prediction equation is constructed to predict the future N p The state of each variable at each moment; at each sampling moment, the state space model of the industrial equipment is assumed to be x k+1 =T(x k ,u k ); where x k is the system state vector at time k, containing the independent variable components, u k is the control input vector at time k; the system state at each future moment is calculated by iteration, and the formula is: x k+l|k =f(x k+l-1|k ,u k+i-1|k )(i=1,2,...,N p ) (2) In formula (2), x k+l|k represents the system state at time k+l predicted based on the information at time k, u k+i-1|k The control input at time k+i-1 is calculated based on the information at time k; then, define the industrial equipment operation objective function J to balance the impact of product quality, energy consumption and control input changes; solve the optimization problem of the industrial equipment operation objective function J through the interior point method to obtain the optimal control sequence at the current moment During the solution process, if the algorithm converges to a solution that meets the preset accuracy requirements, the first control variable u in the optimal control sequence at the current moment is k|k As the control parameter output at the current moment; after each sampling cycle, the prediction time domain and control time domain are rolled forward by one sampling cycle, and the prediction and optimization solution are re-performed to adapt to the real-time dynamic changes of the industrial process.

7. The intelligent control box for smart street lamps according to claim 1 is characterized in that: The real-time multi-task scheduling module includes a task parsing module, a priority evaluation module, a strategy allocation module and an allocation execution module; the task information parsing module is used to receive the demand information of different industrial tasks, and disassemble and analyze the data carried by the task including the task type, expected execution time, resource demand type and quantity through the data structure parsing method, and output it to the priority evaluation module; the priority evaluation module constructs a task priority evaluation model through the fuzzy hierarchical analysis method, analyzes the task and outputs the task priority to the strategy allocation module; the strategy allocation module is used to adopt a flexible time slice allocation mechanism, and through a time slice allocation algorithm based on linear programming, maximizes the overall efficiency of the system and meets the task deadline as the objective function, takes the task priority, expected execution time and resource demand as constraints, constructs a linear programming model and solves the optimal allocation strategy; The allocation execution and monitoring module allocates CPU resources to each task according to the allocated time slices based on the output policy of the policy allocation module through a multi-level feedback queue scheduling algorithm.

8. The intelligent control box for smart street lamps according to claim 1 is characterized in that: The working steps of the flexible time slice allocation mechanism include: Step 1: Define the task set T = {T1, T2, ..., T n }, for each task T r , let task T r The priority of task P r , Task T r The estimated execution time is D r , the resource demand vector is R r = {R r1 , R r2 , ..., R rm }, let R rj Represents task T r The demand for the jth resource includes CPU, memory, and specific sensor data flow. At the same time, the task correlation factor matrix A = {a rj }, where a rj Represents task T r With T J The degree of correlation between them and the task real-time coefficient u is defined r , used to measure the task's requirements for timely data processing; Step 2: Considering the completion status, priority, correlation and real-time factors of the tasks, define the overall efficiency index E of the system. The formula is: In formula (3), F r Represents task T r The actual completion time of r Represents task T r Deadline: Step 3: For each resource j, resource constraints, time constraints and association constraints are performed through resource evaluation, time compliance judgment and task management analysis; Step 4: Use the interior point method to solve the optimal time slice allocation strategy; in the solution process, continuously iterate and adjust the time slice allocation scheme {t1, t2, ..., t n }, each iteration calculates the value of the objective function E and compares it with the result of the previous iteration. If the difference between the two calculation results is less than the preset threshold, the algorithm is judged to have converged and the optimal time slice allocation strategy is obtained; Step 5: pass the obtained optimal time slice allocation strategy to the CPU scheduler, triggering the CPU scheduler to allocate CPU time slices to each industrial task according to this strategy.

9. The intelligent control box for smart street lamps according to claim 1 is characterized by: The detection method of the resource allocation graph algorithm for detecting priority inversion is as follows: first, a graph data structure generation algorithm is used to take tasks and resources as nodes, and based on the resource request and allocation relationship, directed edges are created to construct a resource allocation graph; then, the resource allocation graph is traversed by a depth-first search method; during the traversal process, an access identifier is set for each node, and when a node marked as being accessed is accessed again and a loop is formed, it is determined that a priority inversion has occurred.

10. The intelligent control box for smart street lamps according to claim 1, characterized in that: The priority dynamic evaluation module resolves priority inversion in the following way: first, the remaining execution time, resource occupancy and related task information of the low-priority task involved in priority inversion are obtained through the task information acquisition mechanism; if it is determined that the remaining execution time of the low-priority task is lower than a preset threshold, the busy waiting strategy is adopted to execute the low-priority task to release the occupied resources; if it is determined that the remaining execution time of the low-priority task is higher than or equal to the preset threshold, the priority of the low-priority task is increased through the priority adjustment mechanism, or other alternative resources are adjusted to be allocated to the high-priority task through resource reorganization to relieve the blockage.

Citation Information

Patent Citations

  • Intelligent control box suitable for intelligent street lamp

    CN212992662U

Cited By

  • Industrial control data processing system and method based on embedded real-time operating system

    CN120762376A

  • Automatic control management system based on benzene hydrogenation device

    CN121187249A

  • Construction safety visual computing and resource scheduling method and system and electronic equipment

    CN122454371A