Method and device for determining camera access strategy

By acquiring camera features and node status data, and using a load quantization model and decision engine to optimize camera access strategies, the problem of uneven resource allocation caused by the number of connected cameras was solved, and efficient resource utilization of the video surveillance network was achieved.

CN121486531APending Publication Date: 2026-02-06CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511597249.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-03
Publication Date
2026-02-06

Smart Images

  • Figure CN121486531A_ABST
    Figure CN121486531A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for determining a camera access strategy. The method comprises the following steps: acquiring feature data of a to-be-accessed camera and state data of a plurality of nodes of an access platform of the to-be-accessed camera; a load score corresponding to each node is determined according to the state data, and the load scores are used for quantitatively representing the workload level borne by the nodes and the resource consumption degree of an access platform; determining a load vector of the to-be-accessed camera corresponding to the feature data, the load vector being used for quantitatively representing expected consumption of node resources by the to-be-accessed camera; and determining an access strategy according to the load score and the load vector. According to the invention, the technical problems of unbalanced actual load of each node and low resource allocation efficiency caused by resource allocation only according to the access number of cameras in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of video monitoring, in particular to a method and device for determining camera access strategy. BACKGROUND

[0002] In the current GB / T28181 protocol access system, the access and management of cameras rely on static load balancing or distribution strategy based on the number of devices, which ignores the actual impact difference of camera access on video monitoring network resources. For example, the load condition of each resource node in the related technology is usually evaluated only by the number of camera access, which leads to lack of flexibility and accuracy of resource allocation strategy, so that some nodes may face excessive resource consumption while other nodes have redundant resources.

[0003] At present, no effective solution has been proposed for the above problems. SUMMARY

[0004] Embodiments of the present application provide a method and device for determining camera access strategy, to at least solve the technical problem of low resource allocation efficiency caused by the imbalance of actual load of each node due to the number of camera access in the related technology.

[0005] According to an aspect of an embodiment of the present application, a method for determining camera access strategy is provided, comprising: obtaining feature data of a to-be-accessed camera and state data of a plurality of nodes of an access platform of the to-be-accessed camera, wherein the nodes include a service cluster for processing video streams in the access platform; determining a load score corresponding to each node according to the state data, wherein the load score is used to quantitatively represent the workload level borne by the node and the degree of resource consumption of the access platform; determining a load vector of the to-be-accessed camera corresponding to the feature data, wherein the load vector is used to quantitatively represent the expected consumption of node resources by the to-be-accessed camera; determining an access strategy according to the load score and the load vector, wherein the access strategy is used to indicate an access node of the to-be-accessed camera in the plurality of nodes.

[0006] In some embodiments of the present application, determining a load score corresponding to each node according to the state data comprises: processing the state data by using a node load quantification model to obtain the load score, wherein the node load quantification model is used to weight and sum a plurality of state indicators in the state data.

[0007] In some embodiments of the present application, determining a load vector of the to-be-accessed camera corresponding to the feature data comprises: processing the feature data by using a camera load quantification model to obtain the load vector, wherein the camera load quantification model is used to extract an indicator value corresponding to each dimension in the load vector from the feature data.

[0008] In some embodiments of the present application, the access strategy is determined according to the load score and the load vector, comprising: determining a plurality of initial access strategies corresponding to the plurality of nodes respectively when the to-be-accessed camera is distributed to the plurality of nodes according to the load score and the load vector; determining an access cost corresponding to each of the plurality of initial access strategies by using a cost function, wherein the cost function is used to measure the performance of the initial access strategy in meeting the load balancing of the plurality of nodes and the business constraints of the access platform; and determining the access strategy from the plurality of initial access strategies according to the access cost.

[0009] In some embodiments of the present application, the access cost corresponding to each of the plurality of initial access strategies is determined by using a cost function, comprising: determining an estimated load score corresponding to the first node accessing the to-be-accessed camera in each initial access strategy, wherein the estimated load score is used to quantitatively represent the workload level carried by the first node after accessing the to-be-accessed camera and the degree of resource consumption of the access platform; determining an equilibrium index corresponding to each initial access strategy according to the estimated load score and the load score of the second node, wherein the second node is a node other than the first node in the plurality of nodes of the access platform, and the equilibrium index includes the variance of the estimated load score and the load score of the second node; determining a constraint penalty term of each initial access strategy, wherein the constraint penalty term is used to quantitatively represent the degree of violation of the business constraints of the access platform by the initial access strategy; and determining the access cost of each initial access strategy according to the equilibrium index and the constraint penalty term.

[0010] In some embodiments of the present application, further comprising: generating signaling corresponding to the access strategy, wherein the signaling includes a Session Initiation Protocol (SIP) address of the access node; and sending the signaling to the to-be-accessed camera, wherein the signaling is used to instruct the to-be-accessed camera to register at the access node and transmit the stream media to the SIP address of the access node.

[0011] In some embodiments of the present application, the to-be-accessed camera at least includes one of the following: a first to-be-accessed camera that accesses the access platform for the first time and a second to-be-accessed camera that migrates in the access platform.

[0012] According to a further aspect of the embodiments of the present application, a camera access strategy determination apparatus is also provided, comprising: an acquisition module, configured to acquire feature data of a camera to be accessed and state data of a plurality of nodes of an access platform of the camera to be accessed, the nodes comprising a service cluster processing video streams in the access platform; a first determination module, configured to determine a load score corresponding to each node according to the state data, wherein the load score is used to quantitatively represent a workload level borne by the node and a resource consumption degree of the access platform; a second determination module, configured to determine a load vector of the camera to be accessed corresponding to the feature data, wherein the load vector is used to quantitatively represent an expected consumption of the camera to be accessed on the node resources; and an execution module, configured to determine an access strategy according to the load score and the load vector, wherein the access strategy is used to indicate an access node of the camera to be accessed in the plurality of nodes.

