Camera deployment methods, devices, equipment, storage media, and software products
By constructing a pedestrian walking path network and using a multi-objective genetic algorithm to optimize the camera deployment scheme, the problem of poor camera deployment effect in the existing technology is solved, and efficient passenger flow monitoring and economic cost reduction are achieved in the monitored area.
Patent Information
- Application Number
- CN202510632863.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2026-11-17
AI Technical Summary
Existing camera deployment methods cannot accurately monitor passenger flow information in various areas, and do not consider the impact of camera parameters on deployment effectiveness, resulting in poor camera deployment results.
A pedestrian walking path network is constructed, and a multi-objective genetic algorithm is used to generate a camera deployment scheme. By minimizing the impact of camera failures and maximizing link weights, the deployment location of cameras is optimized.
It improves the effectiveness of camera deployment, enabling effective monitoring of passenger flow information in the monitored area, reducing economic costs, and considering the impact of camera parameters on deployment, providing personalized customization services.
Smart Images

Figure CN123123536A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video technology, and in particular to a camera deployment method, apparatus, device, storage medium, and program product. Background Technology
[0002] Cameras are primarily deployed for security and surveillance purposes. Monitoring systems composed of multiple cameras have become an important component of major security systems and are widely used in various scenarios.
[0003] In existing technologies, the deployment of cameras in monitoring areas primarily relies on subjective human experience. This can lead to significant economic costs in deploying a large number of cameras within the monitoring area, yet still fail to comprehensively monitor pedestrian flow information in every area. To address this, some camera deployment methods utilize computer vision techniques and deep learning models to analyze historical pedestrian flow data in the monitoring area to predict potential pedestrian density and behavioral patterns, and then deploy cameras based on these predictions. However, this method still cannot accurately monitor pedestrian flow information in every area and does not consider the impact of camera parameters (such as camera type, camera lifespan, and camera failure probability) on the deployment effectiveness, resulting in unsatisfactory deployment results. Summary of the Invention
[0004] This application provides a camera deployment method, apparatus, device, storage medium, and program product to solve the technical problem of poor camera deployment effect in existing camera deployment methods.
[0005] In a first aspect, embodiments of this application provide a camera deployment method, comprising: constructing a pedestrian walking path network for a monitored area; the pedestrian walking path network includes multiple path nodes and multiple links; based on the pedestrian walking path network, camera parameter information, and the link weight of each link, a multi-objective genetic algorithm is used to solve the problem and generate a target camera deployment scheme for the monitored area; wherein, the multi-objective genetic algorithm is used to solve the problem with the objectives of minimizing the impact of camera failures and maximizing the link weight of the target links, and the target links are the links in the target camera deployment scheme where cameras need to be deployed.
[0006] In one embodiment, based on the pedestrian walking path network, camera parameter information, and the link weight of each link, a multi-objective genetic algorithm is used to solve the problem and generate a target camera deployment scheme for the area to be monitored. This includes: initializing the algorithm parameters of the multi-objective genetic algorithm; the algorithm parameters include population size, camera parameter information, chromosome length, current iteration count, and maximum iteration count, where chromosome length represents the total number of links in the pedestrian walking path network; encoding the genes of each link and initializing the population; the population includes multiple individuals, each individual representing a link sorting method; decoding the genes of each individual to obtain the link sorting method for each individual, and constructing a link path mapping matrix for each individual; the link path mapping matrix is O(n). The mapping matrix of path D to multiple links, where each path node includes at least one entry node and at least one exit node, and the OD path is a path starting from the entry node and ending at the exit node; based on the mapping matrix of each link path, the camera deployment scheme corresponding to each individual is obtained by solving the basis link method; based on the camera parameter information and the link weight of each link, the individual fitness of each individual is determined; based on the individual fitness and individual crowding of each individual, the population is iterated until the maximum number of iterations is reached to obtain the optimal population; from the optimal population, the individual with the lowest non-dominant level is selected as the target individual, and the camera deployment scheme corresponding to the target individual is used as the target camera deployment scheme.
[0007] In one embodiment, the fitness of any individual is determined based on the maximum failure probability of the camera, the cost of the camera, and the scheme weight of the camera deployment scheme corresponding to the individual.
[0008] In one embodiment, the population is iterated based on the individual fitness and individual crowding of each individual until the maximum number of iterations is reached to obtain the optimal population. This includes: using the current population as the parent population; performing a non-dominated sort on all individuals based on the individual fitness and individual crowding of each individual in the parent population to obtain a non-dominated sorting result; selecting dominant individuals from the parent population based on the non-dominated sorting result, and performing crossover and mutation operations on the dominant individuals to obtain the offspring population; merging the parent population and the offspring population to obtain a new population; iteratively updating the parent population based on the new population using an elite preservation strategy, and updating the current iteration count; if the current iteration count has not reached the maximum number of iterations, returning to the step of performing a non-dominated sort on all individuals based on the individual fitness and individual crowding of each individual in the parent population to obtain a non-dominated sorting result, until the maximum number of iterations is reached to obtain the optimal population.
[0009] In one embodiment, any camera deployment scheme is obtained by the following steps: simplifying the link path mapping matrix based on Gaussian elimination to obtain a simplified row echelon matrix; selecting a set of linearly independent links as base links from the simplified row echelon matrix based on the rank of the simplified row echelon matrix; and determining the camera deployment scheme based on the base links.
[0010] In one embodiment, constructing a pedestrian walking path network for the area to be monitored includes: determining each path node and each link in the area to be monitored; constructing a pedestrian walking path network based on each path node and each link; dividing the area to be monitored into multiple sub-regions; each sub-region includes at least one link; evaluating the importance of each sub-region to obtain a comprehensive weight for each sub-region; and determining the link weight for each link based on the comprehensive weight of each sub-region.
[0011] Secondly, embodiments of this application provide a camera deployment device, including: a network construction module for constructing a pedestrian walking path network for a monitored area; the pedestrian walking path network includes multiple path nodes and multiple links; and a camera deployment module for generating a target camera deployment scheme for the monitored area by using a multi-objective genetic algorithm based on the pedestrian walking path network, camera parameter information, and the link weight of each link; wherein the multi-objective genetic algorithm aims to minimize the impact of camera failures and maximize the link weight of the target links, and the target links are the links in the target camera deployment scheme where cameras need to be deployed.
[0012] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement any of the camera deployment methods described above.
[0013] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the camera deployment methods described above.
[0014] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements any of the camera deployment methods described above.
[0015] The camera deployment method, apparatus, device, storage medium, and program product provided in this application construct a pedestrian walking path network for a monitored area. The pedestrian walking path network includes multiple path nodes and multiple links. Based on the pedestrian walking path network, camera parameter information, and the link weight of each link, a multi-objective genetic algorithm is used to solve the problem and generate a target camera deployment scheme for the monitored area. The multi-objective genetic algorithm aims to minimize the impact of camera failures and maximize the link weight of target links, where the target links are the links in the target camera deployment scheme where cameras need to be deployed. Through this method, the problem of monitoring pedestrian flow information within the monitored area is transformed into a multi-camera deployment problem based on the pedestrian walking path network during camera deployment. The multi-objective genetic algorithm, which aims to minimize the impact of camera failures and maximize the link weight of target links, takes into account the influence of camera parameters on the camera deployment effect, generating an optimal target camera deployment scheme and effectively improving the camera deployment effect. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is one of the flowcharts illustrating the camera deployment method provided in the embodiments of this application.
[0018] Figure 2 This is the second flowchart illustrating the camera deployment method provided in this application embodiment.
[0019] Figure 3 This is one of the schematic diagrams of camera deployment methods provided in the embodiments of this application.
[0020] Figure 4 This is the second schematic diagram of the camera deployment method provided in the embodiments of this application.
[0021] Figure 5 This is a schematic diagram of the pedestrian walking path network provided in the embodiments of this application.
[0022] Figure 6 This is a schematic diagram of a camera deployment scheme obtained based on the base link method provided in an embodiment of this application.
[0023] Figure 7 This is a schematic diagram of the camera deployment device provided in the embodiments of this application.
[0024] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0026] Please see Figure 1 , Figure 1 This is one of the flowcharts illustrating the camera deployment method provided in this application embodiment. For example... Figure 1 As shown in the embodiments of this application, the camera deployment method includes steps S110 to S120, and the specific steps are as follows: S110: Construct a pedestrian walking path network for the area to be monitored.
[0027] The pedestrian walking path network consists of multiple path nodes and multiple links.
[0028] Optionally, the monitoring area may be public places such as parks, industrial parks, and scenic spots.
[0029] S120: Based on the pedestrian walking path network, camera parameter information, and the link weight of each link, a multi-objective genetic algorithm is used to solve the problem and generate a target camera deployment scheme for the area to be monitored.
[0030] Among them, the multi-objective genetic algorithm aims to minimize the impact of camera failures and maximize the link weight of the target link, where the target link is the link in the target camera deployment scheme that requires the deployment of cameras.
[0031] Please see Figure 2 , Figure 2 This is the second flowchart illustrating the camera deployment method provided in this application embodiment.
[0032] like Figure 2 As shown, first determine each path node and each link in the area to be monitored based on the map or CAD drawing of the area to be monitored.
[0033] Generally, the area to be monitored includes at least one entrance and at least one exit, and there are multiple branch nodes between the entrance and the exit. Therefore, the area to be monitored includes multiple path nodes, which include at least one entrance node (corresponding to the entrance), at least one exit node (corresponding to the exit), and multiple intermediate path nodes (corresponding to the branch nodes).
[0034] Different path nodes may have different links, and a link is used to connect two different path nodes. A path that starts from an ingress node and ends at an egress node is called an OD (Origin-Destination) path, and there is usually at least one OD path between the ingress node and the egress node.
[0035] Optionally, a depth-first search algorithm can be used to solve for all OD paths within the area to be monitored.
[0036] Furthermore, a pedestrian walking path network is constructed based on each path node and each link. The pedestrian walking path network includes multiple path nodes and multiple links.
[0037] Furthermore, based on the service characteristics or actual application needs of each area within the monitored area, the monitored area is divided into multiple sub-areas.
[0038] Each sub-region includes at least one link. Furthermore, the importance of each sub-region is assessed to obtain the comprehensive weight of each sub-region.
[0039] Optionally, when assessing the importance of each sub-region, a combination of subjective and objective weighting analysis and weighting method can be used to determine the comprehensive weight of each sub-region, so as to avoid the limitations of using a single subjective and objective weighting analysis method.
[0040] Specifically, the subjective and objective weighting analysis method requires determining subjective weights and objective weights separately. Subjective weights can be evaluated using the analytic hierarchy process (AHP), while objective weights can be evaluated using the entropy method. For each sub-region, when assessing its importance, the AHP is first used to determine its subjective weights, then the entropy method is used to determine its objective weights, and finally, the combined weighting method is used to perform a weighted aggregation operation on the subjective and objective weights to obtain the comprehensive weight of the sub-region.
[0041] Furthermore, based on the comprehensive weight of each sub-region, the link weight of each link is determined.
[0042] Optionally, for each link, the combined weight of its sub-region is used as its link weight.
[0043] The park is divided into different sub-regions based on the service characteristics or actual application needs of each area. When assessing the importance of each sub-region, a comprehensive weighting analysis method combining subjective and objective factors is used. A combined weighting method is employed to derive the comprehensive weight of each sub-region to avoid the limitations of subjective and objective weighting evaluation.
[0044] Furthermore, based on the pedestrian walking path network, camera parameter information, and the link weight of each link, a multi-objective genetic algorithm is used to solve the problem and generate a target camera deployment scheme for the area to be monitored.
[0045] The camera deployment method provided in this application constructs a pedestrian walking path network for the area to be monitored. This network includes multiple path nodes and multiple links. Based on the pedestrian walking path network, camera parameter information, and the link weight of each link, a multi-objective genetic algorithm is used to solve the problem and generate a target camera deployment scheme for the area to be monitored. The multi-objective genetic algorithm aims to minimize the impact of camera failures and maximize the link weight of target links, where the target links are the links in the target camera deployment scheme where cameras need to be deployed. Through this method, the problem of monitoring pedestrian flow information within the area to be monitored is transformed into a multi-camera deployment problem based on the pedestrian walking path network. The multi-objective genetic algorithm is introduced during the solution process, aiming to minimize the impact of camera failures and maximize the link weight of target links. This takes into account the influence of camera parameters on the camera deployment effect, generating an optimal target camera deployment scheme and effectively improving the camera deployment effect.
[0046] In some embodiments, a multi-objective genetic algorithm is used to solve the problem based on the pedestrian walking path network, camera parameter information, and the link weight of each link, generating a target camera deployment scheme for the area to be monitored. This includes: initializing the algorithm parameters of the multi-objective genetic algorithm; the algorithm parameters include population size, camera parameter information, chromosome length, current iteration count, and maximum iteration count, where chromosome length represents the total number of links in the pedestrian walking path network; encoding the genes of each link and initializing the population; the population includes multiple individuals, each individual representing a link sorting method; decoding the genes of each individual to obtain the link sorting method for each individual, and constructing a link path mapping matrix for each individual; the link path mapping matrix is O(n). The mapping matrix of path D to multiple links, where each path node includes at least one entry node and at least one exit node, and the OD path is a path starting from the entry node and ending at the exit node; based on the mapping matrix of each link path, the camera deployment scheme corresponding to each individual is obtained by solving the basis link method; based on the camera parameter information and the link weight of each link, the individual fitness of each individual is determined; based on the individual fitness and individual crowding of each individual, the population is iterated until the maximum number of iterations is reached to obtain the optimal population; from the optimal population, the individual with the lowest non-dominant level is selected as the target individual, and the camera deployment scheme corresponding to the target individual is used as the target camera deployment scheme.
[0047] Please continue reading. Figure 2 After determining the pedestrian walking path network and the link weight of each link, the algorithm parameters of the multi-objective genetic algorithm are initialized.
[0048] The algorithm parameters include population size (populationSize), maximum number of iterations (maxGen), chromosome length (chromosome length represents the total number of links in the pedestrian walking path network) (dim), camera parameter information, and current iteration number (gen). The current iteration number can be initialized to 0 (i.e., gen=0).
[0049] Optionally, the camera parameter information includes the camera failure probability, the camera useful life, and the camera cost.
[0050] Furthermore, each link is genetically encoded, and a population is initialized, consisting of multiple individuals, with each individual representing a link sorting method.
[0051] Furthermore, gene decoding is performed on each individual to obtain the link sorting method of each individual, and a link path mapping matrix is constructed for each individual.
[0052] The link path mapping matrix is a mapping matrix between multiple OD paths and multiple links. An OD path is a path that starts from an ingress node and ends at an egress node.
[0053] Furthermore, based on the path mapping matrix of each link, the camera deployment scheme corresponding to each entity is obtained by solving the base link method.
[0054] Furthermore, based on camera parameter information and the link weight of each link, the individual fitness of each individual is determined.
[0055] The fitness of any individual is determined based on the maximum failure probability of the camera, the cost of the camera, and the scheme weight of the camera deployment scheme corresponding to the individual.
[0056] The maximum failure probability of the camera is determined based on the camera failure probability and the camera's useful life.
[0057] Furthermore, based on camera parameter information and the link weight of each link, the individual fitness of each individual is determined, and the population is iterated based on the individual fitness and the individual crowding of each individual until the maximum number of iterations is reached to obtain the optimal population.
[0058] Finally, the individual with the lowest non-dominant level (Pareto level) is selected from the optimal population as the target individual (i.e., the Pareto optimal solution set), and the camera deployment scheme corresponding to the target individual is taken as the target camera deployment scheme.
[0059] In some embodiments, the fitness of any individual is determined based on the maximum failure probability of the camera, the cost of the camera, and the scheme weight of the camera deployment scheme corresponding to the individual.
[0060] In some embodiments, the population is iterated based on the individual fitness and individual crowding of each individual until the maximum number of iterations is reached to obtain the optimal population. This includes: using the current population as the parent population; performing a non-dominated sort on all individuals based on the individual fitness and individual crowding of each individual in the parent population to obtain a non-dominated sorting result; selecting dominant individuals from the parent population based on the non-dominated sorting result, and performing crossover and mutation operations on the dominant individuals to obtain the offspring population; merging the parent population and the offspring population to obtain a new population; iteratively updating the parent population based on the new population using an elite retention strategy, and updating the current iteration count; if the current iteration count has not reached the maximum number of iterations, returning to the step of performing a non-dominated sort on all individuals based on the individual fitness and individual crowding of each individual in the parent population to obtain a non-dominated sorting result, until the maximum number of iterations is reached to obtain the optimal population.
[0061] Please continue reading. Figure 2 After determining the camera deployment plan for each individual, the current population is used as the parent population. The individual fitness of each individual is determined based on the maximum failure probability of the camera, the cost of the camera, and the scheme weight of the camera deployment scheme corresponding to each individual.
[0062] The higher the individual fitness, the better the camera deployment scheme for that individual; the lower the individual fitness, the worse the camera deployment scheme for that individual.
[0063] Understandably, some individuals may have the same individual fitness. In this case, it is necessary to further calculate the individual crowding degree of each individual and combine the individual fitness degree and the individual crowding degree to comprehensively consider the camera deployment scheme corresponding to different individuals.
[0064] The higher the individual crowding distance, the better the camera deployment scheme for that individual; the lower the individual crowding distance, the worse the camera deployment scheme for that individual.
[0065] For different individuals with the same fitness level, the effectiveness of the corresponding camera deployment scheme can be further evaluated based on the individual crowding level.
[0066] Furthermore, the individual crowding degree of each individual is calculated, based on the parent population. The individual fitness and crowding of each individual are used to perform a fast Pareto sort on all individuals to obtain the non-dominated sorting results.
[0067] Furthermore, based on the non-dominated ranking results, from the parent population Select dominant individuals and perform crossover and mutation operations on them to obtain the offspring population. .
[0068] Among them, the dominant individuals are the individuals with the lowest Pareto level; the lower the Pareto level, the better the camera deployment scheme corresponding to that individual; the higher the Pareto level, the worse the camera deployment scheme corresponding to that individual.
[0069] Furthermore, merging parental populations and offspring population A new population was obtained. And based on the new population Through elite preservation strategies on parent populations Perform iterative updates and update the current iteration number.
[0070] Specifically, merging parental populations and offspring population A new population was obtained. Next, calculate the new population. The individual fitness and crowding of each individual in the population, and their impact on the new population. Perform Pareto sorting to obtain a new population. The non-dominated sorting results.
[0071] new population In the non-dominated ordination results, the new population Each individual is arranged according to Pareto rank from low to high, and individuals with the same Pareto rank form a subpopulation. At this point, each subpopulation can be added to the parent population in order of Pareto rank from low to high. In this process, until all individuals in a certain subpopulation layer cannot join the parent population. Then, based on the individual crowding density of each individual in that subpopulation layer, they are arranged in descending order and then added to the parent population in sequence. Until the parent population Once filled, this round of parental population replacement is complete. The iterative update is performed, and the current iteration number gen is updated.
[0072] If the current iteration number gen has not reached the maximum iteration number maxGen (i.e., gen < maxGen), then return to the step of performing a non-dominated sort on all individuals based on the individual fitness and individual crowding of each individual in the parent population, and obtaining the non-dominated sorting result, until the maximum iteration number is reached and the optimal population is obtained.
[0073] In some embodiments, any camera deployment scheme is obtained by solving the following steps: simplifying the link path mapping matrix based on Gaussian elimination to obtain a simplified row echelon matrix; selecting a set of linearly independent links as base links from the simplified row echelon matrix based on the rank of the simplified row echelon matrix; and determining the camera deployment scheme based on the base links.
[0074] This application uses the base link method to solve for the camera deployment scheme corresponding to each individual. To facilitate understanding of the base link method in this application, it is combined with... Figures 3 to 6 Provide an explanation.
[0075] Please see Figure 3 and Figure 4 , Figure 3 This is one of the schematic diagrams of camera deployment methods provided in the embodiments of this application. Figure 4 This is the second schematic diagram of the camera deployment method provided in the embodiments of this application.
[0076] like Figure 3 As shown, assume node 1 is the only entry node of the pedestrian walking path network in the area to be monitored, and nodes 6 and 7 are the two exit nodes of the pedestrian walking path network in the area to be monitored. The simplest way to completely monitor pedestrian flow information on all links in the area to be monitored is to deploy cameras on all links. However, in reality, deploying cameras on only a portion of the links is sufficient to obtain pedestrian flow information for all links.
[0077] like Figure 4 As shown, assuming cameras are deployed on links 1-2 (the link between nodes 1 and 2) and 2-3 (the link between nodes 2 and 3), then based on the node flow conservation property of node 2 (i.e., the inflow to node 2 equals the outflow to node 2), the passenger flow (i.e., link traffic) of link 2-4 (the link between nodes 2 and 4) can be inferred. Similarly, based on the node flow conservation property, the passenger flow information of links 3-5 and 4-5 can be further inferred. Furthermore, since cameras are also deployed on link 5-6, the link flow of link 5-7 can be inferred based on the node flow conservation property of node 5, thus obtaining the passenger flow information of the entire pedestrian walking path network. Relative to... Figure 3 , Figure 4 The camera deployment scheme only required placing cameras on 3 links to obtain pedestrian flow information for the entire pedestrian walking path network, which greatly saved economic costs.
[0078] Based on this, this embodiment proposes a multi-camera deployment method based on link passenger flow information monitoring.
[0079] First, based on the map or CAD drawings of the area to be monitored, determine each path node and each link in the area to be monitored, and construct the pedestrian walking path network of the area to be monitored.
[0080] Secondly, a depth-first search algorithm is used to solve for all OD paths in the pedestrian walking path network (there is at least one OD path).
[0081] Furthermore, in the process of solving the problem using a multi-objective genetic algorithm, for each individual, after determining the link path mapping matrix of that individual, the link path mapping matrix of that individual is simplified using Gaussian elimination in linear algebra to obtain a simplified row echelon form matrix RREF.
[0082] Furthermore, based on the rank r of the simplified row echelon matrix RREF, a set of linearly independent links is selected from the simplified row echelon matrix RREF as the base links. The base links are the minimum subset of links where cameras are deployed, and this minimum subset of links constitutes a "basis" of the vector space of the link path mapping matrix.
[0083] The number of linearly independent links is equal to the rank r of the simplified row echelon matrix RREF.
[0084] Furthermore, based on the base link, the camera deployment plan is determined.
[0085] In this embodiment, each link on the base link is a target link, and each target link needs to deploy a camera, thus forming a camera deployment scheme.
[0086] Since passenger flow information monitored on the base link (BL) can be used to infer passenger flow information on all other links without deployed cameras, passenger flow information for the entire network can be obtained. Based on this, the camera deployment method proposed in this embodiment is called the base link method.
[0087] To facilitate a further understanding of the base link method in this application, this section combines... Figure 5 and Figure 6 Let's take an example to explain.
[0088] Please see Figure 5 and Figure 6 , Figure 5This is a schematic diagram of the pedestrian walking path network provided in the embodiments of this application. Figure 6 This is a schematic diagram of a camera deployment scheme obtained based on the base link method provided in an embodiment of this application.
[0089] like Figure 5 As shown, assuming node 1 is the entry node and node 10 is the exit node, with nodes 2 through 9 in between, the depth-first search algorithm can be used to find the four OD paths in the pedestrian walking path network, denoted as P1:{1-2-4-6-7-8-10}, P2:{1-2-4-6-7-9-10}, P3:{1-3-5-6-7-8-10}, and P4:{1-3-5-6-7-9-10}.
[0090] Wherein, P1:{1-2-4-6-7-8-10} means that the OD path P1 passes through node 1, node 2, node 4, node 6, node 7, node 8 and node 10 in sequence, and the other OD paths follow the same pattern, which will not be elaborated here.
[0091] Based on the relationship between the link and the four OD paths, the corresponding link path mapping matrix L can be constructed, as shown in Table 1.
[0092] Table 1
[0093] Furthermore, the link-path mapping matrix L is simplified using Gaussian elimination to obtain the simplified row echelon matrix RREF of the link-path mapping matrix L, as shown in Table 2.
[0094] Table 2
[0095] Furthermore, the rank r of the simplified row echelon matrix RREF is calculated. A set of r linearly independent links are selected from the simplified row echelon matrix RREF as base links. Each link on the base links is a target link, and a camera is deployed on each target link to infer passenger flow information for all links in the pedestrian walking path network.
[0096] like Figure 6 As shown, since the columns containing “Link 1-2”, “Link 1-3” and “Link 7-8” in Table 2 are linearly independent, “Link 1-2”, “Link 1-3” and “Link 7-8” can be used as the base links of the pedestrian walking path network. Deploying cameras on each target link of the base links (i.e. “Link 1-2”, “Link 1-3” and “Link 7-8”) is the camera deployment scheme obtained based on the base link method.
[0097] Understandably, when the order of the four OD paths in the pedestrian walking path network is different, or the link sorting method is different, the base links obtained by the pedestrian walking path network may be different. Therefore, the link sorting method represented by each individual in the multi-objective genetic algorithm is different in order to find all possible base links as much as possible.
[0098] It should be noted that after determining the number and location of base links in the pedestrian walking path network, the inference of passenger flow information for non-base links can be obtained through a linear combination of base link flows, the coefficients of which are the same as the elements of the corresponding non-base link column vectors in the simplified row echelon matrix RREF (abbreviated as R). Assume R is a... If we have a matrix R with rank r, then selecting r linearly independent column vectors from R can form a subset of the basis links. The remaining column vectors form a subset of non-basic links. Since the rank of R is r, for all column vectors in R, the elements whose permutation positions are greater than r are all 0. These elements have no impact on the inference of non-basic link flows. Ignoring the elements in the vectors whose permutation positions are greater than r, we construct a new subset of basic links. and non-base link subset .
[0099] Among them, the base link subset The expression composed of the elements is as follows: ; in, Represents a subset of base links The first in One link, In R, the first... Line 1 The elements of the column.
[0100] Among them, the new base link subset The expression composed of the elements is as follows: ; in, Represents a new subset of base links The first in One link, Represents the new simplified row echelon matrix The Middle Line 1 The elements of the column.
[0101] Among them, the link flow of non-base links The expression for the inference equation is as follows: ; in, Corresponding to the base link subsets Observed passenger flow information Corresponding to non-base link subsets Observed passenger flow information.
[0102] Please refer to Table 3, which provides the inference results using base link flow. Figure 6 The inference equations for non-base link flows in the network shown.
[0103] Table 3
[0104] In some embodiments, constructing a pedestrian walking path network for the area to be monitored includes: determining each path node and each link in the area to be monitored; constructing a pedestrian walking path network based on each path node and each link; dividing the area to be monitored into multiple sub-regions; each sub-region includes at least one link; evaluating the importance of each sub-region to obtain a comprehensive weight for each sub-region; and determining the link weight for each link based on the comprehensive weight of each sub-region.
[0105] Specifically, based on the map or CAD drawings of the area to be monitored, each path node and each link in the area to be monitored is first determined.
[0106] Generally, the area to be monitored includes at least one entrance and at least one exit, and there are multiple branch nodes between the entrance and the exit. Therefore, the area to be monitored includes multiple path nodes, which include at least one entrance node (corresponding to the entrance), at least one exit node (corresponding to the exit), and multiple intermediate path nodes (corresponding to the branch nodes).
[0107] Different path nodes may have different links, and a link is used to connect two different path nodes. A path that starts from an ingress node and ends at an egress node is called an OD (Origin-Destination) path, and there is usually at least one OD path between the ingress node and the egress node.
[0108] Optionally, a depth-first search algorithm can be used to solve for all OD paths within the area to be monitored.
[0109] Furthermore, a pedestrian walking path network is constructed based on each path node and each link. The pedestrian walking path network includes multiple path nodes and multiple links.
[0110] Furthermore, based on the service characteristics or actual application needs of each area within the monitored area, the monitored area is divided into multiple sub-areas.
[0111] Each sub-region includes at least one link. Furthermore, the importance of each sub-region is assessed to obtain the comprehensive weight of each sub-region.
[0112] Optionally, when assessing the importance of each sub-region, a combination of subjective and objective weighting analysis and weighting method can be used to determine the comprehensive weight of each sub-region, so as to avoid the limitations of using a single subjective and objective weighting analysis method.
[0113] Specifically, the subjective and objective weighting analysis method requires determining subjective weights and objective weights separately. Subjective weights can be evaluated using the analytic hierarchy process (AHP), while objective weights can be evaluated using the entropy method. For each sub-region, when assessing its importance, the AHP is first used to determine its subjective weights, then the entropy method is used to determine its objective weights, and finally, the combined weighting method is used to perform a weighted aggregation operation on the subjective and objective weights to obtain the comprehensive weight of the sub-region.
[0114] Furthermore, based on the comprehensive weight of each sub-region, the link weight of each link is determined.
[0115] Optionally, for each link, the combined weight of its sub-region is used as its link weight.
[0116] Compared with existing technologies, the camera deployment method provided in this application is applicable to scenic spots, parks, and various types of industrial parks, with a wider range of applicable scenarios. By using this method to jointly deploy cameras, complete passenger flow information within the monitored area can be obtained, significantly reducing the economic cost of passenger flow monitoring. Furthermore, this embodiment optimizes the camera layout by maximizing the weight of the monitored area and minimizing the impact of camera failures. Users can customize the weight information of each link within the monitored area, focusing on key areas and providing personalized services, thereby effectively preventing stampedes or unnecessary crowd gatherings. The camera deployment method also considers the impact of camera parameters such as camera type, lifespan, and failure probability deployed in the pedestrian walking path network to minimize the impact of camera failures on regional passenger flow monitoring. This provides reliable monitoring data for public places such as scenic spots, parks, and industrial parks, and is of great significance for building a precise regional passenger flow perception system and an efficient passenger flow management service system.
[0117] This application also provides a camera deployment device. Please refer to [link / reference]. Figure 7 , Figure 7 This is a schematic diagram of the camera deployment device provided in an embodiment of this application. In this embodiment, the camera deployment device includes a network construction module 710 and a camera deployment module 720.
[0118] Network building module 710 is used to build a pedestrian walking path network for the area to be monitored.
[0119] The pedestrian walking path network consists of multiple path nodes and multiple links.
[0120] The camera deployment module 720 is used to generate a target camera deployment scheme for the area to be monitored by using a multi-objective genetic algorithm based on the pedestrian walking path network, camera parameter information and the link weight of each link.
[0121] Among them, the multi-objective genetic algorithm aims to minimize the impact of camera failures and maximize the link weight of the target link, where the target link is the link in the target camera deployment scheme that requires the deployment of cameras.
[0122] In some embodiments, the camera deployment module 720 is used to initialize the algorithm parameters of the multi-objective genetic algorithm. The algorithm parameters include population size, camera parameter information, chromosome length, current iteration number, and maximum iteration number. The chromosome length represents the total number of links in the pedestrian walking path network. Each link is genetically encoded, and the population is initialized. The population includes multiple individuals, and each individual represents a link sorting method. Each individual is genetically decoded to obtain the link sorting method of each individual, and a link path mapping matrix is constructed for each individual. The link path mapping matrix is a mapping matrix between OD paths and multiple links. Among the multiple path nodes, there is at least one entry node and at least one exit node. An OD path is a path that starts from an entry node and ends at an exit node. Based on each link path mapping matrix, the camera deployment scheme corresponding to each individual is solved by the basis link method. Based on the camera parameter information and the link weight of each link, the individual fitness of each individual is determined. Based on the individual fitness and the individual crowding of each individual, the population is iterated until the maximum number of iterations is reached to obtain the optimal population. The individual with the lowest non-dominant level is selected from the optimal population as the target individual, and the camera deployment scheme corresponding to the target individual is used as the target camera deployment scheme.
[0123] In some embodiments, the fitness of any individual is determined based on the maximum failure probability of the camera, the cost of the camera, and the scheme weight of the camera deployment scheme corresponding to the individual.
[0124] In some embodiments, the camera deployment module 720 is used to: use the current population as the parent population; perform a non-dominated sorting of all individuals based on the individual fitness and individual crowding of each individual in the parent population to obtain a non-dominated sorting result; select dominant individuals from the parent population based on the non-dominated sorting result, and perform crossover and mutation operations on the dominant individuals to obtain a offspring population; merge the parent population and the offspring population to obtain a new population; iteratively update the parent population based on the new population using an elite preservation strategy, and update the current iteration number; if the current iteration number has not reached the maximum iteration number, return to the step of performing a non-dominated sorting of all individuals based on the individual fitness and individual crowding of each individual in the parent population to obtain a non-dominated sorting result, until the maximum iteration number is reached to obtain the optimal population.
[0125] In some embodiments, any camera deployment scheme is obtained by solving the following steps: simplifying the link path mapping matrix based on Gaussian elimination to obtain a simplified row echelon matrix; selecting a set of linearly independent links as base links from the simplified row echelon matrix based on the rank of the simplified row echelon matrix; and determining the camera deployment scheme based on the base links.
[0126] In some embodiments, the network construction module 710 is used to determine each path node and each link in the area to be monitored; construct a pedestrian walking path network based on each path node and each link; divide the area to be monitored into multiple sub-regions; each sub-region includes at least one link; evaluate the importance of each sub-region to obtain the comprehensive weight of each sub-region; and determine the link weight of each link based on the comprehensive weight of each sub-region.
[0127] This application also provides an electronic device. Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 8 As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communications interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute the camera deployment method.
[0128] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0129] This application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the camera deployment methods provided by the above methods.
[0130] This application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the camera deployment methods provided by the above methods.
[0131] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0132] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for deploying a camera, characterized in that, include: Construct a pedestrian walking path network for the area to be monitored; The pedestrian walking path network includes multiple path nodes and multiple links; Based on the pedestrian walking path network, camera parameter information, and the link weight of each link, a multi-objective genetic algorithm is used to solve the problem and generate a target camera deployment scheme for the area to be monitored. The multi-objective genetic algorithm aims to minimize the impact of camera failures and maximize the link weight of the target link, where the target link is the link in the target camera deployment scheme where cameras need to be deployed.
2. The camera deployment method according to claim 1, characterized in that, The step of generating a target camera deployment scheme for the monitored area based on the pedestrian walking path network, camera parameter information, and the link weight of each link, using a multi-objective genetic algorithm, includes: Initialize the algorithm parameters of the multi-objective genetic algorithm; the algorithm parameters include population size, camera parameter information, chromosome length, current iteration number and maximum iteration number, and the chromosome length represents the total number of links in the pedestrian walking path network; Each link is genetically encoded, and a population is initialized; the population includes multiple individuals, and each individual represents a link sorting method; Gene decoding is performed on each individual to obtain the link sorting method of each individual, and a link path mapping matrix is constructed for each individual; the link path mapping matrix is a mapping matrix between OD path and multiple links, and the multiple path nodes include at least one entry node and at least one exit node, and the OD path is a path that starts from the entry node and ends at the exit node; Based on each of the link path mapping matrices, the camera deployment scheme corresponding to each individual is obtained by solving the base link method. Based on the camera parameter information and the link weight of each link, the individual fitness of each individual is determined; Based on the individual fitness and individual crowding of each individual, the population is iterated until the maximum number of iterations is reached to obtain the optimal population. The individual with the lowest non-dominance level is selected from the optimal population as the target individual, and the camera deployment scheme corresponding to the target individual is used as the target camera deployment scheme.
3. The camera deployment method according to claim 2, characterized in that, The fitness of any individual is determined based on the maximum failure probability of the camera, the cost of the camera, and the scheme weight of the camera deployment scheme corresponding to the individual.
4. The camera deployment method according to claim 2, characterized in that, The step of iterating the population based on the individual fitness and individual crowding of each individual until the maximum number of iterations is reached to obtain the optimal population includes: The current population is used as the parent population; Based on the individual fitness and individual crowding of each individual in the parent population, a non-dominated sort is performed on all individuals to obtain the non-dominated sorting result. Based on the non-dominated sorting results, dominant individuals are selected from the parent population, and crossover and mutation operations are performed on the dominant individuals to obtain the offspring population. The parent population and the offspring population are merged to obtain a new population; Based on the new population, the parent population is iteratively updated using an elite retention strategy, and the current iteration number is updated. If the current iteration count has not reached the maximum iteration count, then return to the step of performing a non-dominated sort on all individuals based on the individual fitness and individual crowding of each individual in the parent population, and obtaining the non-dominated sorting result, until the maximum iteration count is reached and the optimal population is obtained.
5. The camera deployment method according to claim 2, characterized in that, Any of the camera deployment schemes described above is obtained through the following steps: The link path mapping matrix is simplified using Gaussian elimination to obtain a simplified row echelon matrix. Based on the rank of the simplified row echelon matrix, a set of linearly independent links is selected from the simplified row echelon matrix as the base links; Based on the base link, the camera deployment scheme is determined.
6. The camera deployment method according to claim 1, characterized in that, The construction of the pedestrian walking path network for the area to be monitored includes: Determine each of the path nodes and each of the links in the area to be monitored; Based on each of the aforementioned path nodes and each of the aforementioned links, the pedestrian walking path network is constructed; The area to be monitored is divided into multiple sub-regions; each sub-region includes at least one of the links. An importance assessment is performed on each of the sub-regions to obtain a comprehensive weight for each sub-region; The link weight of each link is determined based on the comprehensive weight of each sub-region.
7. A camera deployment device, characterized in that, include: The network construction module is used to build a pedestrian walking path network for the area to be monitored. The pedestrian walking path network includes multiple path nodes and multiple links; The camera deployment module is used to generate a target camera deployment scheme for the area to be monitored by using a multi-objective genetic algorithm to solve the problem based on the pedestrian walking path network, camera parameter information and the link weight of each link. The multi-objective genetic algorithm aims to minimize the impact of camera failures and maximize the link weight of the target link, where the target link is the link in the target camera deployment scheme where cameras need to be deployed.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the camera deployment method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the camera deployment method as described in any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the camera deployment method as described in any one of claims 1 to 6.
