Multi-camera device connection management method and system based on portable WiFi
By calculating resource constrained coefficients and generating distributed management configuration tables in a portable WiFi environment, the network resource competition problem caused by access to multiple cameras is solved, efficient resource allocation and bandwidth management are achieved, and video transmission quality and system stability are improved.
Patent Information
- Application Number
- CN202510183309.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-02-19
AI Technical Summary
In mobile scenarios, the simultaneous access of multiple camera devices in a portable WiFi environment will lead to intensifying competition for network resources, resulting in network congestion and affecting the quality of video transmission.
By calculating resource constraint coefficients, a distributed management configuration table is generated, and the alternate acquisition of active scanning and passive listening is performed, the camera access priority table is obtained, and resource allocation and layer three transmission channel division are performed based on this, a multi-level resource feedback mechanism is established, and the bandwidth allocation ratio is dynamically calculated.
It improves the utilization efficiency of limited bandwidth resources, realizes efficient collaborative work of multi-camera equipment, enhances the system's ability to adapt to network fluctuations, and ensures the transmission quality of multiple video data.
Smart Images

Figure CN119997260A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of device connection technology, and in particular to a multi-camera device connection management method and system based on portable WiFi. Background Art
[0002] With the rapid development of video surveillance technology, the demand for multi-camera applications in mobile scenarios is growing. Traditional video surveillance systems mainly rely on fixed network architectures, which are difficult to meet the flexible deployment requirements in mobile scenarios. As a portable network device, pocket WiFi provides a new solution for mobile video surveillance, but its resource-constrained nature brings challenges to multi-camera access management.
[0003] In a portable WiFi environment, the simultaneous access of multiple camera devices will lead to intensified competition for network resources. Traditional centralized management methods are difficult to effectively coordinate and allocate limited network resources. Especially when bandwidth resources are limited, the concurrent transmission of multiple video data channels can easily cause network congestion and affect the quality of video transmission. At the same time, the network status in mobile scenarios fluctuates greatly, requiring a more flexible resource scheduling mechanism. Summary of the invention
[0004] The present 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 efficient collaborative work of multiple camera devices.
[0005] The first aspect of the present application provides a multi-camera device connection management method based on portable WiFi, and the multi-camera device connection management method based on portable WiFi includes:
[0006] Calculate the resource limitation coefficient in the portable WiFi environment;
[0007] Generate a distributed management configuration table of multiple camera management tasks in the portable WiFi based on the resource limitation coefficient, and perform active scanning and passive listening alternating collection to obtain a camera access priority table;
[0008] Allocate resources for 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;
[0009] A multi-level resource feedback mechanism is established in a portable WiFi environment according to the multi-channel data transmission control table, and the bandwidth allocation ratio between camera devices is dynamically calculated to obtain a collaborative transmission optimization solution.
[0010] A second aspect of the present application provides a multi-camera device connection management system based on a portable WiFi, and the multi-camera device connection management system based on a portable WiFi includes:
[0011] A calculation module, used to calculate the resource limitation coefficient in a portable WiFi environment;
[0012] An alternating acquisition module is used to generate a distributed management configuration table of multiple camera management tasks in the portable WiFi based on the resource limitation coefficient, and perform active scanning and passive listening alternating acquisition to obtain a camera access priority table;
[0013] An allocation module is used to 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;
[0014] A module is established to establish a multi-level resource feedback mechanism in a portable WiFi environment according to the multi-channel data transmission control table, and dynamically calculate the bandwidth allocation ratio between camera devices to obtain a collaborative transmission optimization solution.
[0015] Compared with the prior art, the present application has the following beneficial effects: by establishing a resource-constrained coefficient calculation mechanism, the accurate quantification of the system resource status in the portable WiFi environment is achieved, and the distributed management architecture and multi-level task division strategy are adopted to reduce the system resource overhead and improve the operating efficiency of multi-camera management in the portable WiFi environment. Through the time-division multiplexing mechanism combining active scanning with passive listening, the resource consumption of the device discovery process is reduced, and the reliability of multi-camera access is improved. Based on the division method of multi-layer transmission channels, the differentiated transmission of control data and video data is realized, ensuring the timely and reliable transmission of system control instructions. The hierarchical resource feedback mechanism and dynamic bandwidth allocation strategy are adopted to enhance the system's adaptability to network fluctuations and ensure the transmission quality of multi-channel video data. Through time-division multiplexing scheduling and priority management, the utilization efficiency of limited bandwidth resources is improved, and efficient collaborative work of multi-camera devices is achieved. The introduction of a multi-level resource feedback mechanism enables the system to dynamically adjust the resource allocation strategy according to real-time monitoring data, thereby improving the stability of system operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0017] The structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with this technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantive technical significance. Any structural modification, change in proportion or adjustment of size, without affecting the effects and purposes that can be achieved by the present invention, should still fall within the scope of the technical contents disclosed by the present invention.
[0018] Figure 1 It is a flowchart of a multi-camera device connection management method based on portable WiFi provided by an embodiment of the present invention;
[0019] Figure 2 It is a schematic block diagram of the structure of a multi-camera device connection management system based on portable WiFi provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0021] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0022] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0023] It should be further understood that the term "and / or" used in the specification and appended claims of this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations. Figure 1 , an embodiment of the multi-camera device connection management method based on portable WiFi in the embodiment of the present application includes:
[0024] Step 100: Calculate the resource limitation coefficient in the portable WiFi environment;
[0025] It is understandable that the execution subject of the present application can be a multi-camera device connection management system based on portable WiFi, or a terminal or a server, which is not limited here. The present application embodiment is described by taking the server as the execution subject as an example.
[0026] Specifically, the key parameters such as CPU occupancy, memory usage and power level of the portable WiFi are read in real time through the system monitoring interface to obtain basic resource data. CPU occupancy reflects the current computing load of the device, while memory usage affects the system's ability to process and cache data. At the same time, the power level determines the endurance of the device. The validity of the basic resource data is verified, such as eliminating sudden data jitter, extreme values or measurement errors under abnormal operating conditions to obtain effective resource data. The effective resource data is standardized, and methods such as normalization and Z-score standardization are used to eliminate differences in data units and value ranges to obtain standardized resource indicators. At the same time, channel detection is performed on the RF interface of the portable WiFi to obtain RF resource indicators. The availability of RF resources is mainly affected by factors such as channel occupancy, signal interference, and WiFi signal strength, and these parameters directly determine the data transmission capacity of the camera device in a wireless environment. High channel occupancy means that the WiFi channel is close to saturation, thereby 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 combine information from multiple dimensions to ensure the accuracy of the calculation results. The standardized resource indicators and radio frequency resource indicators are weighted and fused to obtain the initial fusion coefficient. The weighted fusion method is adjusted according to the degree of influence of different resources on the overall performance of the portable WiFi. For example, CPU occupancy and memory usage have a greater impact on data processing capabilities, while the radio frequency channel status 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 degree of resource limitation currently faced by the portable WiFi. Through the resource limitation calculation formula, the initial fusion coefficient is exponentially smoothed according to the time series to obtain the resource limitation coefficient. The exponential smoothing formula is used, that is, the initial fusion coefficient of the current period and the resource limitation coefficient of the previous period are calculated according to a certain time decay weight to obtain the final resource limitation coefficient. The exponential smoothing calculation formula is: ,in, represents the resource constraint coefficient calculated at the current moment, and represents the resource constraint coefficient of the previous period, while 0.7 and 0.3 are smoothing weight coefficients, which respectively represent the influence of historical data and current data on the final calculation result.
[0027] Step 200: Generate a distributed management configuration table for multi-camera management tasks in the portable WiFi based on the resource limitation coefficient, and perform active scanning and passive listening alternating collection to obtain a camera access priority table;
[0028] Specifically, the resource restriction coefficient is compared with the preset first threshold and second threshold to determine the resource status level value of the current WiFi environment. If the resource restriction coefficient is lower than the first threshold, it means that the system resources are sufficient, supporting more cameras to access and providing higher bandwidth allocation; if the resource restriction coefficient is higher than the second threshold, it means that the WiFi environment is already in a high-load state, strictly restricting the access of new devices and optimizing the data transmission strategy of existing devices; when the resource restriction coefficient is between the two thresholds, the system is in a medium-load state, and the resource allocation strategy is dynamically adjusted to improve the overall efficiency while ensuring stability. According to the resource status level value, the device management module, the network management module and the data processing module are divided into resources. According to the resource restriction situation, the resources are allocated in 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 multi-camera devices, the network management module is used to optimize the utilization efficiency and data transmission strategy of the WiFi channel, and the data processing module is responsible for 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 of each module is multiplied by the resource allocation ratio value, and combined with the preset thread waiting timeout duration to determine the thread pool configuration data of each module. Reasonable configuration of the thread pool helps to improve the concurrent performance of the system. When resources are limited, the size of the thread pool needs to be appropriately reduced to reduce system overload and thread contention. When resources are sufficient, the size of the thread pool is expanded to improve the multi-task processing capability. At the same time, the preset memory capacity of each module is multiplied by the resource allocation ratio value, 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 to ensure that the video data of the camera is transmitted to the target device or server in time. The resource allocation ratio value of each module is multiplied by the preset priority coefficient to determine the priority relationship of each module during the task execution process. For critical tasks, such as camera access management and signal quality detection, higher priority is given, while for secondary tasks, such as data logging and low-frequency status monitoring, their priority is reduced, thereby optimizing the task scheduling efficiency of the system. The thread pool configuration data, data exchange configuration data, and task scheduling priority data are integrated, and the corresponding relationship with the module identifier is established to generate a distributed management configuration table, so that different modules can dynamically adjust their operation mode according to the resource status of the current WiFi environment, thereby improving the overall performance of the system. Active scanning and passive listening are performed alternately according to the distributed management configuration table to obtain the signal quality and power level of multi-camera devices.Active scanning actively queries the status information of camera devices by sending detection requests, while passive listening obtains the real-time connection status, signal strength, and data traffic requirements of devices by monitoring WiFi signals and analyzing the camera's beacon frames. In the process of collecting data, a time-division multiplexing evaluation method is adopted, that is, the signal quality and power level of camera devices are analyzed in turn at different time intervals, and a comprehensive evaluation is performed in combination with historical data trends to improve the accuracy of priority calculation. Based on these comprehensive evaluation data, a camera access priority table is generated, which determines which camera devices have priority access to the WiFi network, and which devices have their bandwidth allocation reduced or are temporarily disconnected when resources are limited.
[0029] Based on the resource allocation ratio value in the distributed management configuration table, the periodic calculation is performed, and the alternating time slot ratio of active scanning and passive listening is divided to obtain the alternating acquisition time slot table. A preset value is set as the time slot ratio of active scanning and passive listening, so that the system can maximize the collection of effective data within a limited time window. In the active scanning time slot, the preset channel sequence is sent in sequence according to the preset dwell time, thereby actively triggering the camera device to respond, and in the passive listening time slot, the current optimal channel is received. The probe response frame is received, so the beacon information of the camera device is passively monitored to obtain the device discovery data. The device discovery data is classified and extracted, and valuable information is extracted from the data streams of active scanning and passive listening respectively. In the active scanning data, since the system actively sends a probe request to the camera device, the signal strength value returned is extracted, and the signal strength value directly reflects the link quality between the device and the WiFi hotspot. In the passive listening data, since the camera device periodically sends a status beacon, which often contains the remaining power information, its power level value is extracted to form a dual-mode acquisition data containing signal strength and power level. A performance evaluation matrix is established based on the dual-mode acquisition data to calculate the mean signal strength and the mean power level within the time period, and these values are weighted to obtain the device performance score. The performance evaluation matrix is constructed by considering the data within multiple time slot periods, and the signal strength and power level of each device are normalized so that the data is distributed within a comparable range. The comprehensive performance score is calculated according to the set weighting parameters, and the contribution weights of signal quality and power to the final score are reasonably allocated. The device performance scores are graded to generate a graded priority sequence. The method for constructing the graded priority sequence adopts a threshold division method to divide the devices into high priority, medium priority and low priority categories according to the range of device performance scores, so as to ensure that when the portable WiFi resources are limited, high-priority camera devices are accessed first, and the access of low-priority devices is restricted when necessary. The graded priority sequence is associated with the identification information of the camera device and the corresponding acquisition time slot number, and finally the camera access priority table is obtained. This priority table will serve as the core data structure for WiFi network management, guiding the dynamic access decisions of multi-camera devices, ensuring that the most important devices can always maintain a stable connection when resources are limited, and supporting more devices to access 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 for 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 number of bytes of the control message, heartbeat packet and status synchronization message of each camera device is counted to calculate the basic resource overhead data. Since the transmission frequency of the control message and heartbeat packet is high, and the status synchronization message contains the operating status information of the camera, the statistics of these data can reflect the basic resource consumption of the camera in non-video stream data transmission. After the statistics are completed, the video resolution parameter of each camera device is queried and matched with the preset bandwidth mapping table to calculate the video transmission bandwidth data. The basic resource overhead data is added to the video transmission bandwidth data and multiplied by the preset fluctuation factor to calculate the total resource demand of each camera device. The introduction of the fluctuation factor is to cope with the dynamic changes in the network environment, such as the impact of factors such as channel interference, data retransmission and burst data traffic on bandwidth occupancy, so that resource allocation can be more flexible. The total resource demand of all camera devices is accumulated to obtain the overall demand data of the system, which is used to evaluate the overall load of the portable WiFi. Calculate the current available bandwidth capacity of the portable WiFi and divide it by the overall system demand data to obtain the quotient result, which reflects whether the current system available bandwidth is sufficient to meet the needs of all camera devices, and compare it with the preset target value to select the appropriate resource allocation mode. When the quotient result reaches or exceeds the preset target value, it indicates that the current available bandwidth can meet the needs of all camera devices. The priority order allocation scheme is adopted, that is, resources are allocated in order from high to low according to the camera access priority, ensuring that high-priority devices obtain stable bandwidth support. When the quotient result 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, the proportional reduction scheme is adopted, that is, the total resource demand of all devices is multiplied by the capacity ratio to ensure that the bandwidth is proportionally distributed among all devices, thereby avoiding the situation where some devices cannot access at all. After determining the resource allocation mode, the total resource demand of each camera device is calculated according to the specific mode. If the priority order allocation is adopted, the resources are allocated in order from high to low according to the access priority until the bandwidth is exhausted; if the proportional reduction is adopted, 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 interval is set for the resource quota of each device, and a quota mapping table is established according to the device identifier to obtain a multi-camera resource allocation strategy. The setting of the dynamic adjustment interval can improve the flexibility of resource allocation, allowing the system to fine-tune resource allocation according to the real-time network status, avoiding data flow interruption or freeze caused by sudden changes in bandwidth occupancy. Based on the formulated multi-camera resource allocation strategy, the three-layer transmission channel is divided to ensure the stable transmission of the data stream. The time division multiplexing mechanism is used to divide the transmission channels of different camera devices, and the control data channel and video data channel are allocated to each device respectively.Among them, the control data channel is used to transmit the camera's control message, heartbeat packet and status synchronization message, while the video data channel is used to transmit video stream data. Through reasonable channel division, the system can ensure that the control data can still be transmitted stably under high load environment, while optimizing the bandwidth utilization of video data stream to reduce data conflict and transmission delay. After completing the three-layer transmission channel division, a multi-channel data transmission control table is formed, which contains the resource quota of each camera device, dynamic adjustment interval, and the allocation of control data channel and video data channel, and guides the real-time data transmission of the entire multi-camera system.
[0032] The resource allocation strategy of multiple cameras is divided into control channel, basic video channel and enhanced video channel according to different data types, so as to determine the resource interval and obtain the basic bandwidth configuration of the three-layer channel. The control channel is used to transmit the control instructions, heartbeat signal and status synchronization information of the device, the basic video channel is used to transmit the standard definition video stream, and the enhanced video channel is used to transmit the high-definition or ultra-high-definition video stream. Since different types of data have different requirements for bandwidth and real-time performance, the available bandwidth in the portable WiFi environment is considered when dividing the resource interval to ensure the stability of the control channel. At the same time, while meeting the requirements of the basic video channel, as many available resources as possible are provided for the enhanced video channel. The data of each camera device is classified so that it can be allocated to different channels according to the data type. Control instructions and status information should be classified into the control channel to ensure that the camera device receives management instructions in real time and reports its operating status to the management end; the basic definition video stream generated by the camera should be classified into the basic video channel to ensure that all camera devices can at least maintain basic video transmission functions even when the bandwidth is limited; and the high-definition video stream is classified into the enhanced video channel to provide higher quality visual data when the bandwidth allows. This classification process effectively optimizes the bandwidth utilization of portable WiFi, so that different types of data streams will not interfere with each other during transmission, thereby improving the stability and transmission efficiency of the overall network. After the data classification is completed, based on the preset time division multiplexing cycle, the time axis is divided into reference time slots of fixed length, and each time slot is marked in the order of control channel, basic video channel and enhanced video channel to obtain the time division multiplexing scheduling sequence. The application of the time division multiplexing mechanism can effectively reduce the conflict when multiple camera devices send data at the same time, avoid data packet loss or bandwidth contention problems, and improve the orderliness and stability of transmission. After the time division multiplexing scheduling sequence is generated, according to the device data classification results, a transmission window is allocated to each camera device in the sequence to form a device time slot allocation table. When allocating time slots, the priority of the camera, the type of data stream and the bandwidth status of the WiFi environment are considered. For example, high-priority cameras are allocated more time slots, while low-priority cameras only get limited basic video transmission time slots. After the device time slot allocation table is generated, the transmission priority of each data channel is set according to the preset service quality requirements to obtain a channel service level table. The control channel should have the highest priority to ensure that the camera device receives control instructions and synchronizes its 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 the bandwidth is limited. The enhanced video channel dynamically adjusts its priority based on the bandwidth margin to ensure high-quality video data when the bandwidth is sufficient, and automatically reduces the transmission rate or frame rate when the bandwidth is insufficient, thereby adapting to the volatility of the portable WiFi environment.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 the final multi-channel data transmission control table is generated according to the preset data packet scheduling rules. The data packet scheduling rules are dynamically adjusted according to the priority, time slot allocation and network load to ensure the fairness and efficiency of data transmission. On this basis, by real-time monitoring of the bandwidth status of the WiFi environment and the operation of the equipment, the data transmission strategy is dynamically optimized to ensure that multi-camera devices can achieve efficient and stable data transmission in the portable WiFi environment, thereby improving the overall performance of the system and user experience.
[0033] Step 400: Establish a multi-level resource feedback mechanism in a portable WiFi environment according to the multi-channel data transmission control table, and dynamically calculate the bandwidth allocation ratio between camera devices to obtain a collaborative transmission optimization solution.
[0034] Specifically, data monitoring is performed on each camera device in the multi-channel data transmission control table, and data collection of bandwidth utilization, packet loss rate and transmission delay is performed for the control data channel, basic video channel and enhanced video channel according to the preset sampling period to obtain a multi-level monitoring data set. The monitoring of bandwidth utilization helps to evaluate whether there is resource waste or bandwidth saturation in the current channel. The measurement of packet loss rate reflects the stability of data transmission, and the transmission delay is directly related to the real-time performance of the video stream. The multi-level monitoring data set is hierarchically calculated to evaluate the actual transmission performance of each channel, and the performance score of each channel is obtained through comprehensive analysis. The hierarchical calculation method is based on a set weighted scoring model, in which the contribution weights of bandwidth utilization, packet loss rate and transmission delay are adjusted according to different application scenarios. For example, in a low-latency scenario, the weight of the transmission delay indicator is increased, while in a high-throughput scenario, more attention is paid to the change of bandwidth utilization. After hierarchical calculation, the comprehensive performance level of the control data channel, basic video channel and enhanced video channel is determined. The performance score of each channel is input into a preset proportional integral differential (PID) control model to calculate the bandwidth correction amount of different channels and obtain the bandwidth adjustment coefficient. The introduction of the PID control model ensures that the bandwidth adjustment process can not only respond quickly to changes in network status, but also avoid 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 differential 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 required by different channels in the current network environment. The bandwidth adjustment coefficient is constrained according to the preset upper and lower limits of the resource quota so that it fluctuates 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 the preset linear programming model, and the optimal bandwidth allocation value that meets the constraint conditions is solved through optimization calculation to obtain the final bandwidth allocation plan. The setting of the linear programming model is based on the multi-objective optimization method, so that the final allocation plan can maximize the throughput and fairness of the overall system while ensuring the bandwidth requirements of high-priority camera devices. According to the bandwidth allocation scheme, the time division multiplexing scheduling sequence in the multi-channel data transmission control table is modified to make it conform to the new bandwidth allocation strategy, and the updated transmission control strategy is obtained. The modification of time division multiplexing scheduling is reflected in many aspects, such as increasing the number of time slots for high-priority cameras, reducing the occupancy 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 established in correspondence with the camera device identifier and the channel type identifier to generate a collaborative transmission optimization plan.
[0035] In the embodiment of the present application, by establishing a resource-limited coefficient calculation mechanism, the accurate quantification of the system resource status in the portable WiFi environment is achieved, and the distributed management architecture and multi-level task division strategy are adopted to reduce the system resource overhead and improve the operating efficiency of multi-camera management in the portable WiFi environment. Through the time-division multiplexing mechanism combining active scanning with passive listening, the resource consumption of the device discovery process is reduced, and the reliability of multi-camera access is improved. Based on the division method of multi-layer transmission channels, the differentiated transmission of control data and video data is realized, ensuring the timely and reliable transmission of system control instructions. The hierarchical resource feedback mechanism and dynamic bandwidth allocation strategy are adopted to enhance the system's adaptability to network fluctuations and ensure the transmission quality of multi-channel video data. Through time-division multiplexing scheduling and priority management, the utilization efficiency of limited bandwidth resources is improved, and efficient collaborative work of multi-camera devices is achieved. The introduction of a multi-level resource feedback mechanism enables the system to dynamically adjust the resource allocation strategy according to real-time monitoring data, thereby improving the stability of system operation.
[0036] In a specific embodiment, the process of executing step 100 may specifically include the following steps:
[0037] Through the system monitoring interface, read the real-time values of CPU occupancy, memory usage, and power level of the portable WiFi to obtain basic resource data, and perform validity verification on the basic resource data to obtain valid resource data;
[0038] Standardize the effective resource data to obtain standardized resource indicators, and perform channel detection on the radio frequency interface of the portable WiFi to obtain radio frequency resource indicators;
[0039] Perform weighted fusion on the standardized resource index and the radio frequency resource index to obtain an initial fusion coefficient;
[0040] Through the resource-constrained calculation formula, the initial fusion coefficient is exponentially smoothed according to the time series to obtain the resource-constrained coefficient. The resource-constrained calculation formula is: R t =0.7×R t-1 +0.3×R t , where R t is the current resource limitation coefficient, R t-1 is the resource constraint coefficient of the previous period.
[0041] Specifically, the CPU occupancy rate, memory usage and power level of the portable WiFi device are read in real time through the system monitoring interface. These parameters together constitute the basic resource data. ) indicates the current usage of the portable WiFi computing resources, ranging from 0 to 1 (or 0% to 100%). If it is too high, it means that the system computing resources are tight, which affects the camera data processing ability; memory usage (recorded as ) indicates the current usage of available memory. If If it is too high, it indicates that the system cache capacity is insufficient, affecting data storage and transmission; the power level (denoted as ) reflects the remaining power of the portable WiFi, expressed as a ratio of 0 to 1 (or 0% to 100%). If it is too low, it will affect the continuous operation capability of the equipment. The above three parameters constitute the basic resource data vector . Perform validity check on basic resource data to eliminate outliers and obtain valid resource data. Use sliding window filtering or median filtering method for smoothing. The mathematical expression of validity check uses threshold method, that is, if it satisfies:
[0042]
[0043] The data is valid, otherwise it is discarded and replaced with the historical average. The valid resource data is standardized, and the minimum-maximum normalization is used to transform the CPU usage, memory usage and power level respectively:
[0044]
[0045] in, They are the standardized CPU resources, memory resources and power resource indicators, all normalized to between 0 and 1 to make them comparable. These standardized resource data constitute the standardized resource indicator vector At the same time, the radio frequency interface of the portable WiFi is tested for channels to obtain radio frequency resource indicators. Radio frequency resource indicators include channel occupancy rate ( ), signal interference strength ( ) and data throughput ( ). Channel occupancy Reflects the busyness of the WiFi channel, ranging from 0 to 1. If the signal is too high, it means that the channel is close to saturation, affecting the data transmission of multiple cameras; signal interference intensity Reflects the degree of interference of WiFi by other wireless devices. Too high will cause packet loss or retransmission; data throughput Reflects the actual available transmission rate of the current WiFi. If it is too low, it means that the bandwidth is tight, which is not conducive to the transmission of camera video streams. The radio frequency resource indicators are also standardized:
[0046]
[0047] in, They represent the standardized channel availability, interference level and throughput capacity respectively. The RF resource indicator vector is expressed as . Standardized resource indicators and RF resource indicators Perform weighted fusion to calculate the initial fusion coefficient The mathematical expression of weighted fusion is:
[0048]
[0049] in, is the preset weight coefficient, which represents the influence of different resources on the overall resource limitation. The initial fusion coefficient is smoothed in time series using the exponential smoothing method to calculate the final resource limitation coefficient. The exponential smoothing formula is as follows:
[0050]
[0051] in, represents the resource constraint coefficient at the current moment, It represents the resource constraint coefficient at the previous moment. The coefficients 0.7 and 0.3 control the weights of historical data and current data respectively, so that the calculation results can remain stable and respond quickly to new changes.
[0052] In a specific embodiment, the process of executing step 200 may specifically include the following steps:
[0053] Compare the resource restriction coefficient with the preset first threshold and second threshold to obtain a resource status level value;
[0054] According to the resource status level value, the device management module, the network management module, and the data processing module are divided into resources with a preset ratio to obtain the resource allocation ratio value of each module;
[0055] The total number of threads of each module is multiplied by the resource allocation ratio value, and a preset thread waiting timeout is set to obtain the thread pool configuration data of each module;
[0056] Multiply the preset memory capacity of each module by the resource allocation ratio value, and establish a circular message queue to obtain data exchange configuration data between modules;
[0057] The resource allocation ratio value of each module is multiplied by the preset priority coefficient to obtain the task scheduling priority data between modules;
[0058] Integrate the thread pool configuration data, data exchange configuration data and task scheduling priority data, and establish a corresponding relationship with the module identifier to obtain a distributed management configuration table;
[0059] According to the distributed management configuration table, active scanning and passive listening are performed alternately to evaluate the signal quality and power level of multiple camera devices in a time-division multiplexing manner to obtain a camera access priority table.
[0060] Specifically, the resource constraint coefficient With the preset first threshold and the second threshold Compare to determine the current resource status level of the system. , it indicates that the system resources are sufficient and are managed according to a higher resource allocation standard. At this time, the resource status level value is defined ;like , it indicates that the system is in a medium load state and needs to optimize resource allocation appropriately to make each module run evenly. ;like , it means that the system resources are tight, strictly control resource allocation, and give priority to ensuring the stable operation of core functions. . Dynamically adjust the management strategy according to the different resource states. After the determination, the resource allocation ratio of the device management module, network management module and data processing module is divided according to the value to obtain the resource allocation ratio of each module. Assume that these modules are respectively denoted as (Device Management Module), (Network Management Module) and (data processing module), then their resource allocation ratio The following relationship needs to be satisfied:
[0061]
[0062] in, For device status monitoring and connection management, Responsible for network channel optimization and data transmission scheduling, It is used for preprocessing and encoding compression of video stream data. The specific allocation method is set as follows: When When , the weight of network management is increased to optimize data flow; and when When the resource allocation ratio is calculated, the resource allocation ratio of the device management module and the network management module is prioritized to maintain the basic operation of the system. Determine the thread pool configuration for each module. Assume that the total number of threads in the system is , then the number of threads for each module Calculated by the following formula:
[0063]
[0064] At the same time, set the thread waiting timeout To prevent thread resources from being occupied for a long time and affecting the system response speed. The configuration of the thread pool is expressed as:
[0065]
[0066] in Represents the final thread pool allocation scheme. After determining the thread pool configuration, calculate the data exchange configuration data between modules, that is, allocate appropriate memory capacity to each module and establish a circular message queue to ensure the stability of data transmission. Assume that the total available memory of the system is , the preset memory capacity of each module Obtained through the following calculation:
[0067]
[0068] At the same time, the size of the circular message queue is optimized according to the data flow, and the queue capacity is set :
[0069]
[0070] in It is an empirical adjustment coefficient that controls the depth of the queue to adapt to the data exchange requirements under different load conditions. Calculate the task scheduling priority, that is, based on the resource allocation ratio value and the preset priority coefficient Calculate the priority of each module:
[0071]
[0072] in Preset priority weights for different modules to ensure priority execution of key tasks. Integrate thread pool configuration data, data exchange configuration data, and task scheduling priority data, and establish a corresponding relationship with the module identifier to obtain a distributed management configuration table to guide the dynamic regulation of the system. Perform active scanning and passive listening alternating acquisition according to the distributed management configuration table, and perform time-division multiplexing evaluation of the signal quality and power level of multiple camera devices. During the active scanning time slot, the system will send a detection request and calculate the signal strength based on the return signal of the camera device. :
[0073]
[0074] in and Indicates the received signal power and the transmitted signal power respectively. During the passive listening time slot, the system parses the beacon frame of the camera device to extract the power level Based on these data, a camera access priority table is established, where the priority is calculated based on the signal strength, power level, and historical stability of the camera:
[0075]
[0076] in They are the importance weights of signal strength, power level, and historical stability. The access priority table is used to dynamically adjust the access strategy of camera devices to optimize the data transmission performance in a multi-camera environment.
[0077] In a specific embodiment, the execution step performs active scanning and passive listening alternately according to the distributed management configuration table, performs time-division multiplexing evaluation on the signal quality and power level of multiple camera devices, and obtains the camera access priority table. The process may specifically include the following steps:
[0078] The resource allocation ratio values in the distributed management configuration table are periodically calculated, and divided in a manner that the alternating time slot ratios of active scanning and passive listening are preset values, to obtain an alternating acquisition time slot table;
[0079] In the active scanning time slot, the detection request frame is sent to the preset channel sequence in sequence according to the preset dwell time, and in the passive listening time slot, the detection response frame is received for the current optimal channel to obtain the device discovery data;
[0080] Classify and extract device discovery data, extract signal strength values from active scanning data, and extract power level values from passive listening data to obtain dual-mode collection data;
[0081] A performance evaluation matrix is established based on the dual-mode acquisition data, and the average signal strength and power level in each time slot cycle are weighted to obtain the device performance score;
[0082] The device performance scores are graded to obtain a graded priority sequence, and the graded priority sequence is associated with the identification information of the camera device and the corresponding acquisition time slot number to obtain a camera access priority table.
[0083] Specifically, the cycle is calculated based on the resource allocation ratio value in the distributed management configuration table, and the time window is divided according to the alternating time slot ratio of active scanning and passive listening to obtain the 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 the device access priority. Set a scanning cycle , and then according to the preset active scanning time slot ratio and passive listening time slot ratio For time allocation, these two ratios meet:
[0084]
[0085] And calculate the active scanning time slot and passive listening slots :
[0086]
[0087] in, represents the time used for active scanning in each cycle, and Represents the time used for passive listening. In the active scanning time slot In the preset channel sequence Traverse and stay on each channel for a preset time Send probe request frames in sequence to actively detect the presence of camera devices. Dwell time for each channel Need to meet:
[0088]
[0089] After the probe request frame is sent, the WiFi device will receive the probe response frame returned by the camera device and record the device discovery data, including signal strength. and device MAC address . In the passive listening time slot The system monitors the current optimal channel , and receives the detection response frame of the camera device. At this time, extract the power level of the camera device , which is included in the load information field of the detection response frame and represents the remaining battery power of the current device. The value range is usually 0 to 1 (or 0% to 100%). After completing the active scanning and passive listening data collection, the device discovery data is classified and extracted to form dual-mode collection data. Extracting signal strength values from active scanning data sets , and extract the power level value from the passive listening dataset . These data form a two-mode data matrix:
[0090]
[0091] Each row corresponds to a camera device, including its MAC address, signal strength, and power level. Based on the dual-mode acquisition data, a performance evaluation matrix is established, and the average signal strength and power level in each time slot cycle are weighted to obtain the performance score of the device. The calculation formula is as follows:
[0092]
[0093] in, and are the weighting coefficients of signal strength and battery level, respectively. . Performance scores for all devices Perform hierarchical processing to generate a hierarchical priority sequence. Set multiple thresholds To divide different priorities. , the device is of high priority and has priority access; if , the device is of medium priority and can be connected if bandwidth permits; if , the device is of low priority and is allowed to access only when resources are sufficient. Based on the performance score of the device, it is divided into different priority categories and a hierarchical priority sequence is generated:
[0094]
[0095] according to Sort from high to low. Associate the hierarchical priority sequence with the identification information of the camera device and the corresponding acquisition time slot number to form the final camera access priority table, as shown below:
[0096]
[0097] in, Represents the acquisition time slot number assigned to the device, and the priority is used to determine the device access strategy. In the portable WiFi environment, the camera access management is dynamically adjusted based on the priority table, for example, high-priority devices are connected first when resources are tight, and access restrictions are appropriately relaxed when resources are sufficient.
[0098] In a specific embodiment, the process of executing step 300 may specifically include the following steps:
[0099] The number of bytes of the control message, heartbeat packet, and status synchronization message 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 the preset bandwidth mapping table to obtain the video transmission bandwidth data;
[0101] The basic resource overhead data and the video transmission bandwidth data are added together and multiplied by the preset fluctuation factor to obtain the total resource demand of each camera device. The total resource demand of all camera devices is accumulated to obtain the overall system demand data.
[0102] The current available bandwidth capacity of the portable WiFi is divided by the overall system demand data to obtain a quotient result, and the quotient result is compared with the preset target value, and a priority order allocation scheme or a proportional reduction scheme is selected to obtain a resource allocation mode;
[0103] The total resource demand of each camera device is calculated according to the resource allocation mode. When the resource allocation is in priority order, the resource is allocated in descending order according to the access priority. When the resource is reduced in proportion, the total resource demand is multiplied by the capacity ratio to obtain the device resource quota.
[0104] Set a dynamic adjustment interval for the device resource quota, establish a quota mapping table according to the device identifier, and obtain a multi-camera resource allocation strategy;
[0105] The multi-camera resource allocation strategy is divided into three-layer 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.
[0106] Specifically, the number of bytes of the control message, heartbeat packet, and status synchronization message of each camera device is counted to calculate the basic resource overhead data. Assume that the control message size of a camera device is Bytes, the heartbeat packet size is Bytes, the state synchronization message size is Bytes, the basic resource overhead data of the camera The calculation is as follows:
[0107]
[0108] in, Represents the minimum communication resources required by the camera during data exchange, which is used to maintain device status synchronization and management control. Query the video resolution parameter and match the preset bandwidth mapping table to calculate the video transmission bandwidth data. Assume that the video resolution parameter of the camera device is , then find the corresponding bandwidth requirement 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] According to the query results, get the video transmission bandwidth data of each camera device :
[0113]
[0114] in, Represents the bandwidth mapping function. Calculates the total resource requirements of each camera device, which is based on the basic resource cost data Data bandwidth for video transmission The sum of To take into account the dynamic changes of the network. The fluctuation factor ranges from 1.1 to 1.3 to compensate for bandwidth fluctuations and data retransmission. The final calculation formula is:
[0115]
[0116] in, Represents the total bandwidth requirement of the camera. In order to calculate the overall system demand data, the total resource requirements of all camera devices are accumulated. Assuming that there are camera devices, the overall system demand data for:
[0117]
[0118] in, Representative Calculate the current available bandwidth capacity of the portable WiFi , and compare it with the overall system demand data to determine the appropriate resource allocation mode. Calculate the bandwidth quotient:
[0119]
[0120] if , indicating that the available WiFi bandwidth is sufficient to meet the needs of all devices. At this time, the priority allocation scheme is adopted, that is, the bandwidth is allocated in descending order according to the access priority of the camera; if , indicating that the bandwidth is insufficient, the proportional reduction scheme is adopted at this time, that is, the resource requirements of all devices are reduced according to the capacity ratio, so that the total demand adapts to the current available bandwidth. Under the priority allocation scheme, resources are allocated in order from high to low according to the camera access priority table until the bandwidth is exhausted; under the proportional reduction scheme, the device resource quota is calculated using the following formula:
[0121]
[0122] in, is the reduced device resource requirement, ensuring that the total requirement of all devices does not exceed Set a dynamic adjustment range for the device resource quota, that is, allow the resource quota to be adjusted within a certain range during operation to adapt to the real-time bandwidth changes of the portable WiFi. Set the quota adjustment range :
[0123]
[0124] in, and Respectively represent the minimum and maximum allowed range of device resource quotas. Create a quota mapping table by mapping device identifiers to quotas:
[0125]
[0126] in, It is The camera identifier, is its final resource quota. The multi-camera resource allocation strategy is divided into three layers of transmission channels, that is, a control data channel and a video data channel are allocated to each camera device. In this process, the time division multiplexing mechanism is used to divide the time axis into multiple time slots, and they are allocated in the following order: control channel: used to send 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] Among them, before obtaining the multi-camera resource allocation strategy and dividing the multi-camera resource allocation strategy into three-layer transmission channels, it also includes: setting each camera device in the multi-camera resource allocation strategy as an optimization unit, establishing an adjacency relationship matrix between the 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, setting a preset weight value for each optimization variable, and obtaining a weighted optimization model; dividing the optimization units in the weighted optimization model into a main control layer and an execution layer, the main control layer is responsible for global constraint coordination, the execution layer is responsible for local constraint processing, and an inter-layer data interaction channel is established to obtain a two-layer optimization structure; setting the global resource total amount for the main control layer of the two-layer optimization structure Constraints are set for each optimization unit in the execution layer, and the constraints are converted into mathematical expressions to obtain a set of constraint equations. A distributed solution algorithm is constructed for the set of constraint equations, and a gradient iterative update mechanism is established based on the preset first-order derivative calculation rules and second-order derivative calculation rules to obtain an iterative optimization process. Termination conditions are set for the iterative optimization process, and the difference between the results of two adjacent iterations is compared with a preset threshold. When the difference is less than the threshold, the iteration is stopped to obtain the optimal solution sequence. The optimal solution sequence is mapped to each camera device according to the device identifier, and the original resource allocation strategy is numerically corrected to obtain the optimized resource allocation strategy. A resource scheduling instruction set is established based on the optimized resource allocation strategy, and each resource parameter is repackaged according to the preset data structure to obtain an updated multi-camera resource allocation strategy.
[0128] In a specific embodiment, the execution step divides the multi-camera resource allocation strategy into three-layer transmission channels, allocates a control data channel and a video data channel to each camera device based on a time division multiplexing mechanism, and obtains a multi-channel data transmission control table. The process may specifically include the following steps:
[0129] The multi-camera resource allocation strategy is divided into resource intervals according to the control channel, basic video channel, and enhanced video channel to obtain the basic bandwidth configuration of the three-layer channel;
[0130] Classify the data of each camera device, classify the control instructions and status information into the control channel, the basic definition video stream into the basic video channel, and the high definition video stream into the enhanced video channel, and obtain the device data classification result;
[0131] Based on a preset time division multiplexing cycle, the time axis is divided into reference time slots of fixed length, and each time slot is marked in the order of control channel, basic video channel, and enhanced video channel to obtain a time division multiplexing scheduling sequence;
[0132] Allocate a transmission window in the time division multiplexing scheduling sequence for each camera device according to the device data classification result to obtain a device time slot allocation table;
[0133] According to the preset service quality 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] 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.
[0135] Specifically, resource intervals are divided according to the control channel, basic video channel, and enhanced video channel to determine the basic bandwidth configuration of the three-layer channel. Assume that the total bandwidth of the system is , then according to the multi-camera resource allocation strategy, appropriate bandwidth is allocated to the three-layer channel. Assume that the bandwidth proportion of the control channel is , the bandwidth proportion of the basic video channel is , the bandwidth of the enhanced video channel accounts for , and meet the following conditions:
[0136]
[0137] The bandwidth allocation of the Layer 3 channel is calculated as follows:
[0138]
[0139] in, Represents the bandwidth allocated to the control channel, which is used for low-traffic tasks such as device control instructions and status synchronization; Represents the bandwidth allocated to the basic video channel, ensuring that all cameras can maintain video stream transmission with at least basic clarity; Represents the bandwidth allocated to the enhanced video channel, providing higher quality transmission capabilities for HD or UHD camera devices. After determining the bandwidth allocation, the data of each camera device is classified, and the control instructions and status information are classified into the control channel, the basic definition video stream is classified into the basic video channel, and the high definition video stream is classified into the enhanced video channel to form the device data classification result. Assume that the control data size of the camera device is , the basic video stream data size is , the data size of high-definition video stream is , then the data classification matrix of the equipment is expressed as:
[0140]
[0141] Among them, each row represents a camera device , and the corresponding data size on the control channel, basic video channel and enhanced video channel. Based on the preset time division multiplexing cycle, the time axis is divided into reference time slots of fixed length, and the 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 cycle Divided into time slots, the length of each time slot is The calculation is as follows:
[0142]
[0143] When allocating time slots, the necessary time slots are reserved for the control channel, followed by the basic video channel, and finally the remaining time slots are allocated for the enhanced video channel. After determining the scheduling sequence, according to the device data classification results, appropriate time slots are allocated to each camera device to form a device time slot allocation table. Assuming that the device need control channel time slots, Basic video channel time slots, enhanced video channel time slots, then:
[0144]
[0145] In the entire system, the time slot allocation table of all camera devices is expressed as:
[0146]
[0147] in, Representative equipment In the channel After the equipment time slot allocation table is determined, the transmission priority of the time slots of different channels is set according to the preset service quality requirements to obtain the channel service level table. The control channel needs the highest priority , the priority of the basic video channel Secondly, the priority of the enhanced video channel Lowest. The priority relationship satisfies:
[0148]
[0149] The specific priority of each channel is represented by a numerical value, for example:
[0150]
[0151] Get the channel service level table:
[0152]
[0153] The device time slot allocation table is combined with the channel service level table to establish the mapping relationship between the camera device and the transmission channel, and a multi-channel data transmission control table is generated according to the preset data packet scheduling rules. The mapping relationship is expressed as:
[0154]
[0155] Among them, each row represents a camera device In a time slot Transmission priority within .
[0156] In a specific embodiment, the process of executing step 400 may specifically include the following steps:
[0157] The control data channel, basic video channel, and enhanced video channel of each camera device in the multi-channel data transmission control table are used to collect data on bandwidth utilization, packet loss rate, and transmission delay according to a preset sampling period to obtain a multi-level monitoring data set;
[0158] Perform hierarchical calculations on multi-level monitoring data sets to obtain performance scores for each channel;
[0159] Input the performance scores of each channel into the preset proportional integral differential control model, calculate the bandwidth correction amount 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, and the constrained adjustment coefficient is substituted into the preset linear programming model to solve the optimal bandwidth allocation value that meets the constraint conditions and obtain the bandwidth allocation plan;
[0161] Modify the time division multiplexing scheduling sequence in the multi-channel data transmission control table according to the bandwidth allocation plan to obtain an updated transmission control strategy;
[0162] A corresponding relationship is established between the updated transmission control strategy, the camera device identifier and the channel type identifier to obtain a collaborative transmission optimization solution.
[0163] Specifically, the performance of each camera device in the multi-channel data transmission control table is monitored according to the preset sampling period. Collect data on bandwidth utilization, packet loss rate, and transmission delay to obtain a multi-level monitoring data set. Assume that there are camera devices, each camera device has three channels: control data channel, basic video channel and enhanced video channel. In each sampling period, the bandwidth utilization of each device is , Packet loss rate and transmission delay Measurements are made, where Representative Camera devices, Represents the channel type (1: control channel, 2: basic video channel, 3: enhanced video channel), thereby constructing a multi-level monitoring dataset:
[0164]
[0165] Each row represents the performance monitoring data of three types of channels of a camera device. The multi-level monitoring data set is graded to obtain the performance score of each channel. The performance score is calculated based on the weighted sum of bandwidth utilization, packet loss rate and transmission delay. The weights are assumed to be , then Camera devices in channel Performance scores on The calculation is as follows:
[0166]
[0167] in, represents the weight of bandwidth utilization, represents the weight of the packet loss rate, Represents the weight of transmission delay, satisfying:
[0168]
[0169] The calculation of performance scores helps the system identify which channels have low transmission quality and need to increase bandwidth allocation, and which channels have high transmission quality and need to reduce bandwidth appropriately. The performance scores of each channel are input into the proportional integral derivative (PID) control model to calculate the bandwidth correction amount and obtain the bandwidth adjustment coefficient. The PID control model is used to dynamically adjust the bandwidth allocation so that it can smoothly adapt to changes in network status. For each channel Bandwidth correction , the PID control formula is as follows:
[0170]
[0171] in, are proportional, integral and differential gain coefficients respectively; the error term The calculation is as follows:
[0172]
[0173] in, is the expected channel performance score, is the channel performance score currently measured. The bandwidth adjustment coefficient is processed with resource constraints to ensure that the bandwidth adjustment does not exceed the preset upper and lower limits of the resource quota. The minimum and maximum allowed bandwidths are and , the constraints are processed as follows:
[0174]
[0175] in, is the adjusted bandwidth value. Substitute the constrained adjustment coefficient into the preset linear programming model to solve the optimal bandwidth allocation value that meets the constraints. The goal of linear programming is to maximize the overall throughput of the system while meeting resource constraints:
[0176]
[0177] The constraints are:
[0178]
[0179] After solving the linear programming problem, the final bandwidth allocation solution is obtained According to 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 that the new bandwidth allocation leads to the reallocation of time slots, the new time slot length The calculation is as follows:
[0180]
[0181] in, Represents a camera device In the channel The actual data rate on the network. The updated transmission control strategy is mapped to the camera device identifier and channel type identifier to generate a collaborative transmission optimization plan. The final optimization plan table is as follows:
[0182]
[0183] Each row represents the bandwidth allocation plan for a camera device on a specific channel, ensuring that the entire system dynamically adjusts bandwidth allocation according to the real-time network status, improving the stability of data transmission and service quality.
[0184] The above describes the multi-camera device connection management method based on portable WiFi in the embodiment of the present application. The following describes the multi-camera device connection management system 10 based on portable WiFi in the embodiment of the present application. Figure 2 In the embodiment of the present application, an embodiment of a multi-camera device connection management system 10 based on portable WiFi includes:
[0185] A calculation module 11 is used to calculate the resource limitation coefficient in the portable WiFi environment;
[0186] The alternating acquisition module 12 is used to generate a distributed management configuration table of multiple camera management tasks in the portable WiFi based on the resource limitation coefficient, and perform active scanning and passive listening alternating acquisition 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] Establishing module 14 is used to establish a multi-level resource feedback mechanism in a portable WiFi environment according to a multi-channel data transmission control table, and dynamically calculate the bandwidth allocation ratio between camera devices to obtain a collaborative transmission optimization solution.
[0189] Through the cooperation of the above components and the establishment of a resource constraint coefficient calculation mechanism, the accurate quantification of the system resource status in the portable WiFi environment is achieved. The distributed management architecture and multi-level task division strategy are adopted to reduce the system resource overhead and improve the operation efficiency of multi-camera management in the portable WiFi environment. Through the time-division multiplexing mechanism combining active scanning and passive listening, the resource consumption of the device discovery process is reduced and the reliability of multi-camera access is improved. Based on the division method of multi-layer transmission channels, the differentiated transmission of control data and video data is realized, ensuring the timely and reliable transmission of system control instructions. The hierarchical resource feedback mechanism and dynamic bandwidth allocation strategy are adopted to enhance the system's adaptability to network fluctuations and ensure the transmission quality of multi-channel video data. Through time-division multiplexing scheduling and priority management, the utilization efficiency of limited bandwidth resources is improved, and the efficient collaborative work of multi-camera devices is realized. The introduction of a multi-level resource feedback mechanism enables the system to dynamically adjust the resource allocation strategy according to real-time monitoring data, thereby improving the stability of system operation.
[0190] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0191] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable an electronic device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0192] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A multi-camera device connection management method based on portable WiFi, characterized in that: The method comprises: Calculate the resource limitation coefficient in the portable WiFi environment; Generate a distributed management configuration table of multiple camera management tasks in the portable WiFi based on the resource limitation coefficient, and perform active scanning and passive listening alternating collection to obtain a camera access priority table; Allocate resources for 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; A multi-level resource feedback mechanism is established in a portable WiFi environment according to the multi-channel data transmission control table, and the bandwidth allocation ratio between camera devices is dynamically calculated to obtain a collaborative transmission optimization solution.
2. The multi-camera device connection management method based on portable WiFi according to claim 1 is characterized in that: The calculating of the resource limitation coefficient in the portable WiFi environment includes: Read the real-time values of CPU occupancy, memory usage, and power level of the portable WiFi through the system monitoring interface to obtain basic resource data, and perform validity verification on the basic resource data to obtain valid resource data; The effective resource data is standardized to obtain a standardized resource index, and a channel detection is performed on the radio frequency interface of the portable WiFi to obtain a radio frequency resource index; Performing weighted fusion on the standardized resource indicator and the radio frequency resource indicator to obtain an initial fusion coefficient; Through the resource constraint calculation formula, the initial fusion coefficient is exponentially smoothed according to the time series to obtain the resource constraint coefficient. The resource constraint calculation formula is: R t =0.7×R t-1 +0.3×R t , where R t is the current resource limitation coefficient, R t-1 is the resource constraint coefficient of the previous period.
3. The multi-camera device connection management method based on portable WiFi according to claim 1 is characterized in that: The distributed management configuration table of the multi-camera management task in the portable WiFi is generated based on the resource limitation coefficient, and active scanning and passive listening are performed alternately to obtain a camera access priority table, including: Comparing the resource restriction coefficient with a preset first threshold and a second threshold to obtain a resource status level value; According to the resource status level value, the device management module, the network management module, and the data processing module are divided into resources of a preset ratio to obtain a resource allocation ratio value of each module; The total number of threads of each module is multiplied by the resource allocation ratio value, and a preset thread waiting timeout period is set to obtain thread pool configuration data of each module; Multiplying the preset memory capacity of each module by the resource allocation ratio value, and establishing a circular message queue to obtain data exchange configuration data between modules; The resource allocation ratio value of each module is multiplied by the preset priority coefficient to obtain the task scheduling priority data between modules; Integrate the thread pool configuration data, the data exchange configuration data and the task scheduling priority data, and establish a corresponding relationship with the module identifier to obtain a distributed management configuration table; Active scanning and passive listening are performed alternately according to the distributed management configuration table, and the signal quality and power level of multiple camera devices are evaluated by time-division multiplexing to obtain a camera access priority table.
4. The multi-camera device connection management method based on portable WiFi according to claim 3 is characterized in that: The method of performing active scanning and passive listening alternately according to the distributed management configuration table, performing time-division multiplexing evaluation on the signal quality and power level of multiple camera devices, and obtaining a camera access priority table includes: The resource allocation ratio values in the distributed management configuration table are periodically calculated, and divided in a manner that the alternating time slot ratios of active scanning and passive listening are preset values to obtain an alternating acquisition time slot table; In the active scanning time slot, the detection request frame is sent to the preset channel sequence in sequence according to the preset dwell time, and in the passive listening time slot, the detection response frame is received for the current optimal channel to obtain the device discovery data; Classify and extract the device discovery data, extract the signal strength value from the active scanning data, and extract the power level value from the passive listening data to obtain dual-mode collection data; A performance evaluation matrix is established based on the dual-mode collected data, and a weighted calculation is performed on the signal strength mean and the power level mean in each time slot cycle to obtain a device performance score; The device performance scores are graded to obtain a graded priority sequence, and the graded priority sequence is associated with identification information of the camera device and a corresponding acquisition time slot number to obtain a camera access priority table.
5. The multi-camera device connection management method based on portable WiFi according to claim 1 is characterized in that: The method allocates resources to the camera devices in the camera access priority table to obtain a multi-camera resource allocation strategy, and divides and allocates three-layer transmission channels based on the multi-camera resource allocation strategy to obtain a multi-channel data transmission control table, including: Perform byte counts on control messages, heartbeat packets, and status synchronization messages of each camera device in the camera access priority table to obtain basic resource overhead data; The video resolution parameters of each camera device are queried and matched with the preset bandwidth mapping table to obtain the 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 demand of each camera device, and the total resource demand of all camera devices is accumulated to obtain the overall system demand data; The current available bandwidth capacity of the portable WiFi is divided by the overall demand data of the system to obtain a quotient result, and the quotient result is compared with a preset target value, and a priority order allocation scheme or a proportional reduction scheme is selected to obtain a resource allocation mode; The total resource demand of each camera device is calculated according to the resource allocation mode. When the resource allocation is in priority order, the resource is allocated in descending order according to the access priority. When the resource is reduced in equal proportion, the total resource demand is multiplied by the capacity ratio to obtain the device resource quota. Setting a dynamic adjustment interval for the device resource quota, establishing a quota mapping table according to the device identifier, and obtaining a multi-camera resource allocation strategy; The multi-camera resource allocation strategy is divided into three-layer transmission channels, and a control data channel and a video data channel are allocated to each camera device based on a time division multiplexing mechanism to obtain a multi-channel data transmission control table.
6. The method for managing multi-camera device connections based on portable WiFi according to claim 5, characterized in that: The multi-camera resource allocation strategy is divided into three layers of transmission channels, and a control data channel and a video data channel are allocated to each camera device based on a time division multiplexing mechanism to obtain a multi-channel data transmission control table, including: The multi-camera resource allocation strategy is divided into resource intervals according to the control channel, the basic video channel, and the enhanced video channel to obtain the basic bandwidth configuration of the three-layer channel; Classify the data of each camera device, classify the control instructions and status information into the control channel, the basic definition video stream into the basic video channel, and the high definition video stream into the enhanced video channel, and obtain the device data classification result; Based on a preset time division multiplexing cycle, the time axis is divided into reference time slots of fixed length, and each time slot is marked in the order of control channel, basic video channel, and enhanced video channel to obtain a time division multiplexing scheduling sequence; Allocate a transmission window in the time division multiplexing scheduling sequence for each camera device according to the device data classification result to obtain a device time slot allocation table; According to the preset service quality requirements, transmission priorities are set for various data channels in the equipment time slot allocation table to obtain a 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 a preset data packet scheduling rule.
7. The multi-camera device connection management method based on portable WiFi according to claim 1 is characterized in that: The multi-level resource feedback mechanism in the portable WiFi environment is established according to the multi-channel data transmission control table, and the bandwidth allocation ratio between camera devices is dynamically calculated to obtain a collaborative transmission optimization solution, including: The control data channel, basic video channel, and enhanced video channel of each camera device in the multi-channel data transmission control table are subjected to data collection of bandwidth utilization, packet loss rate, and transmission delay according to a preset sampling period to obtain a multi-level monitoring data set; Performing hierarchical calculations on the multi-level monitoring data set to obtain a performance score for each channel; Input the performance scores of each channel into a preset proportional integral differential control model, calculate the bandwidth correction amount for the control data channel, the basic video channel, and the enhanced video channel respectively, and obtain the bandwidth adjustment coefficient; The bandwidth adjustment coefficient is constrained according to the preset upper and lower limits of the resource quota, and the constrained adjustment coefficient is substituted into a preset linear programming model to solve the optimal bandwidth allocation value that meets the constraint conditions, and obtain a bandwidth allocation plan; Modify the time division multiplexing scheduling sequence in the multi-channel data transmission control table according to the bandwidth allocation scheme to obtain an updated transmission control strategy; A corresponding relationship is established between the updated transmission control strategy, the camera device identifier, and the channel type identifier to obtain a collaborative transmission optimization solution.
8. A multi-camera device connection management system based on portable WiFi, characterized in that: The system is used to execute the multi-camera device connection management method based on portable WiFi as described in any one of claims 1 to 7, and the system comprises: A calculation module, used to calculate the resource limitation coefficient in a portable WiFi environment; An alternating acquisition module is used to generate a distributed management configuration table of multiple camera management tasks in the portable WiFi based on the resource limitation coefficient, and perform active scanning and passive listening alternating acquisition to obtain a camera access priority table; An allocation module is used to 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; A module is established to establish a multi-level resource feedback mechanism in a portable WiFi environment according to the multi-channel data transmission control table, and dynamically calculate the bandwidth allocation ratio between camera devices to obtain a collaborative transmission optimization solution.
Citation Information
Patent Citations
Fast access in v2v communication services by dynamic resources allocation
US20150195827A1
Management of preferred channel allocations between wireless communication bands
US20210099976A1
Device and method for controlling channel congestion in intelligent transport systems
WO2021052640A1
Internet of things system
WO2023030513A1
Cited By
Resource allocation method and device, electronic equipment and storage medium
CN120896851A