[0013] According to a further aspect of the embodiments of the present application, an electronic device is also provided, comprising: a memory and a processor, the memory being configured to store program instructions; the processor being connected with the memory and being configured to execute the above-mentioned camera access strategy determination method.

[0014] According to a further aspect of the embodiments of the present application, a non-volatile storage medium is also provided, comprising a stored computer program, wherein a device where the non-volatile storage medium is located executes the above-mentioned camera access strategy determination method by running the computer program.

[0015] According to a further aspect of the embodiments of the present application, a computer program product is also provided, comprising computer instructions, which, when executed by a processor, implement the above-mentioned camera access strategy determination method.

[0016] In the embodiments of the present application, a comprehensive evaluation method is adopted, the feature data of the camera to be accessed and the state data of each service cluster node in the access platform are collected and analyzed, the current load pressure of the node and the resource consumption expectation of the camera are quantified, and intelligent matching is performed according to these quantified data, so as to achieve the purpose of optimizing resource allocation, thereby realizing the technical effect of efficient and balanced camera access, and further solving the technical problems of the related art that only allocating resources according to the number of cameras to be accessed leads to unbalanced actual load of each node and low resource allocation efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0017] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, illustrate certain illustrative embodiments of the present application and are used to explain the present application, but do not limit the present application. In the drawings:

[0018] Figure 1 FIG. 1 is a hardware structure block diagram of a computer terminal of a camera access strategy determination method according to an embodiment of the present application;

[0019] Figure 2 is a flow chart of a method for determining a camera access strategy according to an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of the overall flow of a method for determining a camera access strategy according to an embodiment of the present application;

[0021] Figure 4 is a structural schematic diagram of a device for determining a camera access strategy according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative work should fall within the scope of protection of the present application.

[0023] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to only those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to the process, method, product, or device.

[0024] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:

[0025] Greedy algorithm: an algorithm strategy that selects the optimal solution at each step in the current state, in the hope of obtaining a global optimal solution. In the embodiments of the present application, the greedy algorithm is used in the intelligent decision engine to quickly solve the optimal allocation strategy of the camera access resource node, and by allocating the cameras to the node with the lowest load or the most matching demand characteristics one by one, the efficient use of resources and load balancing are achieved.

[0026] GB / T 28181 protocol: specifies the technical requirements for interconnection information transmission, exchange and control of video monitoring network systems. This protocol is used as the communication standard for the access platform of the camera access in the embodiments of the present application, ensuring that cameras and resource nodes of different manufacturers can interconnect and interoperate, supporting the transmission, management and control of video streams.

[0027] Resource node: in a video monitoring network, a server or service cluster used for processing and managing camera data streams. In the embodiments of the present application, the resource node (also referred to as a node) is the object of the load balancing strategy, which dynamically adjusts the access of cameras to avoid excessive node load or resource waste, and optimizes the resource allocation of the entire system.

[0028] Service cluster: a group consisting of multiple servers that collectively provide services to enhance the availability and scalability of services. In the embodiments of the present application, the service cluster is a node that processes video streams, and its design can better cope with the challenges of large-scale, multi-feature camera access through a load balancing mechanism, improving the stability and quality of service of the video monitoring platform.

[0029] Current GB / T 28181 protocol access systems mostly use polling or static weight distribution strategies, which only consider the number of cameras connected to each resource node as the basis for load balancing, without considering other characteristics of the cameras (such as bit rate, storage state, service priority, etc.), resulting in suboptimal load balancing among nodes. Specifically, in related architectures, camera access is carried by multiple resource nodes, and each node has limited bandwidth, storage, and computing resources. When the load balancing strategy is unreasonable, cameras without storage only consume a small amount of bandwidth, while cameras with storage continuously consume high bandwidth. If the number of devices is only used for distribution, it will lead to the exhaustion of bandwidth in some nodes and the idling of resources in other nodes. When a camera without storage needs to be connected to storage, if the bandwidth of the node it is located in has reached the upper limit, resource expansion or camera migration is required, increasing the complexity of operation and maintenance.

[0030] At the same time, related technologies lack targeted optimization for business features (such as real-time monitoring, AI analysis, long-term storage, etc.), and cannot dynamically adjust the load strategy according to actual application requirements, resulting in low resource allocation efficiency and difficulty in adapting to heterogeneous camera access scenarios.

[0031] To solve the above technical problems, the embodiments of the present application provide corresponding solutions, which are described in detail below.

[0032] The camera access strategy determination method embodiments provided by the embodiments of the present application can be executed in a mobile terminal, a computer terminal, or a similar computing device. Figure 1A hardware structure block diagram of a computer terminal for implementing the determination method of the camera access strategy is shown. As shown in Figure 1 The computer terminal 10 can include one or more processors (the processor can include but not limited to a microprocessor MCU or a programmable logic device FPGA processing device, etc.), a memory 104 for storing data, and a transmission module 106 for communication function through wired and / or wireless network connection. In addition, it can also include a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the I / O interface), a network interface, a BUS bus. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can include more or less components than those shown in Figure 1 or have a different configuration than that shown in Figure 1 .

[0033] It should be noted that the one or more processors and / or other data processing circuits described above can be referred to herein as "data processing circuits" in general. The data processing circuit can be embodied in whole or in part as software, hardware, firmware or any other combination. In addition, the data processing circuit can be a single independent processing module, or all or part of any one of the other elements combined into the computer terminal 10. As referred to in the embodiments of the present application, the data processing circuit as a processor controls (for example, the selection of the variable resistance terminal path connected to the interface).

[0034] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the determination method of the camera access strategy in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the above-mentioned determination method of the camera access strategy. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 can further include a memory remotely disposed with respect to the processor, which can be connected to the computer terminal 10 through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0035] The transmission module 106 is configured to receive or send data via a network. The network can include, for example, a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC) that can connect to other network devices through a base station to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module that is configured to communicate with the Internet via wireless communication.

