Method and system for managing connection of multi-camera devices based on personal WiFi
By calculating resource constraint coefficients and implementing distributed management, combined with a time-division multiplexing mechanism of active scanning and passive listening, efficient collaborative work of multiple camera devices in a portable WiFi environment is achieved, solving the challenges of network resource management in mobile scenarios and improving video transmission quality and system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN NEW SAIBO TECHNOLOGY CO LTD
- Filing Date
- 2025-02-19
- Publication Date
- 2026-06-30
AI Technical Summary
Traditional video surveillance systems struggle to effectively coordinate and allocate limited network resources in mobile scenarios, leading to difficulties in managing multiple camera devices, intensified competition for network resources, impacting video transmission quality, and significant fluctuations in network status. Therefore, a flexible resource scheduling mechanism is required.
By calculating the resource constraint coefficient in a portable WiFi environment, a distributed management configuration table is generated. Active scanning and passive listening are performed alternately to collect data. A camera access priority table is generated and resources are allocated. A three-layer transmission channel partitioning and dynamic bandwidth allocation are adopted to establish a multi-level resource feedback mechanism, enabling collaborative work of multiple camera devices.
It improves the utilization efficiency of limited bandwidth resources, ensures the accurate quantification and stability of system resource status, reduces resource consumption in the device discovery process, improves the reliability of multi-camera access and the transmission quality of video data, and enhances the system's adaptability to network fluctuations.
Smart Images