[0036] The display can be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10.

[0037] It is noted that in some alternative embodiments, the above Figure 1 The computer terminal can include hardware elements (including circuitry), software elements (including computer code stored on a computer readable medium), or a combination of both hardware and software elements. It should be noted that in some embodiments, the computer terminal can be comprised of a plurality of computer terminals that are connected together in a networked environment. Figure 1 is merely one example of a particular implementation and is intended to illustrate the types of components that can be present in the computer terminal.

[0038] In the above operating environment, the embodiment of the present application provides a method for determining a camera access strategy. It is noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0039] Figure 2 is a flowchart of a method for determining a camera access strategy according to an embodiment of the present application, as shown in Figure 2 The method includes the following steps:

[0040] In step S202, characteristic data of a camera to be accessed and state data of a plurality of nodes of an access platform of the camera to be accessed are obtained, wherein the nodes include a service cluster that processes a video stream in the access platform.

[0041] In step S202, the characteristic data of the camera to be accessed includes but is not limited to resolution, code stream, encoding format, frame rate, storage state, service priority and AI demand, etc. It is an important basis for evaluating the influence of the camera on the load of the resource node, and is used to calculate the expected resource consumption after the camera is accessed. The node state data includes but is not limited to real-time bandwidth usage, CPU usage, disk IOPS, etc. of the resource node, which is used to reflect the resource utilization of the service cluster (node) in real time.

[0042] It should be noted that the service cluster refers to a set composed of multiple servers, which jointly undertake the tasks of access, processing and storage of video streams. In some embodiments of the present application, the service cluster is a component of the GB / T 28181 protocol access system and the object of intelligent load balancing strategy, aiming to improve the stability and processing capacity of the video monitoring system through the cooperative work of the servers in the cluster.

[0043] In some embodiments of the present application, the above data can be collected by the following steps:

[0044] (1) Process the GB / T camera media stream, and obtain the unique identification of the camera device, resolution, encoding format and frame rate through real-time media service analysis.

[0045] (2) Obtain the storage state (whether the route is started, storage period), service priority and AI demand of each camera through the business side interface.

[0046] (3) Obtain the real-time bandwidth usage, CPU usage and disk IOPS of each resource node through the platform interface combined with the prometheus monitoring interface.

[0047] It should be noted that the camera to be accessed at least includes one of the following: a first camera to be accessed which accesses the access platform for the first time and a second camera to be accessed which migrates in the access platform.

[0048] (1) The first camera to be accessed which accesses the access platform for the first time: refers to the camera which has not established a connection with the target access platform before, and needs to be registered and configured for video stream transmission for the first time. The collection of characteristic data of such cameras and the reasonable allocation to resource nodes are particularly important, because their access may significantly change the load state of the node.

[0049] (2) The second camera to be accessed which migrates in the access platform: the camera which has joined a certain node, but needs to be migrated from the current node to another node due to changes in node load, resource demand adjustment or network condition change, etc. The migration decision of such cameras involves re-evaluation of the load of the existing node and the influence of the migration operation on the stability of the system, which is a key link in the dynamic load balancing strategy.

[0050] Specifically, by detecting the resource usage of each node in the access platform in real time or at a fixed time, those cameras that need to be migrated due to the resource shortage of the node where they are located, configuration changes or business demand upgrades (i.e., the second to-be-accessed cameras) are identified. For example, network monitoring tools and resource management software (such as Prometheus) can be used in combination with the API interface of the platform to periodically capture node state data while listening to business demand change events of the cameras. Once it is monitored that the node load exceeds the safety threshold, the resource configuration no longer meets the camera demand, or the business level of the camera changes, the system will automatically identify these cameras as migration candidates. For the cameras identified as migration candidates, the system should immediately update their feature data, including but not limited to resolution, bit rate, storage status and business priority, etc. to reflect the recent business demand and resource demand changes. Finally, based on the updated camera feature data and the current resource state data of each node, the optimal migration strategy is solved, i.e., which second to-be-accessed cameras should be migrated to which node, to achieve the best allocation of resources and load balancing.

[0051] In some embodiments of the present application, for the first to-be-accessed cameras, the system obtains the basic information and business demand of the cameras through media stream analysis, business side interface calling, etc. For the second to-be-accessed cameras, the state changes of the node where they are currently located and the feature changes that may affect their migration, such as the emergence of new business demand or the adjustment of storage status, need to be monitored additionally.

[0052] Step S204, determining the load score corresponding to each node according to the state data, wherein the load score is used to quantitatively represent the level of workload borne by the node and the degree of resource consumption of the access platform.

[0053] In the above step S204, the load score is a quantitative value for measuring the load state of the node, which comprehensively considers multiple resource usage indicators of the node.

[0054] In order to accurately determine which nodes are suitable for accommodating more cameras, the load score corresponding to each node can be determined by the following method: using a node load quantification model to process the state data to obtain the load score, wherein the node load quantification model is used to weight and sum multiple state indicators in the state data.

[0055] In some embodiments of the present application, the node load quantification model can be established by defining a comprehensive load score (i.e., load score) Lnode for each resource node, which is a weighted function of the utilization rate of each resource (bandwidth, CPU, IO) of the node, for example, Lnode = α x (bandwidth utilization rate) + β x (CPU utilization rate) + γ x (disk IO utilization rate), where α, β, and γ are weight coefficients set according to the hardware characteristics of the node and the characteristics of the service.

[0056] It should be noted that in the video monitoring system scenario of the present application, the bandwidth utilization rate (α) can be particularly critical due to the large number of camera accesses and video stream transmissions; the CPU utilization rate (β) is mainly related to whether the camera needs to perform AI analysis, and the disk IOPS (γ) is closely related to whether the camera has storage requirements. In different service scenarios, the weight coefficients of each resource utilization rate can be adjusted according to the actual situation to more accurately reflect the load state of the node.

[0057] In step S206, a load vector of the to-be-accessed camera corresponding to the feature data is determined, wherein the load vector is used to quantitatively represent the expected consumption of the to-be-accessed camera to the node resources.

[0058] In the above step S206, the load vector is a mathematical vector representing the expected resource consumption of the camera to the node, which can include, for example, estimated bandwidth occupation, estimated CPU consumption, and estimated storage IO demand. The load vector is a multi-dimensional numerical vector, and each dimension represents the expected consumption of the camera to the access platform for a certain resource.

[0059] In order to accurately estimate the resource pressure of the camera after access to the node, the load vector of the to-be-accessed camera corresponding to the feature data can be determined by processing the feature data using a camera load quantification model to obtain the load vector, wherein the camera load quantification model is used to extract the index value corresponding to each dimension of the load vector from the feature data.

[0060] Specifically, the key features affecting resource consumption are extracted from the feature data of the camera and converted into quantified numerical values, for example, the resolution is quantified as the number of pixels, the code flow is quantified as Mbps, the storage state is quantified as the storage occupation rate, the service priority and AI demand are quantified as weight coefficients; a model is established based on historical data to train the model using machine learning or statistical methods to establish the relationship between the feature data and the resource consumption, and the output of the model is the load vector of the to-be-accessed camera.

[0061] In some embodiments of the present application, the camera load quantification model can be established by defining an estimated load vector Vcam for each camera to be accessed or migrated, which quantifies the expected consumption of each resource of the node, for example, Vcam = (estimated bandwidth occupation, estimated CPU consumption, estimated storage IO demand, service priority weight), wherein the estimated bandwidth occupation can be estimated according to the bit rate, resolution, and frame rate; the CPU consumption can be estimated according to whether transcoding is required and whether AI analysis is required.

[0062] In step S208, the access strategy is determined according to the load score and the load vector, wherein the access strategy is used to indicate the access node of the camera to be accessed in the plurality of nodes.

[0063] In the above step S208, the access strategy refers to the strategy indicating which node the camera to be accessed in the plurality of nodes should access, which is based on the comprehensive consideration of the load score and the load vector, aiming to realize intelligent load balancing of the nodes and ensure reasonable allocation and efficient use of system resources.

[0064] In some embodiments of the present application, a decision model (decision engine) can be constructed, which can calculate the optimal access strategy based on the current load score of all nodes and the load vector of the camera to be accessed through optimization algorithms (such as greedy algorithm, genetic algorithm, simulated annealing, etc.), the goal of the strategy is to minimize the load difference between nodes while meeting the business priority and resource constraints.

[0065] When determining the access strategy, the decision engine not only considers the balance of the load score, but also ensures that the resource demand of the camera matches the resource remaining capacity of the node, avoiding single resource bottleneck, for example, for high-resolution, large bit rate, and urgent storage demand cameras, they should be preferentially matched to nodes with rich bandwidth and storage resources, while CPU-intensive cameras should be preferentially matched to nodes with rich CPU resources.

[0066] In order to ensure the optimal allocation of resources and load balancing, the access strategy can be determined by the following method: determining a plurality of initial access strategies corresponding to the plurality of nodes when the camera to be accessed is respectively distributed to the plurality of nodes according to the load score and the load vector; determining the access cost corresponding to the plurality of initial access strategies by using a cost function, wherein the cost function is used to measure the performance of the initial access strategy in meeting the load balancing of the plurality of nodes and the business constraints of the access platform; determining the access strategy from the plurality of initial access strategies according to the access cost.

[0067] Specifically, the initial access strategy is based on the preliminary load score and the load vector, a series of preliminary schemes of how to distribute the camera to each node are calculated, and each scheme is a possible camera-node distribution combination. For example, according to the load score of the current node and the load vector of the camera to be accessed, a series of preliminary camera-node distribution schemes are generated by enumeration or other search algorithms, and the pros and cons of each initial access strategy are quantitatively evaluated by a cost function. Based on the evaluation results of the cost function, the decision engine selects the scheme with the lowest cost from multiple initial access strategies as the final access strategy.

[0068] In order to quantitatively evaluate the performance of each initial access strategy in meeting resource balance and business priority, the access cost corresponding to each initial access strategy can be determined in the following way: determining the estimated load score corresponding to the first node accessing the camera to be accessed in each initial access strategy, wherein the estimated load score is used to quantitatively represent the level of workload carried by the first node after accessing the camera to be accessed and the degree of resource consumption of the access platform; determining the balance index corresponding to each initial access strategy according to the estimated load score and the load score of the second node, wherein the second node is a node other than the first node in the access platform, and the balance index includes the variance of the estimated load score and the load score of the second node; determining the constraint penalty term of each initial access strategy, wherein the constraint penalty term is used to quantitatively represent the degree of violation of the business constraints of the initial access strategy; determining the access cost of each initial access strategy according to the balance index and the constraint penalty term.

[0069] Specifically, the estimated load score represents the expected workload level of the node after accessing the camera to be accessed, which is a quantitative prediction of the future resource consumption. For example, based on the load vector of the camera to be accessed and the current resource state of the node, the new load score of the node after receiving the camera is calculated by the load quantification model.

[0070] The balance index refers to the difference between the load scores of the nodes under a certain strategy, which can be represented by the variance σ². For example, for each initial access strategy, the variance of the load scores of all nodes is calculated as the balance index of the strategy to evaluate the balance of resource allocation.

[0071] The constraint penalty term quantifies the business constraints that the access strategy may violate, such as delayed access of high-priority cameras, node resource over-limit, etc. The severity of violating the constraints is reflected by setting a penalty coefficient λ. For example, according to the business priority of the camera in the access strategy and the actual carrying capacity of the node, it can be determined whether the strategy violates the business constraints and quantified as a penalty value.