Figure CN119997260B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of device connectivity technology, and in particular to a method and system for managing the connectivity of multiple camera devices based on portable WiFi. Background Technology
[0002] With the rapid development of video surveillance technology, the demand for multi-camera applications in mobile scenarios is increasing. Traditional video surveillance systems mainly rely on fixed network architectures, which are difficult to meet the flexible deployment requirements in mobile scenarios. Portable WiFi, as a portable network device, provides a new solution for mobile video surveillance, but its resource-limited nature brings challenges to the management of multiple camera access.
[0003] In portable Wi-Fi environments, the simultaneous access of multiple camera devices intensifies competition for network resources, making it difficult for traditional centralized management methods to effectively coordinate and allocate limited network resources. Especially when bandwidth is limited, concurrent transmission of multiple video data streams can easily cause network congestion, affecting video transmission quality. Furthermore, network conditions fluctuate significantly in mobile scenarios, necessitating more flexible resource scheduling mechanisms. Summary of the Invention
[0004] This application provides a method and system for managing the connection of multiple camera devices based on portable WiFi, thereby improving the utilization efficiency of limited bandwidth resources and realizing the efficient collaborative work of multiple camera devices.
[0005] The first aspect of this application provides a method for managing the connection of multiple camera devices based on portable WiFi, the method comprising:
[0006] Calculate the resource limitation coefficient in a portable WiFi environment;
[0007] Based on the resource constraint coefficient, a distributed management configuration table for the multi-camera management task in the portable WiFi is generated, and active scanning and passive listening are performed alternately to obtain a camera access priority table.
[0008] Resource allocation is performed on the camera devices in the camera access priority table to obtain a multi-camera resource allocation strategy. Based on the multi-camera resource allocation strategy, a three-layer transmission channel is divided and allocated to obtain a multi-channel data transmission control table.
[0009] Based on the multi-channel data transmission control table, a multi-level resource feedback mechanism is established in the portable WiFi environment, and the bandwidth allocation ratio between camera devices is dynamically calculated to obtain a collaborative transmission optimization scheme.
[0010] A second aspect of this application provides a multi-camera device connection management system based on portable WiFi, the multi-camera device connection management system based on portable WiFi includes:
[0011] The calculation module is used to calculate the resource limitation coefficient in a portable WiFi environment;
[0012] The alternating acquisition module is used to generate a distributed management configuration table for the management of multiple cameras in the portable WiFi based on the resource constraint coefficient, and to perform alternating acquisition of active scanning and passive listening to obtain a camera access priority table.
[0013] The allocation module is used to allocate resources to the camera devices in the camera access priority table, obtain a multi-camera resource allocation strategy, and perform three-layer transmission channel division and allocation based on the multi-camera resource allocation strategy to obtain a multi-channel data transmission control table.
[0014] A module is established to create a multi-level resource feedback mechanism in the portable WiFi environment based on the multi-channel data transmission control table, and to dynamically calculate the bandwidth allocation ratio between camera devices to obtain a collaborative transmission optimization scheme.
[0015] Compared with existing technologies, this application has the following advantages: By establishing a resource constraint coefficient calculation mechanism, it achieves accurate quantification of system resource status in a portable WiFi environment. Adopting a distributed management architecture and multi-level task partitioning strategy reduces system resource overhead and improves the operational efficiency of multi-camera management in a portable WiFi environment. Through a time-division multiplexing mechanism combining active scanning and passive listening, it reduces resource consumption during device discovery and improves the reliability of multi-camera access. Based on a multi-layer transmission channel partitioning method, it achieves differentiated transmission of control data and video data, ensuring timely and reliable transmission of system control commands. The adoption of a hierarchical resource feedback mechanism and dynamic bandwidth allocation strategy enhances the system's adaptability to network fluctuations and guarantees the transmission quality of multiple video data streams. Through time-division multiplexing scheduling and priority management, it improves the utilization efficiency of limited bandwidth resources and enables efficient collaborative work of multiple camera devices. The introduction of a multi-level resource feedback mechanism enables the system to dynamically adjust resource allocation strategies based on real-time monitoring data, improving the stability of system operation. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] The structures, proportions, sizes, etc., shown in the accompanying drawings of this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed in the specification, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.
[0018] Figure 1 This is a flowchart illustrating the multi-camera device connection management method based on portable WiFi provided in an embodiment of the present invention;
[0019] Figure 2 This is a schematic block diagram of the structure of a multi-camera device connection management system based on portable WiFi provided in an embodiment of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0022] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0023] It should also be further understood that the term "and / or" as used in this application specification and the appended claims refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations. See also Figure 1 One embodiment of the multi-camera device connection management method based on portable WiFi in this application includes:
[0024] Step 100: Calculate the resource limitation coefficient in a portable WiFi environment;
[0025] It is understood that the executing entity of this application can be a multi-camera device connection management system based on portable WiFi, or it can be a terminal or a server; the specific implementation is not limited here. This application embodiment uses a server as an example for illustration.
[0026] Specifically, key parameters such as CPU utilization, memory usage, and battery level of the portable WiFi device are read in real time through the system monitoring interface to obtain basic resource data. CPU utilization reflects the current computing load of the device, while memory usage affects the system's data processing and caching capabilities, and battery level determines the device's battery life. The basic resource data is validated by eliminating sudden data fluctuations, extreme values, or measurement errors under abnormal operating conditions to obtain valid resource data. The valid resource data is then standardized using methods such as normalization and Z-score standardization to eliminate differences in data units and numerical ranges, resulting in standardized resource indicators. Simultaneously, channel detection is performed on the portable WiFi's RF interface to obtain RF resource indicators. The availability of RF resources is mainly affected by factors such as channel occupancy, signal interference levels, and WiFi signal strength, and these parameters directly determine the camera device's data transmission capabilities in a wireless environment. High channel occupancy means the WiFi channel is nearing saturation, thus limiting the transmission of additional data streams, while strong signal interference leads to packet loss, increased retransmissions, and decreased throughput. Therefore, the measurement of RF resource indicators needs to incorporate information from multiple dimensions to ensure the accuracy of the calculation results. The standardized resource indicators and radio frequency (RF) resource indicators are weighted and fused to obtain the initial fusion coefficient. The weighting method is adjusted according to the impact of different resources on the overall performance of the portable WiFi. For example, CPU utilization and memory usage have a significant impact on data processing capabilities, while the RF channel state directly determines the data transmission quality. Therefore, the optimal weighting parameters are determined through experience or machine learning methods so that the initial fusion coefficient accurately reflects the resource constraints currently faced by the portable WiFi. The initial fusion coefficient is exponentially smoothed according to the time series using the resource constraint calculation formula to obtain the resource constraint coefficient. The exponential smoothing formula is used to calculate the initial fusion coefficient of the current period and the resource constraint coefficient of the previous period according to a certain time decay weight, resulting in the final resource constraint coefficient. The exponential smoothing calculation formula is: ,in, This represents the resource constraint coefficient calculated at the current moment, while 0.7 represents the resource constraint coefficient of the previous period, while 0.7 and 0.3 are smoothing weight coefficients, representing the degree of influence of historical data and current data on the final calculation result, respectively.
[0027] Step 200: Generate a distributed management configuration table for the multi-camera management task in the portable WiFi based on the resource constraint coefficient, and perform alternating collection of active scanning and passive listening to obtain the camera access priority table;
[0028] Specifically, a resource constraint coefficient is compared with a preset first and second threshold to determine the resource status level of the current WiFi environment. If the resource constraint coefficient is lower than the first threshold, it indicates that the system resources are sufficient, supporting more camera access and providing higher bandwidth allocation. If the resource constraint coefficient is higher than the second threshold, it indicates that the WiFi environment is under high load, strictly limiting the access of new devices and optimizing the data transmission strategy of existing devices. When the resource constraint coefficient is between the two thresholds, the system is under medium load, and the resource allocation strategy is dynamically adjusted to improve overall efficiency while ensuring stability. Resources are allocated to the device management module, network management module, and data processing module according to the resource status level. Based on the resource constraint situation, resources are allocated according to a preset ratio to obtain the resource allocation ratio value of each module. The device management module is responsible for the access, disconnection, and device status monitoring of multiple camera devices. The network management module is used to optimize the utilization efficiency of WiFi channels and data transmission strategies, while the data processing module undertakes the preprocessing, compression, and transmission of video data. By reasonably allocating resources, the optimal operating state of each module under the current WiFi resource conditions is ensured. The total number of threads for each module is multiplied by the resource allocation ratio, and combined with a preset thread wait timeout duration to determine the thread pool configuration data for each module. A proper thread pool configuration helps improve system concurrency performance. Under resource constraints, the thread pool size needs to be appropriately reduced to decrease system overload and thread contention; conversely, under sufficient resources, the thread pool size is expanded to improve multitasking capabilities. Simultaneously, the preset memory capacity for each module is multiplied by the resource allocation ratio, and a circular message queue is established to obtain the data exchange configuration data between modules. The establishment of the circular message queue effectively improves the stability of data transmission, avoids data blocking problems caused by resource constraints, and optimizes the real-time performance of data transmission, ensuring that video data from the cameras is transmitted to the target device or server in a timely manner. The resource allocation ratio for each module is multiplied by a preset priority coefficient to determine the priority relationship of each module during task execution. Critical tasks, such as camera access management and signal quality detection, are given higher priority, while secondary tasks, such as data logging and low-frequency status monitoring, are given lower priority, thereby optimizing the system's task scheduling efficiency. The system integrates thread pool configuration data, data exchange configuration data, and task scheduling priority data, establishing a correspondence between them and module identifiers to generate a distributed management configuration table. This allows different modules to dynamically adjust their operating modes based on the current WiFi environment's resource conditions, thereby improving overall system performance. Based on the distributed management configuration table, the system performs alternating active scanning and passive listening to acquire signal quality and power levels from multiple camera devices.Active scanning proactively queries the status information of camera devices by sending probe requests, while passive listening monitors WiFi signals and analyzes the camera's beacon frames to obtain the device's real-time connection status, signal strength, and data traffic requirements. During data collection, a time-division multiplexing evaluation method is employed, analyzing the signal quality and power levels of camera devices at different time intervals and combining this with historical data trends for a comprehensive evaluation to improve the accuracy of priority calculation. Based on this comprehensive evaluation data, a camera access priority table is generated. This table determines which camera devices have priority access to the WiFi network and, under resource constraints, which devices have reduced bandwidth allocation or are temporarily disconnected.
[0029] The system performs periodic calculations based on the resource allocation ratio values in the distributed management configuration table and divides the data according to the alternating time slot ratio of active scanning and passive listening, resulting in an alternating acquisition time slot table. A preset value is set as the time slot ratio for active scanning and passive listening, maximizing the acquisition of effective data within a limited time window. During the active scanning time slot, probe request frames are sent sequentially to a preset channel sequence according to a preset dwell time, actively triggering a response from the camera device. During the passive listening time slot, probe response frames are received on the current optimal channel, passively listening to the beacon information of the camera device to obtain device discovery data. The device discovery data is then categorized and extracted, extracting valuable information from both the active scanning and passive listening data streams. In the active scanning data, since the system actively sends probe requests to the camera device, the returned signal strength value is extracted, directly reflecting the link quality between the device and the WiFi hotspot. In the passive listening data, since the camera device periodically sends status beacons, which often contain remaining battery information, its battery level value is extracted, forming a dual-mode acquisition data set including both signal strength and battery level. A performance evaluation matrix is established based on dual-mode data acquisition to calculate the average signal strength and power level over time periods. These values are then weighted to obtain a device performance score. The performance evaluation matrix considers data from multiple time slots and normalizes the signal strength and power level of each device to ensure their distribution is within a comparable range. A comprehensive performance score is calculated based on set weighting parameters, appropriately allocating the contribution weights of signal quality and power level to the final score. Device performance scores are then categorized to generate a hierarchical priority sequence. This priority sequence is constructed using a threshold-based approach, classifying devices into high-priority, medium-priority, and low-priority categories based on their performance score range. This ensures that high-priority camera devices are prioritized for access when portable Wi-Fi resources are limited, and that access to low-priority devices is restricted when necessary. The hierarchical priority sequence is then associated with the camera device's identification information and corresponding acquisition time slot number to obtain a camera access priority table. This priority table will serve as the core data structure for WiFi network management, guiding dynamic access decisions for multiple camera devices. It ensures that the most important devices can maintain a stable connection when resources are limited, while supporting more devices to connect when resources are sufficient, thereby optimizing the network utilization efficiency and data transmission stability of the entire multi-camera system.
[0030] Step 300: Allocate resources to the camera devices in the camera access priority table to obtain a multi-camera resource allocation strategy, and divide and allocate three-layer transmission channels based on the multi-camera resource allocation strategy to obtain a multi-channel data transmission control table.
[0031] It should be noted that the byte count of control messages, heartbeat packets, and status synchronization messages for each camera device is statistically analyzed to calculate basic resource overhead data. Since control messages and heartbeat packets are transmitted frequently, and status synchronization messages contain camera operating status information, this data analysis reflects the basic resource consumption of cameras in non-video stream data transmission. After the statistics are completed, the video resolution parameters of each camera device are matched against a preset bandwidth mapping table to calculate video transmission bandwidth data. The basic resource overhead data is added to the video transmission bandwidth data and multiplied by a preset fluctuation factor to calculate the total resource requirement of each camera device. The fluctuation factor is introduced to address the dynamic changes in the network environment, such as the impact of channel interference, data retransmission, and sudden data traffic on bandwidth usage, making resource allocation more flexible. The total resource requirements of all camera devices are summed to obtain the overall system requirement data, which is used to assess the overall load of the portable WiFi. The system calculates the current available bandwidth capacity of the portable WiFi and divides it by the overall system demand to obtain a quotient. This quotient reflects whether the current available bandwidth is sufficient to meet the needs of all camera devices. It is then compared with a preset target value to select an appropriate resource allocation mode. When the quotient reaches or exceeds the preset target value, it indicates that the current available bandwidth can meet the needs of all camera devices. A priority-based allocation scheme is adopted, allocating resources according to the camera access priority from high to low, ensuring that high-priority devices receive stable bandwidth support. When the quotient is lower than the preset target value, it means that the available bandwidth of the current WiFi environment is insufficient to meet the needs of all devices. Therefore, a proportional reduction scheme is adopted, multiplying the total resource demand of all devices by the capacity ratio to ensure that bandwidth is distributed proportionally among all devices, thus avoiding situations where some devices cannot access the network at all. After determining the resource allocation mode, the total resource demand of each camera device is calculated according to the specific mode. If priority-based allocation is used, resources are allocated according to the access priority from high to low until the bandwidth is exhausted. If proportional reduction is used, the resource demand of each device is adjusted according to the calculated capacity ratio so that the total allocated bandwidth matches the available bandwidth. After completing the resource allocation calculation, a dynamic adjustment range is set for the resource quota of each device, and a quota mapping table is established according to the device identifier to obtain the multi-camera resource allocation strategy. Setting a dynamic adjustment range improves the flexibility of resource allocation, allowing the system to fine-tune resource allocation based on real-time network conditions, avoiding data stream interruptions or stuttering caused by sudden changes in bandwidth usage. Based on the established multi-camera resource allocation strategy, a three-layer transmission channel is divided to ensure stable data stream transmission. A time-division multiplexing mechanism is used to divide the transmission channels of different camera devices, allocating control data channels and video data channels to each device separately.The control data channel transmits camera control messages, heartbeat packets, and status synchronization messages, while the video data channel transmits video stream data. This rational channel allocation ensures stable control data transmission even under high load conditions, while optimizing video data stream bandwidth utilization to reduce data conflicts and transmission latency. After completing the three-layer transmission channel allocation, a multi-channel data transmission control table is created. This table includes resource quotas, dynamic adjustment ranges, and the allocation of control and video data channels for each camera device, guiding real-time data transmission across the entire multi-camera system.
[0032] The multi-camera resource allocation strategy divides the data into control channels, basic video channels, and enhanced video channels based on different data types. This determines the resource ranges and the basic bandwidth configuration for the three channels. The control channel transmits device control commands, heartbeat signals, and status synchronization information. The basic video channel transmits standard definition (SD) video streams, while the enhanced video channel transmits high-definition (HD) or ultra-high-definition (UHD) video streams. Since different types of data have different bandwidth and real-time requirements, the available bandwidth in a portable Wi-Fi environment is considered when dividing the resource ranges to ensure the stability of the control channel. Simultaneously, while meeting the requirements of the basic video channel, as many available resources as possible are provided for the enhanced video channel. Data from each camera device is categorized to allocate it to different channels according to data type. Control commands and status information should be assigned to the control channel to ensure that camera devices receive management commands in real time and report their operating status to the management terminal. Basic definition video streams generated by the cameras should be assigned to the basic video channel to ensure that all camera devices can maintain at least basic video transmission functions even under bandwidth constraints. High-definition video streams are assigned to the enhanced video channel to provide higher quality visual data when bandwidth allows. This classification process effectively optimizes the bandwidth utilization of portable WiFi, ensuring that different types of data streams do not interfere with each other during transmission, thereby improving the overall network stability and transmission efficiency. After data classification, based on a preset time-division multiplexing period, the time axis is divided into fixed-length baseline time slots, and each time slot is labeled according to the order of control channel, basic video channel, and enhanced video channel, resulting in a time-division multiplexing scheduling sequence. The application of the time-division multiplexing mechanism can effectively reduce conflicts when multiple camera devices send data at the same time, avoid packet loss or bandwidth contention, and improve the orderliness and stability of transmission. After the time-division multiplexing scheduling sequence is generated, a transmission window is allocated to each camera device in the sequence according to the device data classification results, forming a device time slot allocation table. When allocating time slots, the camera priority, data stream type, and WiFi environment bandwidth status are considered. For example, high-priority cameras are allocated more time slots, while low-priority cameras only receive limited basic video transmission time slots. After the device time slot allocation table is generated, the transmission priority of various data channels is set according to preset service quality requirements, resulting in a channel service level table. The control channel should have the highest priority to ensure that camera devices receive control commands and synchronize their status in a timely manner. The basic video channel should have a higher priority than the enhanced video channel to ensure that the system can maintain basic video transmission for all camera devices even when bandwidth is limited. The enhanced video channel should dynamically adjust its priority based on bandwidth availability to ensure high-quality video data when bandwidth is sufficient, and automatically reduce the transmission rate or frame rate when bandwidth is insufficient, thus adapting to the fluctuations of the portable WiFi environment.The device time slot allocation table and channel service level table are combined to establish a mapping relationship between camera devices and transmission channels, and a final multi-channel data transmission control table is generated according to preset data packet scheduling rules. The data packet scheduling rules are dynamically adjusted based on priority, time slot allocation, and network load to ensure fairness and efficiency in data transmission. Furthermore, by monitoring the bandwidth status of the WiFi environment and the operating status of the devices in real time, the data transmission strategy is dynamically optimized to ensure efficient and stable data transmission for multiple camera devices in a portable WiFi environment, thereby improving the overall system performance and user experience.
[0033] Step 400: Establish a multi-level resource feedback mechanism in the portable WiFi environment based on the multi-channel data transmission control table, and dynamically calculate the bandwidth allocation ratio between camera devices to obtain a collaborative transmission optimization scheme.
[0034] Specifically, data monitoring is performed on each camera device in the multi-channel data transmission control table. For the control data channel, basic video channel, and enhanced video channel, data on bandwidth utilization, packet loss rate, and transmission latency are collected according to a preset sampling period, resulting in a multi-level monitoring dataset. Bandwidth utilization monitoring helps assess whether there is resource waste or bandwidth saturation in the current channel; packet loss rate measurement reflects the stability of data transmission; and transmission latency directly relates to the real-time performance of the video stream. The multi-level monitoring dataset is then subjected to hierarchical calculations to evaluate the actual transmission performance of each channel, and a performance score for each channel is obtained through comprehensive analysis. The hierarchical calculation method is based on a set weighted scoring model, where the contribution weights of bandwidth utilization, packet loss rate, and transmission latency are adjusted according to different application scenarios. For example, in low-latency scenarios, the weight of transmission latency is increased, while in high-throughput scenarios, more attention is paid to changes in bandwidth utilization. After hierarchical calculations, the overall performance level of the control data channel, basic video channel, and enhanced video channel is determined. The performance scores of each channel are input into a preset proportional-integral-derivative (PID) control model to calculate the bandwidth correction amount for different channels, obtaining the bandwidth adjustment coefficient. The introduction of the PID control model ensures that the bandwidth adjustment process can respond quickly to changes in network status while avoiding the impact of drastic fluctuations on system stability. The proportional term (P) directly reflects the deviation between the current bandwidth demand and the ideal state, the integral term (I) accumulates historical errors to compensate for long-term bandwidth allocation deviations, and the derivative term (D) predicts the trend of bandwidth demand changes, thereby reducing the impact of sudden interference on the allocation strategy. The bandwidth adjustment coefficient calculated by PID control reflects the bandwidth correction amount required by different channels in the current network environment. The bandwidth adjustment coefficient is constrained according to preset upper and lower limits of resource quotas to keep it fluctuating within a reasonable range, thereby avoiding network congestion caused by over-allocation. After the constraint processing is completed, the adjusted bandwidth adjustment coefficient is substituted into a preset linear programming model, and the optimal bandwidth allocation value that meets the constraints is solved through optimization calculations to obtain the final bandwidth allocation scheme. The linear programming model is set based on a multi-objective optimization method, so that the final allocation scheme can ensure the bandwidth demand of high-priority camera devices while maximizing the overall system throughput and fairness. The time-division multiplexing scheduling sequence in the multi-channel data transmission control table is modified according to the bandwidth allocation scheme to conform to the new bandwidth allocation strategy, resulting in an updated transmission control strategy. The modifications to the time-division multiplexing scheduling are reflected in several aspects, such as increasing the number of time slots for high-priority cameras, reducing the occupation time of low-priority cameras, or dynamically adjusting the switching frequency between different channels to optimize data transmission efficiency. The updated transmission control strategy is then mapped to camera device identifiers and channel type identifiers to generate a collaborative transmission optimization scheme.
[0035] In this embodiment, a resource constraint coefficient calculation mechanism is established to achieve precise quantification of system resource status in a portable WiFi environment. A distributed management architecture and multi-level task partitioning strategy are adopted to reduce system resource overhead and improve the operational efficiency of multi-camera management in a portable WiFi environment. A time-division multiplexing mechanism combining active scanning and passive listening reduces resource consumption during device discovery and improves the reliability of multi-camera access. A multi-layered transmission channel partitioning method enables differentiated transmission of control data and video data, ensuring timely and reliable delivery of system control commands. A hierarchical resource feedback mechanism and dynamic bandwidth allocation strategy enhance the system's adaptability to network fluctuations and guarantee the transmission quality of multiple video data streams. Time-division multiplexing scheduling and priority management improve the utilization efficiency of limited bandwidth resources, enabling efficient collaborative work of multiple camera devices. The introduction of a multi-level resource feedback mechanism allows the system to dynamically adjust resource allocation strategies based on real-time monitoring data, improving system operational stability.
[0036] In one specific embodiment, the process of performing step 100 may specifically include the following steps:
[0037] The system monitoring interface reads real-time values of CPU usage, memory usage, and battery level from the portable WiFi device to obtain basic resource data. The validity of the basic resource data is then verified to obtain valid resource data.
[0038] The effective resource data is standardized to obtain standardized resource indicators, and the radio frequency interface of the portable WiFi is subjected to channel detection to obtain radio frequency resource indicators.
[0039] The standardized resource indicators and radio frequency resource indicators are weighted and fused to obtain the initial fusion coefficient;
[0040] By applying the resource-constrained calculation formula and performing exponential smoothing on the initial fusion coefficients according to the time series, the resource-constrained coefficient is obtained. The resource-constrained calculation formula is: R t =0.7×R t-1 +0.3×R t , where R t R is the current resource constraint factor. t-1 This represents the resource constraint coefficient for the previous period.
[0041] Specifically, the system monitors the portable WiFi device's CPU usage, memory usage, and battery level in real time via an interface. These parameters collectively constitute the basic resource data. Among them, CPU usage (denoted as...) This indicates the current computing resource usage of the portable WiFi device, ranging from 0 to 1 (or 0% to 100%). An excessively high value indicates that the system's computing resources are strained, affecting the camera's data processing capabilities; memory usage (denoted as...) This indicates the current available memory usage. An excessively high level indicates insufficient system caching capacity, affecting data storage and transmission; power level (denoted as...) This reflects the remaining battery level of the portable WiFi device, expressed as a percentage from 0 to 1 (or 0% to 100%). If the values are too low, it will affect the equipment's continuous operating capability. The above three parameters constitute the basic resource data vector. The basic resource data undergoes validity testing to remove outliers and obtain valid resource data. Smoothing is performed using sliding window filtering or median filtering. The validity test is mathematically expressed using a threshold method, i.e., if the following conditions are met:
[0042]
[0043] If the data is valid, it is discarded and replaced with the historical average. Valid resource data is standardized using min-max normalization, transforming CPU utilization, memory usage, and power consumption separately:
[0044]
[0045] in, These are standardized CPU resource, memory resource, and power resource indicators, all normalized to the range of 0 to 1 to ensure comparability. These standardized resource data constitute a standardized resource indicator vector. Simultaneously, channel detection is performed on the portable WiFi's RF interface to obtain RF resource indicators. RF resource indicators include channel occupancy rate (...). ), signal interference strength ( ) and data throughput ( Channel occupancy rate This reflects the busy level of the WiFi channel, with a value ranging from 0 to 1. An excessively high signal strength indicates that the channel is nearing saturation, affecting data transmission from multiple cameras; signal interference intensity. This reflects the degree of interference from other wireless devices to the WiFi connection. Excessive data throughput can lead to packet loss or retransmission; Reflecting the actual available transmission rate of the current WiFi, if If the value is too low, it indicates bandwidth constraints, which is detrimental to camera video stream transmission. Radio frequency resource indicators are also standardized:
[0046]
[0047] in, These represent the standardized channel availability, interference level, and throughput, respectively. The radio frequency resource index vector is represented as follows: Standardized resource indicators and radio frequency resource indicators Perform weighted fusion to calculate the initial fusion coefficients. The mathematical expression for weighted fusion is:
[0048]
[0049] in, The preset weighting coefficients represent the degree of influence of different resources on the overall resource constraint level. An exponential smoothing method is used to smooth the initial fusion coefficients over time to calculate the final resource constraint coefficient. The formula for exponential smoothing is as follows:
[0050]
[0051] in, This represents the resource constraint coefficient at the current moment. This represents the resource constraint coefficient at the previous moment. Coefficients of 0.7 and 0.3 control the weights of historical data and current data, respectively, so that the calculation results can remain stable while responding quickly to new changes.
[0052] In one specific embodiment, the process of performing step 200 may specifically include the following steps:
[0053] The resource constraint coefficient is compared with the preset first threshold and second threshold to obtain the resource status level value;
[0054] Based on the resource status level value, the resources of the device management module, network management module, and data processing module are divided according to a preset ratio to obtain the resource allocation ratio value of each module;
[0055] The total number of threads in each module is multiplied by the resource allocation ratio, and a preset thread waiting timeout is set to obtain the thread pool configuration data for each module.
[0056] The preset memory capacity of each module is multiplied by the resource allocation ratio, and a circular message queue is established to obtain the data exchange configuration data between modules.
[0057] The resource allocation ratio of each module is multiplied by the preset priority coefficient to obtain the task scheduling priority data between modules;
[0058] The thread pool configuration data, data exchange configuration data, and task scheduling priority data are integrated and a correspondence with module identifiers is established to obtain the distributed management configuration table.
[0059] Based on the distributed management configuration table, active scanning and passive listening are performed alternately to collect data. The signal quality and power level of multiple camera devices are evaluated in a time-division multiplexing manner to obtain a camera access priority table.
[0060] Specifically, the resource constraint factor With the preset first threshold Second threshold A comparison is performed to determine the current resource status level of the system. If This indicates that the system resources are sufficient and managed according to a high resource allocation standard. In this case, a resource status level value is defined. ;like This indicates that the system is under moderate load and requires appropriate optimization of resource allocation to ensure balanced operation of all modules. At this point, setting... ;like This indicates that system resources are strained. Strict control over resource allocation is necessary, prioritizing the stable operation of core functions. The management strategy is dynamically adjusted based on the different resource statuses. When the resource status level value... Once determined, resources are allocated to the device management module, network management module, and data processing module based on this value, resulting in the resource allocation ratio for each module. Let these modules be denoted as... (Equipment Management Module) (Network Management Module) and (Data processing module), then their resource allocation ratio The following relationship must be satisfied:
[0061]
[0062] in, Used for device status monitoring and connectivity management. Responsible for network channel optimization and data transmission scheduling, This is used for preprocessing and encoding compression of video stream data. The specific allocation method is set as follows: When At that time, the resource allocation ratio was relatively balanced; when When [the network is in a certain state], the weight of network management is increased to optimize data flow; while when [the network is in a certain state], [the network is in a certain state]. At this time, priority is given to ensuring resources for the device management and network management modules to maintain basic system operation. This is based on the calculated resource allocation ratio. Determine the thread pool configuration for each module. Assume the total number of threads in the system is... Then the number of threads in each module Calculated using the following formula:
[0063]
[0064] At the same time, set the thread wait timeout duration. To prevent thread resources from being occupied for extended periods, thus affecting system responsiveness, a thread pool configuration is shown as follows:
[0065]
[0066] in This represents the final thread pool allocation scheme. After determining the thread pool configuration, the data exchange configuration data between modules is calculated, which involves allocating an appropriate amount of memory to each module and establishing a circular message queue to ensure the stability of data transmission. Assume the total available memory of the system is... The preset memory capacity of each module is then... The following calculations were performed:
[0067]
[0068] Meanwhile, the size of the circular message queue is optimized based on data traffic, and the queue capacity is set accordingly. :
[0069]
[0070] in It is an empirical adjustment factor that controls the queue depth to adapt to data exchange needs under different load conditions. It calculates task scheduling priority based on the resource allocation ratio and a preset priority coefficient. Calculate the priority of each module:
[0071]
[0072] in Preset priority weights are assigned to different modules to ensure the priority execution of critical tasks. Thread pool configuration data, data exchange configuration data, and task scheduling priority data are integrated and mapped to module identifiers to obtain a distributed management configuration table, which guides the dynamic adjustment of the system. Based on the distributed management configuration table, alternating active scanning and passive listening are performed, and the signal quality and power levels of multiple camera devices are evaluated using time-division multiplexing. During active scanning time slots, the system sends probe requests and calculates signal strength based on the returned signals from the camera devices. :
[0073]
[0074] in and These represent the received signal power and the transmitted signal power, respectively. During the passive listening time slot, the system analyzes the beacon frames of the camera device to extract the power level. Based on this data, a camera access priority table is established, where the priority is calculated by combining signal strength, battery level, and the camera's historical stability.
[0075]
[0076] in These are the importance weights for signal strength, battery level, and historical stability, respectively. This access priority table is used to dynamically adjust the access strategy for camera devices, thereby optimizing data transmission performance in multi-camera environments.
[0077] In one specific embodiment, the process of performing alternating active scanning and passive listening based on the distributed management configuration table, and conducting time-division multiplexing evaluation of the signal quality and power levels of multiple camera devices to obtain a camera access priority table can specifically include the following steps:
[0078] The resource allocation ratio in the distributed management configuration table is periodically calculated and divided according to the preset value of the alternating time slot ratio of active scanning and passive listening to obtain the alternating acquisition time slot table.
[0079] During the active scanning time slot, probe request frames are sent sequentially to the preset channel sequence according to the preset dwell time. During the passive listening time slot, probe response frames are received for the current optimal channel to obtain device discovery data.
[0080] The device detection data is classified and extracted. Signal strength values are extracted from active scanning data and power level values are extracted from passive listening data to obtain dual-mode acquisition data.
[0081] A performance evaluation matrix is established based on the dual-mode acquisition data. The average signal strength and average power level in each time slot are weighted and calculated to obtain the equipment performance score.
[0082] The device performance scores are graded to obtain a graded priority sequence. The graded priority sequence is then associated with the identification information of the camera device and the corresponding acquisition time slot number to obtain the camera access priority table.
[0083] Specifically, the resource allocation ratio in the distributed management configuration table is used for periodic calculation, and the time window is divided according to the alternating time slot ratio of active scanning and passive listening to obtain an alternating acquisition time slot table. Active scanning is used to actively discover camera devices, while passive listening is used to monitor the status information of camera devices to optimize device access priority. A scanning cycle is set. Then, according to the preset active scanning time slot ratio and passive listening time slot ratio When allocating time, these two ratios must satisfy:
[0084]
[0085] And the active scanning time slot was calculated. and passive listening slot :
[0086]
[0087] in, This represents the time used for active scanning in each cycle, while This represents the time used for passive listening. During the active scanning time slot. Within, for the preset channel sequence Perform a traversal and stay on each channel for a preset time. Probe request frames are sent sequentially to actively detect the presence of camera devices. Dwell time for each channel. The following conditions must be met:
[0088]
[0089] After the detection request frame is sent, the WiFi device will receive the detection response frame returned by the camera device and record the device detection data, including signal strength. and device MAC address During passive listening slots Inside, the system monitors the current optimal channel. It also receives detection response frames from the camera device. At this time, it extracts the battery level of the camera device. This value, contained in the load information field of the probe response frame, represents the remaining battery power of the current device, typically ranging from 0 to 1 (or 0% to 100%). After completing active scanning and passive listening data acquisition, the device detection data is categorized and extracted to form dual-mode acquisition data. Signal strength values are extracted from the active scanning dataset. And extract battery level values from the passive listening dataset. These data constitute a dual-mode data matrix:
[0090]
[0091] Each row corresponds to a camera device, including its MAC address, signal strength, and battery level. Based on the dual-mode data acquisition, a performance evaluation matrix is established, and the average signal strength and battery level within each time slot are weighted to obtain the device's performance score. The calculation formula is as follows:
[0092]
[0093] in, and These are the weighting factors for signal strength and power level, respectively. Performance scores for all devices. Perform hierarchical processing to generate a hierarchical priority sequence. Set multiple thresholds. To assign different priorities. If If the device is of high priority, it will be connected first; if If the device is of medium priority, it will be connected if bandwidth allows; if If a device is classified as low priority, it will only be allowed access when resources are plentiful. Based on the device's performance score, it will be categorized into different priority classes, generating a hierarchical priority sequence:
[0094]
[0095] according to Sort the cameras from highest to lowest priority. Associate the priority sequence with the camera device's identification information and corresponding acquisition time slot number to form the final camera access priority table, as shown below:
[0096]
[0097] in, This represents the data acquisition time slot number assigned to the device, while the priority is used to determine the device access strategy. In a portable WiFi environment, the access management of the camera is dynamically adjusted based on this priority table. For example, when resources are scarce, higher-priority devices are prioritized for connection, while access restrictions are appropriately relaxed when resources are plentiful.
[0098] In one specific embodiment, the process of performing step 300 may specifically include the following steps:
[0099] The number of bytes in the control messages, heartbeat packets, and status synchronization messages of each camera device in the camera access priority table is counted to obtain basic resource overhead data.
[0100] The video resolution parameters of each camera device are queried and matched with a preset bandwidth mapping table to obtain video transmission bandwidth data;
[0101] The basic resource overhead data is added to the video transmission bandwidth data and multiplied by a preset fluctuation factor to obtain the total resource requirement of each camera device. The total resource requirement of all camera devices is then summed to obtain the overall system requirement data.
[0102] Divide the current available bandwidth capacity of the portable WiFi by the overall system demand data to obtain the quotient result, compare the quotient result with the preset target value, and select either a priority allocation scheme or a proportional reduction scheme to obtain the resource allocation mode.
[0103] The total resource requirement of each camera device is calculated according to the resource allocation mode. When it is priority allocation, it is allocated in order of access priority from high to low. When it is proportional reduction, the total resource requirement is multiplied by the capacity ratio to obtain the device resource quota.
[0104] A dynamic adjustment range is set for equipment resource quotas, and a quota mapping table is established according to equipment identifiers to obtain a multi-camera resource allocation strategy.
[0105] A three-layer transmission channel division is implemented for the multi-camera resource allocation strategy. Based on the time-division multiplexing mechanism, a control data channel and a video data channel are allocated to each camera device to obtain a multi-channel data transmission control table.
[0106] Specifically, the number of bytes in control messages, heartbeat packets, and status synchronization messages for each camera device is counted to calculate basic resource overhead data. Assume the control message size of a camera device is... bytes, heartbeat packet size is bytes, the size of the state synchronization message is The bytes represent the basic resource overhead data of the camera. The calculation is as follows:
[0107]
[0108] in, This represents the minimum communication resources required by the camera during data interaction to maintain device state synchronization and management control. The video resolution parameter is queried and matched against a preset bandwidth mapping table to calculate the video transmission bandwidth data. Assume the camera device's video resolution parameter is... Then, the corresponding bandwidth requirement is looked up according to the resolution mapping table. Different video qualities correspond to different bandwidth requirements, for example:
[0109] 720p (1280×720, 30fps) → 2 Mbps;
[0110] 1080p (1920×1080,30fps) → 4 Mbps;
[0111] 4K (3840×2160, 30fps) → 15 Mbps;
[0112] Based on the query results, the video transmission bandwidth data for each camera device was obtained. :
[0113]
[0114] in, This represents the bandwidth mapping function. It calculates the total resource requirements for each camera device, a value derived from the basic resource overhead data. With video transmission bandwidth data The sum, multiplied by a volatility factor To account for dynamic network changes, the fluctuation factor ranges from 1.1 to 1.3 to compensate for bandwidth fluctuations and data retransmissions. The final calculation formula is:
[0115]
[0116] in, This represents the total bandwidth requirement of the camera. To calculate the overall system requirements, the total resource requirements of all camera devices are summed. It is assumed that there are a total of [number missing] cameras in the system. For each camera device, the overall system requirements data are as follows. for:
[0117]
[0118] in, Representing the Resource requirements for each camera. Calculate the currently available bandwidth capacity of the portable WiFi. This data is then compared with the overall system requirements to determine a suitable resource allocation model. The bandwidth quotient is calculated.
[0119]
[0120] if This indicates that the available WiFi bandwidth is sufficient to meet the needs of all devices. In this case, a priority allocation scheme is adopted, that is, bandwidth is allocated in descending order according to the access priority of the cameras; if This indicates insufficient bandwidth. In this case, a proportional reduction scheme is adopted, which reduces the resource requirements of all devices by a ratio to the available capacity, ensuring the total demand adapts to the available bandwidth. Under the priority allocation scheme, resources are allocated sequentially from high to low according to the camera access priority table until bandwidth is exhausted. Under the proportional reduction scheme, device resource quotas are calculated using the following formula:
[0121]
[0122] in, This refers to the reduced equipment resource requirements, ensuring that the total demand for all equipment does not exceed [a certain threshold]. Set a dynamic adjustment range for device resource quotas, allowing quotas to be adjusted within a certain range during operation to adapt to real-time bandwidth changes in the portable WiFi. Set the quota adjustment range. :
[0123]
[0124] in, and These represent the minimum and maximum allowed ranges of equipment resource quotas, respectively. A quota mapping table is established to map equipment identifiers to quotas.
[0125]
[0126] in, It is the first The identifier of each camera, This refers to the final resource allocation. The multi-camera resource allocation strategy employs a three-layer transmission channel division, allocating a control data channel and a video data channel to each camera device. In this process, a time-division multiplexing mechanism is used to divide the time axis into multiple time slots, allocated in the following order: Control channel: used for sending heartbeat packets and status synchronization messages; Basic video channel: used for standard definition video data transmission; Enhanced video channel: used for high definition or ultra-high definition video data transmission.
[0127] Before dividing the multi-camera resource allocation strategy into three transmission channels, the process includes: setting each camera device in the multi-camera resource allocation strategy as an optimization unit, establishing an adjacency matrix between optimization units, and assigning a local objective function to each optimization unit to obtain a distributed computing network; setting optimization parameters for the local objective function of each optimization unit, setting resource utilization, transmission efficiency, and service quality as variables to be optimized, and setting preset weight values for each optimization variable to obtain a weighted optimization model; dividing the optimization units in the weighted optimization model into a master control layer and an execution layer, with the master control layer responsible for global constraint coordination and the execution layer responsible for local constraint processing, establishing an inter-layer data interaction channel to obtain a two-layer optimization structure; and setting the total global resource amount for the master control layer of the two-layer optimization structure. Constraints are set for each optimization unit in the execution layer, with local resource threshold constraints. These constraints are then transformed into mathematical expressions, resulting in a set of constraint equations. A distributed solution algorithm is constructed for these constraint equations, and a gradient iterative update mechanism is established based on preset first-order and second-order derivative calculation rules, resulting in an iterative optimization process. A termination condition is set for the iterative optimization process, comparing the difference between two adjacent iterations with a preset threshold. Iteration stops when the difference is less than the threshold, yielding a sequence of optimal solutions. This sequence of optimal solutions is mapped to each camera device according to device identifiers, and the original resource allocation strategy is numerically corrected to obtain an optimized resource allocation strategy. Based on the optimized resource allocation strategy, a resource scheduling instruction set is established, and various resource parameters are re-encapsulated according to a preset data structure to obtain an updated multi-camera resource allocation strategy.
[0128] In one specific embodiment, the process of performing a three-layer transmission channel division for the multi-camera resource allocation strategy, allocating a control data channel and a video data channel to each camera device based on a time-division multiplexing mechanism, and obtaining a multi-channel data transmission control table can specifically include the following steps:
[0129] The multi-camera resource allocation strategy divides the resource range according to the control channel, basic video channel, and enhanced video channel to obtain the basic bandwidth configuration of the three-layer channel.
[0130] The data from each camera device is classified, with control commands and status information assigned to the control channel, basic resolution video stream assigned to the basic video channel, and high resolution video stream assigned to the enhanced video channel, thus obtaining the device data classification results.
[0131] Based on a preset time-division multiplexing period, the time axis is divided into fixed-length reference time slots. Each time slot is marked with channels in the order of control channel, basic video channel, and enhanced video channel to obtain a time-division multiplexing scheduling sequence.
[0132] For each camera device, a transmission window is allocated in the time-division multiplexing scheduling sequence according to the device data classification results, resulting in a device time slot allocation table;
[0133] Based on the preset quality of service requirements, the transmission priority of various data channels in the equipment time slot allocation table is set to obtain the channel service level table.
[0134] By combining the device time slot allocation table with the channel service level table, a mapping relationship between camera devices and transmission channels is established, and a multi-channel data transmission control table is generated according to the preset data packet scheduling rules.
[0135] Specifically, resource zones are divided into control channels, basic video channels, and enhanced video channels to determine the basic bandwidth configuration for the three channels. Assume the total system bandwidth is... Then, based on the multi-camera resource allocation strategy, appropriate bandwidth is allocated to the three-layer channels. Assume the bandwidth proportion of the control channel is... The bandwidth ratio of the basic video channel is The bandwidth ratio of the enhanced video channel is and meet the following conditions:
[0136]
[0137] The bandwidth allocation for the three-layer channel is calculated as follows:
[0138]
[0139] in, This represents the bandwidth allocated to the control channel, used for low-bandwidth tasks such as device control commands and status synchronization. This represents the bandwidth allocated to the basic video channel, ensuring that all cameras can maintain at least a basic level of video stream transmission. This represents the bandwidth allocated to the enhanced video channel, providing higher quality transmission capabilities for high-definition or ultra-high-definition camera devices. After determining the bandwidth allocation, the data from each camera device is categorized: control commands and status information are assigned to the control channel, basic resolution video streams are assigned to the basic video channel, and high-definition video streams are assigned to the enhanced video channel, resulting in a device data classification result. Assume the control data size of the camera device is... The basic video stream data size is The size of the high-definition video stream data is The data classification matrix of the device is then represented as:
[0140]
[0141] Each row represents a camera device. This corresponds to the data size on the control channel, basic video channel, and enhanced video channel. Based on a preset time-division multiplexing period, the time axis is divided into fixed-length reference time slots, and channels are marked in the order of control channel, basic video channel, and enhanced video channel to form a time-division multiplexing scheduling sequence. Assuming a time-division multiplexing period... Classified as If there are 1 time slot, then the length of each time slot is... The calculation is as follows:
[0142]
[0143] When allocating time slots, necessary time slots are reserved for the control channel, followed by allocation to the basic video channel, and finally, the remaining time slots are allocated to the enhancement video channel. After determining the scheduling sequence, appropriate time slots are allocated to each camera device based on the device data classification results, forming a device time slot allocation table. Assume the devices... need One control channel time slot, One basic video channel slot, If there is an enhanced video channel slot, then:
[0144]
[0145] The time slot allocation table for all camera devices in the entire system is represented as follows:
[0146]
[0147] in, Representative equipment In the passage The number of time slots allocated. After the equipment time slot allocation table is determined, the transmission priority of time slots for different channels is set according to the preset quality of service requirements, resulting in a channel service level table. The control channel requires the highest priority. Priority of basic video channels Secondly, prioritize the video channel. Lowest. Priority relationship satisfies:
[0148]
[0149] The specific priority of each channel is represented by a numerical value, for example:
[0150]
[0151] Obtain the channel service level table:
[0152]
[0153] By combining the device time slot allocation table with the channel service level table, a mapping relationship between camera devices and transmission channels is established, and a multi-channel data transmission control table is generated according to preset data packet scheduling rules. The mapping relationship is represented as follows:
[0154]
[0155] Each row represents a camera device. In a certain time slot Internal transmission priority .
[0156] In one specific embodiment, the process of performing step 400 may specifically include the following steps:
[0157] For each camera device in the multi-channel data transmission control table, the control data channel, basic video channel, and enhanced video channel are sampled according to a preset sampling period to collect data on bandwidth utilization, packet loss rate, and transmission latency, thus obtaining a multi-level monitoring dataset.
[0158] The performance scores for each channel are obtained by performing hierarchical calculations on the multi-level monitoring dataset;
[0159] Input the performance scores of each channel into the preset proportional-integral-derivative control model, calculate the bandwidth correction for the control data channel, the basic video channel, and the enhanced video channel respectively, and obtain the bandwidth adjustment coefficient.
[0160] The bandwidth adjustment coefficient is constrained according to the preset upper and lower limits of the resource quota. The constrained adjustment coefficient is substituted into the preset linear programming model to solve for the optimal bandwidth allocation value that satisfies the constraints, and the bandwidth allocation scheme is obtained.
[0161] The time-division multiplexing scheduling sequence in the multi-channel data transmission control table is modified according to the bandwidth allocation scheme to obtain the updated transmission control strategy;
[0162] By establishing a correspondence between the updated transmission control strategy and the camera device identifier and channel type identifier, a collaborative transmission optimization scheme is obtained.
[0163] Specifically, the performance of each camera device in the multi-channel data transmission control table is monitored according to a preset sampling period. Data on bandwidth utilization, packet loss rate, and transmission latency are collected to obtain a multi-level monitoring dataset. Assume the system has a total of... Each camera device has three channels: a control data channel, a basic video channel, and an enhancement video channel. Therefore, the bandwidth utilization rate for each device during each sampling period is... Packet loss rate and transmission delay Measurements were taken, including Representing the One camera device Representing channel types (1: control channel, 2: basic video channel, 3: enhanced video channel), thus constructing a multi-level monitoring dataset:
[0164]
[0165] Each row represents performance monitoring data for three channels of a camera device. The multi-level monitoring dataset is hierarchically calculated to obtain a performance score for each channel. The performance score is calculated based on a weighted sum of bandwidth utilization, packet loss rate, and transmission latency, with the weights assumed to be as follows: Then the first A camera device in the passage Performance score The calculation is as follows:
[0166]
[0167] in, Weights representing bandwidth utilization The weights representing packet loss rate The weights representing transmission delay satisfy:
[0168]
[0169] Performance scores help the system identify which channels have low transmission quality and require increased bandwidth allocation, and which channels have high transmission quality and require appropriate bandwidth reduction. The performance scores of each channel are input into a proportional-integral-derivative (PID) control model to calculate the bandwidth correction amount, resulting in the bandwidth adjustment coefficient. The PID control model is used to dynamically adjust bandwidth allocation, allowing it to smoothly adapt to changes in network conditions. For each channel... Bandwidth correction amount The PID control formula is as follows:
[0170]
[0171] in, These are the proportional, integral, and differential gain coefficients; the error term. The calculation is as follows:
[0172]
[0173] in, This is the expected channel performance score. This is the currently measured channel performance score. Resource constraints are applied to the bandwidth adjustment coefficient to ensure that bandwidth adjustments do not exceed the preset upper and lower limits of the resource quota. Assume the channel... The minimum and maximum allowed bandwidths are respectively and The constraint handling is as follows:
[0174]
[0175] in, This represents the adjusted bandwidth value. The constrained adjustment coefficients are substituted into a pre-defined linear programming model to solve for the optimal bandwidth allocation value that satisfies the constraints. The goal of linear programming is to maximize the overall system throughput while satisfying resource constraints.
[0176]
[0177] The constraints are:
[0178]
[0179] Solving this linear programming problem yields the final bandwidth allocation scheme. Based on the bandwidth allocation scheme, the time-division multiplexing scheduling sequence in the multi-channel data transmission control table is modified to obtain the updated transmission control strategy. Assuming the new bandwidth allocation leads to time slot reallocation, the new time slot length... The calculation is as follows:
[0180]
[0181] in, Represents camera equipment In the passage The actual data rate is determined. The updated transmission control strategy is then mapped to the camera device identifier and channel type identifier to generate a collaborative transmission optimization scheme. The final optimization scheme table is as follows:
[0182]
[0183] Each row represents the bandwidth allocation scheme for a camera device on a specific channel, ensuring that the entire system dynamically adjusts bandwidth allocation based on real-time network conditions, thereby improving data transmission stability and service quality.
[0184] The above describes the multi-camera device connection management method based on portable WiFi in the embodiments of this application. The following describes the multi-camera device connection management system 10 based on portable WiFi in the embodiments of this application. Please refer to [link / reference]. Figure 2 One embodiment of the multi-camera device connection management system 10 based on portable WiFi in this application includes:
[0185] Calculation module 11 is used to calculate the resource limitation coefficient in a portable WiFi environment;
[0186] The alternating acquisition module 12 is used to generate a distributed management configuration table for the management of multiple cameras in the portable WiFi based on the resource constraint coefficient, and to perform alternating acquisition of active scanning and passive listening to obtain a camera access priority table.
[0187] The allocation module 13 is used to allocate resources to the camera devices in the camera access priority table, obtain a multi-camera resource allocation strategy, and divide and allocate three-layer transmission channels based on the multi-camera resource allocation strategy to obtain a multi-channel data transmission control table.
[0188] Module 14 is established to create a multi-level resource feedback mechanism in the portable WiFi environment based on the multi-channel data transmission control table, and to dynamically calculate the bandwidth allocation ratio between camera devices to obtain a collaborative transmission optimization scheme.
[0189] Through the collaborative efforts of the aforementioned components and the establishment of a resource constraint coefficient calculation mechanism, precise quantification of system resource status in a portable WiFi environment is achieved. The adoption of a distributed management architecture and multi-level task partitioning strategy reduces system resource overhead and improves the operational efficiency of multi-camera management in a portable WiFi environment. A time-division multiplexing mechanism combining active scanning and passive listening reduces resource consumption during device discovery and improves the reliability of multi-camera access. A multi-layered transmission channel partitioning method enables differentiated transmission of control data and video data, ensuring timely and reliable delivery of system control commands. A hierarchical resource feedback mechanism and dynamic bandwidth allocation strategy enhance the system's adaptability to network fluctuations and guarantee the transmission quality of multiple video data streams. Time-division multiplexing scheduling and priority management improve the utilization efficiency of limited bandwidth resources, enabling efficient collaborative operation of multiple camera devices. The introduction of a multi-level resource feedback mechanism allows the system to dynamically adjust resource allocation strategies based on real-time monitoring data, improving system operational stability.
[0190] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0191] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0192] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for managing the connection of multiple camera devices based on portable WiFi, characterized in that, The method includes: Calculate the resource limitation coefficient in a portable WiFi environment; Based on the resource constraint coefficient, a distributed management configuration table for managing multiple cameras in portable WiFi is generated, and alternating active scanning and passive listening are performed to obtain a camera access priority table. The process of alternating active scanning and passive listening includes: periodically calculating the resource allocation ratio in the distributed management configuration table, dividing it according to a preset value for the alternating time slot ratio of active scanning and passive listening, to obtain an alternating acquisition time slot table; within the active scanning time slot, sending probe request frames sequentially to a preset channel sequence according to a preset dwell time; and within the passive listening time slot, sending probe request frames to the current optimal channel. The system receives detection response frames to obtain device discovery data. This data is then categorized and extracted: signal strength values are extracted from active scanning data, and power level values are extracted from passive listening data, resulting in dual-mode acquisition data. A performance evaluation matrix is established based on this dual-mode acquisition data, and the average signal strength and power level values within each time slot are weighted to obtain a device performance score. This performance score is then graded to obtain a priority sequence, which is associated with the camera device's identification information and the corresponding acquisition time slot number to obtain a camera access priority table. Resource allocation is performed on the camera devices in the camera access priority table to obtain a multi-camera resource allocation strategy. Based on the multi-camera resource allocation strategy, a three-layer transmission channel is divided and allocated to obtain a multi-channel data transmission control table. Based on the multi-channel data transmission control table, a multi-level resource feedback mechanism is established in the portable WiFi environment, and the bandwidth allocation ratio between camera devices is dynamically calculated to obtain a collaborative transmission optimization scheme.
2. The multi-camera device connection management method based on portable WiFi according to claim 1, characterized in that, The calculation of the resource limitation coefficient in a portable WiFi environment includes: The system monitoring interface reads real-time values of CPU usage, memory usage, and battery level from the portable WiFi device to obtain basic resource data. The validity of the basic resource data is then verified to obtain valid resource data. The effective resource data is standardized to obtain standardized resource indicators, and the radio frequency interface of the portable WiFi is subjected to channel detection to obtain radio frequency resource indicators. The standardized resource indicators and the radio frequency resource indicators are weighted and fused to obtain the initial fusion coefficient; By applying the resource-constrained calculation formula and performing exponential smoothing on the initial fusion coefficient according to the time series, the resource-constrained coefficient is obtained. The resource-constrained calculation formula is: R t =0.7×R t-1 +0.3×R t , where R t R is the current resource constraint factor. t-1 This represents the resource constraint coefficient for the previous period.
3. The multi-camera device connection management method based on portable WiFi according to claim 1, characterized in that, The process of generating a distributed management configuration table for managing multiple cameras in a portable WiFi device based on the resource constraint coefficient includes: The resource constraint coefficient is compared with a preset first threshold and a second threshold to obtain a resource status level value; Based on the resource status level value, the resources of the device management module, network management module, and data processing module are divided according to a preset ratio to obtain the resource allocation ratio value of each module; The total number of threads in each module is multiplied by the resource allocation ratio, and a preset thread waiting timeout is set to obtain the thread pool configuration data for each module. The preset memory capacity of each module is multiplied by the resource allocation ratio, and a circular message queue is established to obtain the data exchange configuration data between modules. The resource allocation ratio of each module is multiplied by the preset priority coefficient to obtain the task scheduling priority data between modules; The thread pool configuration data, the data exchange configuration data, and the task scheduling priority data are integrated and a correspondence with the module identifier is established to obtain the distributed management configuration table.
4. The multi-camera device connection management method based on portable WiFi according to claim 1, characterized in that, The process involves allocating resources to camera devices in the camera access priority table to obtain a multi-camera resource allocation strategy, and then dividing and allocating three-layer transmission channels based on this strategy to obtain a multi-channel data transmission control table, including: The basic resource overhead data is obtained by counting the number of bytes in the control messages, heartbeat packets, and status synchronization messages of each camera device in the camera access priority table. The video resolution parameters of each camera device are queried and matched with a preset bandwidth mapping table to obtain video transmission bandwidth data; The basic resource overhead data is added to the video transmission bandwidth data and multiplied by a preset fluctuation factor to obtain the total resource requirement of each camera device. The total resource requirement of all camera devices is accumulated to obtain the overall system requirement data. Divide the current available bandwidth capacity of the portable WiFi by the overall system demand data to obtain the quotient result, compare the quotient result with the preset target value, and select either a priority allocation scheme or a proportional reduction scheme to obtain the resource allocation mode. The total resource requirement of each camera device is calculated according to the resource allocation mode. When it is priority allocation, it is allocated in order of access priority from high to low. When it is proportional reduction, the total resource requirement is multiplied by the capacity ratio to obtain the device resource quota. A dynamic adjustment range is set for the device resource quota, and a quota mapping table is established according to the device identifier to obtain the multi-camera resource allocation strategy; The multi-camera resource allocation strategy is divided into three transmission channels. Based on the time-division multiplexing mechanism, a control data channel and a video data channel are allocated to each camera device to obtain a multi-channel data transmission control table.
5. The multi-camera device connection management method based on portable WiFi according to claim 4, characterized in that, The multi-camera resource allocation strategy involves dividing the transmission channels into three layers. Based on a time-division multiplexing mechanism, a control data channel and a video data channel are allocated to each camera device, resulting in a multi-channel data transmission control table, including: The multi-camera resource allocation strategy is divided into resource intervals according to control channel, basic video channel and enhanced video channel to obtain the basic bandwidth configuration of the three-layer channel. The data from each camera device is classified, with control commands and status information assigned to the control channel, basic resolution video stream assigned to the basic video channel, and high resolution video stream assigned to the enhanced video channel, thus obtaining the device data classification results. Based on a preset time-division multiplexing period, the time axis is divided into fixed-length reference time slots. Each time slot is marked with channels in the order of control channel, basic video channel, and enhanced video channel to obtain a time-division multiplexing scheduling sequence. For each camera device, a transmission window is allocated in the time-division multiplexing scheduling sequence according to the device data classification results, resulting in a device time slot allocation table; Based on the preset quality of service requirements, the transmission priority of various data channels in the device time slot allocation table is set to obtain the channel service level table. The device time slot allocation table is combined with the channel service level table to establish a mapping relationship between camera devices and transmission channels, and a multi-channel data transmission control table is generated according to the preset data packet scheduling rules.
6. The multi-camera device connection management method based on portable WiFi according to claim 1, characterized in that, The step of establishing a multi-level resource feedback mechanism in a portable WiFi environment based on the multi-channel data transmission control table, and dynamically calculating the bandwidth allocation ratio between camera devices to obtain a collaborative transmission optimization scheme includes: For each camera device in the multi-channel data transmission control table, the control data channel, basic video channel, and enhanced video channel are sampled according to a preset sampling period to collect data on bandwidth utilization, packet loss rate, and transmission latency, thereby obtaining a multi-level monitoring dataset. The multi-level monitoring dataset is subjected to hierarchical calculations to obtain the performance score for each channel. The performance scores of each channel are input into a preset proportional-integral-derivative control model, and the bandwidth correction amount is calculated for the control data channel, the basic video channel, and the enhanced video channel respectively to obtain the bandwidth adjustment coefficient. The bandwidth adjustment coefficient is constrained according to the preset upper and lower limits of resource quota. The constrained adjustment coefficient is substituted into the preset linear programming model to solve for the optimal bandwidth allocation value that satisfies the constraints, and the bandwidth allocation scheme is obtained. The time-division multiplexing scheduling sequence in the multi-channel data transmission control table is modified according to the bandwidth allocation scheme to obtain the updated transmission control strategy; The updated transmission control strategy is then associated with the camera device identifier and channel type identifier to obtain a collaborative transmission optimization scheme.
7. A multi-camera device connection management system based on portable WiFi, characterized in that, The system is used to perform the multi-camera device connection management method based on portable WiFi as described in any one of claims 1-6, the system comprising: The calculation module is used to calculate the resource limitation coefficient in a portable WiFi environment; The alternating acquisition module is used to generate a distributed management configuration table for the management of multiple cameras in the portable WiFi based on the resource constraint coefficient, and to perform alternating acquisition of active scanning and passive listening to obtain a camera access priority table. The allocation module is used to allocate resources to the camera devices in the camera access priority table, obtain a multi-camera resource allocation strategy, and perform three-layer transmission channel division and allocation based on the multi-camera resource allocation strategy to obtain a multi-channel data transmission control table. A module is established to create a multi-level resource feedback mechanism in the portable WiFi environment based on the multi-channel data transmission control table, and to dynamically calculate the bandwidth allocation ratio between camera devices to obtain a collaborative transmission optimization scheme.