[0072] In some embodiments of the present application, a modified optimization algorithm greedy strategy can be used for global optimization, the algorithm input is the state of all current nodes [Lnode1, Lnode2,..., Lnoden] and the load vector of all to-be-assigned cameras [Vcam1, Vcam2,..., Vcamm], and the output can be an optimal assignment matrix (access strategy) Assignment_Matrix, which explicitly indicates to which node each camera should be assigned. It should be noted that the decision algorithm is based on an iterative optimization of a cost function, and the cost function Cost can be designed as: Cost = σ²(L_node) + λ x P, where σ²(L_node) is the variance of the comprehensive load score of all nodes (i.e. the balance index, used to measure the balance), P is a penalty term for violating the business priority constraint, and λ is a penalty coefficient.

[0073] In some embodiments of the present application, the following steps can also be performed: generating signaling corresponding to the access strategy, wherein the signaling includes the session initiation protocol (SIP) address of the access node; and sending the signaling to the to-be-accessed camera, wherein the signaling is used to instruct the to-be-accessed camera to register at the access node and transmit the stream media to the SIP address of the access node.

[0074] Specifically, the signaling is a signal or information used to control and manage the establishment, maintenance and release of a communication connection, and in some embodiments of the present application, the signaling is mainly used to instruct the establishment of a connection between the camera and the access node, including registration, guidance of the stream media transmission path, etc.

[0075] The SIP address is a network identifier used by the access node to receive the stream media transmission of the camera, similar to a telephone number, which is used to ensure that the stream media data can be accurately transmitted to the predetermined receiving end. The signaling can contain the SIP address of the node to which the to-be-accessed camera should be connected, to guide the registration and stream media transmission of the camera. For example, the access strategy contains the mapping relationship between the camera and the node, such as "camera C1 should access node N1", according to this mapping relationship, the SIP signaling is constructed, which contains the SIP address of the target node N1 and any necessary additional information (such as authentication token, stream media format, etc.).

[0076] Finally, the generated signaling is transmitted to the to-be-accessed camera through the network, instructing it to start the registration process and transmit the stream media data to the specified SIP address. For example, the SIP signaling is sent to the camera through the network, such as using the SIP MESSAGE request, carrying the SIP address of the access node and other necessary parameters. After receiving the signaling, the camera parses the information in it and starts the registration process with the target node.

[0077] In some specific embodiments of the present application, the camera can be guided to the specified resource node for registration and stream media transmission according to the generated Assignment_Matrix through the signaling control of the GB / T28181 protocol. After execution, the node state can be continuously monitored through the feature acquisition module to form a closed-loop feedback. For example, when the node load exceeds the safety threshold, the node access is closed; when a new camera to be allocated appears, the intelligent decision engine is triggered again for dynamic adjustment.

[0078] Through the above steps S202 to S208, by using the comprehensive evaluation method, the feature data of the camera to be accessed and the state data of each service cluster node in the access platform are collected and analyzed, the current load pressure of the node and the resource consumption expectation of the camera are quantified, and intelligent matching is performed according to these quantified data, so as to achieve the purpose of optimizing resource allocation, thereby realizing the technical effect of efficient and balanced camera access, and further solving the technical problems of related art that only rely on camera access quantity to allocate resources, resulting in unbalanced actual load of each node and low resource allocation efficiency.

[0079] The embodiment of the present application also provides a camera access system, which comprises:

[0080] (1) Feature acquisition and perception module.

[0081] Responsible for collecting and sorting the real-time feature data of the camera and each node of the access platform, providing basic information for subsequent load quantification. These feature information includes the basic information of the camera (such as unique identifier, resolution, encoding format, frame rate), business demand (such as storage state, business priority, AI demand), and resource usage of the platform node (such as real-time bandwidth usage, CPU usage, disk IOPS).

[0082] Specifically, the feature acquisition and perception module obtains the state information of the camera by interacting with the platform interface and the business side interface, and obtains the resource usage data of the node in real time through the built-in monitoring interface (such as Prometheus). The module stores these feature data in a unified format, which is convenient for subsequent processing and analysis.

[0083] (2) Load quantification module.

[0084] Contains node load quantification model and camera load quantification model, which is used to convert the collected node and camera feature data into quantifiable load vectors, and then evaluate the influence of camera access or migration on node resources.

[0085] Node Load Quantification Model: Define a load score for each node by weighting its bandwidth usage, CPU usage, and disk IOPS, reflecting the real-time load status of the node. The model sets weight coefficients based on the node's hardware characteristics and business characteristics.

[0086] Camera Load Quantification Model: Define an estimated load vector for each camera to be accessed or migrated, quantifying its expected consumption of bandwidth, CPU, and storage IO, while considering the special nature of business priority and AI demand.

[0087] (3) Intelligent Decision Engine Module.

[0088] Based on the output of the load quantification module, the intelligent decision engine uses optimization algorithms (such as improved greedy strategy) to calculate the current optimal camera access strategy, aiming to achieve balanced resource allocation while considering and meeting business demand priorities, avoiding resource bottlenecks and waste.

[0089] The intelligent decision engine receives the current load scores of all nodes and the estimated load vectors of all cameras to be accessed, calculates the cost under different strategies through a cost function, including the variance of resource load (measuring balance) and the penalty term for violating business constraints, and outputs a distribution matrix indicating the node each camera should access.

[0090] (4) Strategy Execution and Feedback Module.

[0091] According to the distribution matrix generated by the intelligent decision engine, through the signaling control of GB / T 28181 protocol, the access, migration or flow direction switching of the camera is executed, and at the same time, the node state and camera business demand are continuously monitored, forming a feedback loop to ensure stable operation of the system.

[0092] Signaling Generation and Transmission: The strategy execution module generates signaling conforming to the GB / T 28181 protocol, instructing the camera to register with the specified node, and the signaling contains the necessary information such as the SIP address of the target node.

[0093] Camera Access and Migration Control: By sending signaling, guide the camera to connect to the correct node, or trigger the migration of the camera when necessary (such as node overload), to optimize resource allocation.

[0094] Closed-loop monitoring and feedback: The module continuously monitors the node resource usage and camera business demand, and when detecting resource overload or business demand changes, re-triggers the intelligent decision engine to dynamically adjust the strategy, forming a closed-loop feedback mechanism.

[0095] Figure 3 is a schematic diagram of the overall flow of a method for determining a camera access strategy according to an embodiment of the present application, as shown in Figure 3As shown, including:

[0096] Step 301: System startup and initialization.

[0097] When the system starts, it first initializes all necessary components and modules, including the feature acquisition and perception module, the load quantification module, and the intelligent decision engine module. Initialization also includes reading and setting predefined parameters such as weight coefficients α, β, γ, and penalty coefficient λ. At the same time, the system configures communication parameters related to the GB / T 28181 protocol and the SIP protocol to ensure that signaling transmission is ready.

[0098] Step 302: Continuous monitoring and data collection.

[0099] The feature acquisition and perception module interacts with the platform interface, business side interface, and resource monitoring interface (such as Prometheus) to obtain real-time feature data of cameras and nodes, including the unique identifier, resolution, frame rate, storage status, business priority, and AI demand of the camera, as well as the real-time bandwidth usage, CPU usage, and disk IOPS of the node. The data collection module stores this information in a unified database or data structure for subsequent module reading and processing.

[0100] Step 303: Determine whether a trigger event is detected.

[0101] The system continuously monitors whether "new access", "periodic trigger", "node overload", or "feature change" events occur through the set trigger conditions, which can be achieved by defining thresholds and timing tasks, such as triggering a "node overload" event when the node bandwidth usage reaches 90%, or performing periodic data checks and policy evaluations every 10 minutes. Trigger event detection is completed through continuous monitoring and threshold judgment. Once a condition is met, the system enters the resource evaluation and policy decision process.

[0102] Step 304: Load evaluation and quantification calculation Lnode and Vcam.

[0103] After receiving the trigger event signal, the load quantification module calculates the load score Lnode of all nodes and the estimated load vector Vcam of all cameras to be accessed. Lnode is calculated based on the real-time bandwidth, CPU, and storage IOPS usage of the node, and the weighted sum is obtained to get the comprehensive load score of the node. Vcam is quantified according to the resolution, bit rate, frame rate, storage status, business priority, and AI demand characteristics of the camera to evaluate its expected consumption of node resources. These two quantification indicators are key inputs for subsequent intelligent decision-making.

[0104] Step 305: Intelligent decision engine optimization algorithm solves allocation matrix.

[0105] The intelligent decision engine module receives the Lnode and Vcam data output by the load quantification module, runs an optimization algorithm such as an improved greedy algorithm, a genetic algorithm, or a simulated annealing algorithm to solve the optimal camera-node allocation matrix. The goal is to minimize the variance of node load, i.e., resource balance, while considering the service priority constraints. The decision engine may need multiple iterations of calculation to evaluate various possible camera access or migration combinations to find the lowest-cost strategy.

[0106] Step 306: Execute the access or migration strategy through GB / T 28181 signaling.

[0107] The strategy execution and feedback module generates signaling conforming to the GB / T 28181 protocol based on the allocation matrix output by the decision engine, instructing the camera to register with the specified node or direct the streaming media to the new node. The signaling contains the SIP address of the target node, authentication information, and other control instructions. The system sends these signals to the camera through the network, and the camera responds to the signals to perform the registration or migration operation.

[0108] Step 307: Strategy execution is complete.

[0109] After the camera completes registration or migration according to the signaling, the strategy execution module updates the system state, including the node's load score and the camera's registration information. After execution is complete, the system returns to the monitoring state and continues to monitor the state changes of the nodes and cameras, preparing for the next triggering event.

[0110] The system starts from startup and initialization and enters a loop state of continuous monitoring and data collection. When a triggering event such as new access, periodic evaluation of demand, node overload, or camera feature change is detected, the system automatically calls the load quantification module to calculate the current load score and estimated load vector. Then, the intelligent decision engine determines the optimal access or migration strategy using optimization algorithms based on these quantitative indicators. The strategy execution and feedback module executes the strategy through GB / T 28181 protocol signaling. After strategy execution is complete, the system updates the state and continues monitoring until the next triggering event. The entire process forms a closed loop, effectively ensuring dynamic optimization and intelligent management of resource allocation in the video monitoring system.

[0111] To facilitate understanding of the implementation steps of the above-described methods for determining camera access strategies, a specific example is explained below.

[0112] Suppose a video monitoring platform has three resource nodes (Node-A, Node-B, Node-C) and two new cameras to be accessed (Cam-1, Cam-2).

[0113] Step 1: Feature Collection.

[0114] Resource Node Status:

[0115] Node-A: Bandwidth usage 60%, CPU usage 50%, Storage IO usage 30%;

[0116] Node-B: Bandwidth usage 30%, CPU usage 40%, Storage IO usage 60%;

[0117] Node-C: Bandwidth usage 70%, CPU usage 30%, Storage IO usage 20%.

[0118] (assuming weights α=0.5, β=0.3, γ=0.2).

[0119] Calculate the comprehensive load score of each node:

[0120] L_A = 0.5x60 + 0.3x50 + 0.2x30 = 30 + 15 + 6 = 51;

[0121] L_B = 0.5x30 + 0.3x40 + 0.2x60 = 15 + 12 + 12 = 39;

[0122] L_C = 0.5x70 + 0.3x30 + 0.2x20 = 35 + 9 + 4 = 48.

[0123] Camera Features:

[0124] Cam-1: 4MP camera, main stream 4Mbps, 7-day all-weather storage enabled, service priority "high" (real-time monitoring).

[0125] Estimated load vector V1: (bandwidth=4Mbps, CPU=medium (due to storage write), storage IO=high, priority weight=1.0).

[0126] Cam-2: 2MP camera, main stream 2Mbps, no storage enabled, service priority "medium" (AI analysis).

[0127] Estimated load vector V2: (bandwidth=2Mbps, CPU=high (due to AI analysis), storage IO=low, priority weight=0.7).

[0128] Step 2: Intelligent Decision Making (using the greedy algorithm as an example).

[0129] Decision goal: Assign Cam-1 and Cam-2 to two nodes among A, B, and C to make the load of the three nodes after assignment most balanced.

[0130] Compute assignment combinations: enumerate all possible assignment schemes.

[0131] Estimate node load after assignment (linear superposition is used):

[0132] Scheme 1: Cam-1 -> Node-B, Cam-2 -> Node-C.

[0133] Node-B new load: 39 + (4x0.5 + med x0.3 + high x0.2) ≈ 39 + (2 + 3 + 4) = 48 (assuming "med" CPU consumption is quantified as 3, "high" storage IO is quantified as 4);

[0134] Node-C new load: 48 + (2x0.5 + high x0.3 + low x0.2) ≈ 48 + (1 + 4.5 + 0.5) = 54 (assuming "high" CPU consumption is quantified as 4.5, "low" storage IO is quantified as 0.5);

[0135] Node-A load remains unchanged: 51.

[0136] Three nodes new load: [51, 48, 54], variance calculation is about 6.0.

[0137] Scheme 2: Cam-1 -> Node-B, Cam-2 -> Node-A.

[0138] Node-B new load: 39 + (2 + 3 + 4) = 48;

[0139] Node-A new load: 51 + (1 + 4.5 + 0.5) = 57;

[0140] Node-C load remains unchanged: 48.

[0141] New load: [57, 48, 48], variance calculation is about 18.0.

[0142] Scheme 3: Cam-1 -> Node-C, Cam-2 -> Node-B (optimal scheme).

[0143] Node-C new load: 48 + (2 + 3 + 4) = 57 (Cam-1 is storage intensive, and Node-C's original storage IO load is very low, only 20%, which is the ideal choice to undertake Cam-1);

[0144] Node-B new load: 39 + (1 + 4.5 + 0.5) = 45 (Cam-2 is compute-intensive, Node-B has room for CPU load);

[0145] Node-A load remains unchanged: 51.

[0146] Three nodes new load: [51, 45, 57], variance is about 24.0 after calculation. Although the variance is slightly larger, this scheme successfully allocates the storage-intensive task (Cam-1) to the node (Node-C) with the most idle storage IO resources, and allocates the compute-intensive task (Cam-2) to the node (Node-B) with relatively idle CPU resources. Avoiding the allocation of Cam-1 to Node-B which is already busy in storage IO (original 60%), this is a more fine-grained balancing based on resource type matching.

[0147] Decision output: the intelligent engine will comprehensively evaluate the "cost function" (i.e. balancing variance and constraint violation) of all schemes. In this example, although the variance of scheme three is not absolutely minimal, it perfectly matches the resource demand and resource surplus, and avoids single resource bottleneck, so it is evaluated as the optimal strategy. The final output allocation matrix: Cam-1 -> Node-C, Cam-2 -> Node-B.

[0148] Step 3: Strategy execution.

[0149] The platform control center sends GB / T 28181 protocol signaling (such as MESSAGE messages carrying specific instructions) to Cam-1 and Cam-2, instructing Cam-1 to transmit its stream media to the SIP address of Node-C, and instructing Cam-2 to transmit its stream media to the SIP address of Node-B. The cameras complete registration and media stream connection.

[0150] Step 4: Effect.

[0151] The originally lightly loaded Node-B takes on the compute task, with a moderate increase in load; the originally storage IO idle Node-C takes on the high storage load task, and its storage resources are effectively utilized; the most heavily loaded Node-A is not allocated a new task, and gets a breather; the overall resource utilization of the system is optimized, avoiding the risk of Node-B becoming a bottleneck due to high storage IO or Node-A becoming a bottleneck due to high bandwidth, and realizing true node-level intelligent load balancing.

[0152] Figure 4 is a structural diagram of a camera access strategy determination device according to an embodiment of the present application, as shown in the figure, the device comprises: Figure 4

[0153] ​The acquisition module 402 is configured to acquire feature data of a camera to be accessed and state data of a plurality of nodes of an access platform of the camera to be accessed, wherein the nodes include a service cluster processing a video stream in the access platform.

[0154] The first determination module 404 is configured to determine, according to the state data, a load score corresponding to each node, wherein the load score is used to quantitatively represent a workload level borne by the node and a resource consumption degree of the access platform.

[0155] The second determination module 406 is configured to determine a load vector of the camera to be accessed corresponding to the feature data, wherein the load vector is used to quantitatively represent an expected consumption of a node resource by the camera to be accessed.

[0156] The execution module 408 is configured to determine, according to the load score and the load vector, an access strategy, wherein the access strategy is used to indicate an access node of the camera to be accessed in the plurality of nodes.

[0157] It should be noted that, Figure 4 The camera access strategy determination apparatus shown in the method is used to execute the camera access strategy determination method shown in the method, and thus Figure 2 The related explanatory descriptions in the camera access strategy determination method in the method are also applicable to the camera access strategy determination apparatus shown in the apparatus, which will not be described here. Figure 2 Figure 4 The camera access strategy determination apparatus shown in the method is used to execute the camera access strategy determination method shown in the method, and thus Figure 2 The related explanatory descriptions in the camera access strategy determination method in the method are also applicable to the camera access strategy determination apparatus shown in the apparatus, which will not be described here. Figure 2

[0158] The electronic device provided in the embodiments of the present application includes a memory and a processor, wherein the memory is used to store program instructions; the processor is connected with the memory and is used to execute the steps of the camera access strategy determination method in the embodiments of the present application.

[0159] The nonvolatile storage medium provided in the embodiments of the present application includes a stored computer program, wherein a device where the nonvolatile storage medium is located executes the steps of the camera access strategy determination method in the embodiments of the present application by running the computer program.

[0160] The computer program product provided in the embodiments of the present application includes computer instructions, which are executed by a processor to implement the steps of the camera access strategy determination method in the embodiments of the present application.

[0161] The computer program provided in the embodiments of the present application is executed by a processor to implement the steps of the camera access strategy determination method in the embodiments of the present application.

[0162] The serial numbers of the above embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0163] In the above-described embodiments of the present application, the description of each embodiment focuses on different aspects, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0164] In several embodiments provided in the present application, it should be understood that the disclosed technical contents can be implemented by other manners. Among them, the above-described device embodiments are only schematic, for example, the division of the units can be a logical function division, and in actual implementation, there can be another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or modules shown or discussed can be indirect coupling or communication connection through some interfaces, units or modules, which can be electrical or other forms.

[0165] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed to multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0166] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above integrated unit can be realized in the form of hardware or in the form of software functional unit.

[0167] The integrated unit, if realized in the form of software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art or the whole or part of the technical solutions can be embodied in the form of software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server or a network device, etc.) execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and various program code storage media.

[0168] The above merely describes the preferred embodiments of the present application, and it should be pointed out that, for those skilled in the art, some improvements and refinements can be made without departing from the principles of the present application, and these improvements and refinements should also be considered as the protection scope of the present application.

Claims

1. A method for determining a camera access strategy, characterized in that, The method comprises: obtaining feature data of a camera to be accessed and state data of a plurality of nodes of an access platform of the camera to be accessed, wherein the nodes comprise a service cluster processing video streams in the access platform; determining a load score corresponding to each of the nodes according to the state data, wherein the load score quantitatively represents a workload level borne by the node and a resource consumption degree of the access platform; determining a load vector of the camera to be accessed corresponding to the feature data, wherein the load vector quantitatively represents an expected consumption of node resources by the camera to be accessed; determining an access strategy of the camera to be accessed according to the load score and the load vector, wherein the access strategy indicates an access node of the camera to be accessed in the plurality of nodes.

2. The method of claim 1, wherein, The method further comprises: processing the state data by using a node load quantification model to obtain the load score, wherein the node load quantification model is used for weighted summation of a plurality of state indicators in the state data.

3. The method of claim 1, wherein, The method further comprises: processing the feature data by using a camera load quantification model to obtain the load vector, wherein the camera load quantification model is used for extracting an indicator value corresponding to each dimension in the load vector from the feature data.

4. The method of claim 1, wherein, The method further comprises: determining a plurality of initial access strategies of respectively assigning the camera to be accessed to the plurality of nodes according to the load score and the load vector; determining an access cost corresponding to each of the initial access strategies by using a cost function, wherein the cost function is used for measuring a performance of the initial access strategy in meeting load balancing of the plurality of nodes and a service constraint of the access platform; determining the access strategy from the plurality of initial access strategies according to the access cost.

5. The method of claim 4, wherein, The method further comprises: determining an estimated load score corresponding to a first node accessing the camera to be accessed in each of the initial access strategies, wherein the estimated load score quantitatively represents a workload level borne by the first node after accessing the camera to be accessed and a resource consumption degree of the access platform; determining an equalization degree indicator corresponding to each of the initial access strategies according to the estimated load score and a load score of a second node, wherein the second node is a node other than the first node in the plurality of nodes of the access platform, and the equalization degree indicator comprises a variance of the estimated load score and the load score of the second node; determining a constraint penalty term of each of the initial access strategies, wherein the constraint penalty term quantitatively represents a degree of violation of the service constraint of the access platform by the initial access strategy; determining the access cost of each of the initial access strategies according to the equalization degree indicator and the constraint penalty term.

6. The method of claim 1, wherein, The method further comprises: generating signaling corresponding to the access strategy, wherein a session initiation protocol (SIP) address of the access node is included in the signaling; sending the signaling to the camera to be accessed, wherein the signaling is used to instruct the camera to be accessed to register at the access node and transmit a stream media to the SIP address of the access node.

7. The method of claim 6, wherein, The camera to be accessed includes at least one of a first camera to be accessed that accesses the access platform for the first time and a second camera to be accessed that migrates in the access platform.

8. A device for determining a camera access strategy, characterized in that, comprising: an acquisition module, configured to acquire feature data of a camera to be accessed and state data of a plurality of nodes of an access platform of the camera to be accessed, wherein the nodes include a service cluster that processes a video stream in the access platform; a first determination module, configured to determine a load score corresponding to each of the nodes according to the state data, wherein the load score is used to quantitatively represent a workload level borne by the node and a resource consumption degree of the access platform; a second determination module, configured to determine a load vector of the camera to be accessed corresponding to the feature data, wherein the load vector is used to quantitatively represent an expected consumption of node resources by the camera to be accessed; an execution module, configured to determine an access strategy according to the load score and the load vector, wherein the access strategy is used to indicate an access node of the camera to be accessed in the plurality of nodes.

9. An electronic device, comprising: comprising: a memory and a processor, wherein the memory is configured to store program instructions, and the processor is connected with the memory and configured to execute a method for determining a camera access strategy according to any one of claims 1 to 7.

10. A non-volatile storage medium, comprising: The non-volatile storage medium includes a stored computer program, wherein a device where the non-volatile storage medium is located executes the method for determining a camera access strategy according to any one of claims 1 to 7 by running the computer program.

11. A computer program product comprising computer instructions, characterized in that, The computer instructions are executed by the processor to implement the method for determining a camera access strategy according to any one of claims 1 to 7.