Algorithm configuration method, device, computer equipment and medium
Through the computing power polling processing of video analysis algorithms, the problem of insufficient utilization of computing power caused by strict binding between algorithms and devices in the prior art is solved, and the maximum video analysis scenario application within the maximum computing power range of hardware equipment is realized , improve resource utilization efficiency.
Patent Information
- Application Number
- CN202210147337.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-17
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-02-17
AI Technical Summary
In the prior art, algorithm types are strictly bound to equipment, resulting in the inability to fully utilize computing power and cannot dynamically meet business needs.
By obtaining the algorithm characteristics, demand indicators and number of scenarios of the video analysis algorithm in the monitoring area, and performing computing power polling processing, the output of the final computing power is less than or equal to the maximum computing power combination of the hardware equipment in different time periods.
It realizes the application of the maximum video analysis scenario within the final computing power range within each period, solves the problem that computing power can only run a single algorithm in traditional practice, and realizes computing power sharing and more efficient resource utilization.
Smart Images

Figure CN114630075B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video surveillance analysis, and in particular to an algorithm configuration method, device, computer equipment and medium. Background Art
[0002] With the development of artificial intelligence technology, video intelligent analysis technology has been increasingly used in the field of smart space. For example, in a typical smart community scenario, there are dozens of video intelligent analysis scenarios (such as high-altitude object throwing detection, electric vehicle entering elevator detection, etc.), which can improve the quality and efficiency of property management and enhance the quality of user services.
[0003] However, in the existing technical solutions, the algorithm type is strictly bound to the device (decoupling is not supported), that is, a specific camera or a specific edge server can only run one or several intelligent video analysis algorithms, which cannot dynamically meet the needs of actual business applications. In this case, when the business uses less algorithm, the computing power is idle and cannot be fully utilized. Summary of the invention
[0004] The embodiments of the present invention provide an algorithm configuration method, device, computer equipment and medium, which can solve the problem that computing power cannot be fully utilized during video intelligent analysis.
[0005] A first aspect of the present invention provides an algorithm configuration method, comprising:
[0006] Obtain algorithm characteristics of multiple video analysis algorithms configured in the monitoring area;
[0007] According to the algorithm characteristics of the video analysis algorithm, a plurality of demand indicators of the video analysis algorithm are obtained, wherein the demand indicators include the computing power required to run the video analysis algorithm, the time period during which the video analysis algorithm is actually run, and the number of scenes in which the video analysis algorithm is used;
[0008] Performing a computing power polling process on the required computing power, the actual operation time period, and the number of scenes corresponding to the multiple video analysis algorithms to output a computing power polling result;
[0009] The computing power polling result is displayed, wherein the computing power polling result is that the total computing power of all the video analysis algorithms used in the monitoring area in different time periods is less than or equal to the maximum computing power supported by the hardware device.
[0010] In a possible design, the computing power polling process includes:
[0011] The required computing power, actual operation time period and number of scenes corresponding to the multiple video analysis algorithms are arranged and combined in different time periods to obtain multiple groups of combinations satisfying that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device;
[0012] The multiple groups of combinations satisfying the requirement that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device are output as computing power polling results.
[0013] In a possible design, after obtaining multiple groups of combinations satisfying that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device, the method further includes:
[0014] When multiple combinations show that the total computing power of the video analysis algorithm in the same time period is less than or equal to the maximum computing power that the hardware device can support, the maximum value of the total computing power among each combination is selected. If the maximum value is the smallest, the combination corresponding to the smallest maximum value is selected as the optimal result for display.
[0015] In a possible design, after selecting the combination corresponding to the maximum value and the minimum value as the optimal result for display, the method further includes:
[0016] Outputting hardware configuration indication information of the monitoring area according to the optimal result, wherein the hardware configuration indication information is used to indicate adjustment of the hardware configuration used by the monitoring area.
[0017] In one possible design, the hardware configuration indication information is used to indicate adjustment of the number and / or position of video capture modules in the monitoring area.
[0018] A second aspect of the present invention provides an algorithm configuration device, comprising:
[0019] A first acquisition module is used to acquire algorithm characteristics of multiple video analysis algorithms configured in the monitoring area;
[0020] A second acquisition module is used to acquire a plurality of demand indicators of the video analysis algorithm according to the algorithm characteristics of the video analysis algorithm, wherein the demand indicators include the computing power required to run the video analysis algorithm, the time period during which the video analysis algorithm actually runs, and the number of scenes using the video analysis algorithm;
[0021] A processing module, used for performing a computing power polling process on the required computing power, the actual operation time period and the number of scenes corresponding to the multiple video analysis algorithms to output a computing power polling result;
[0022] A display module is used to display the computing power polling result, wherein the computing power polling result is that the total computing power of all the video analysis algorithms used in the monitoring area in different time periods is less than or equal to the maximum computing power that the hardware device can support.
[0023] In a possible design, the processing module is further used to arrange and combine the required computing power, actual operation time periods and number of scenes corresponding to the multiple video analysis algorithms in different time periods to obtain multiple groups of combinations that satisfy the requirement that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power that the hardware device can support;
[0024] The display module is also used to output the multiple groups of combinations that satisfy the requirement that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device as computing power polling results.
[0025] In a possible design, after obtaining multiple groups of combinations satisfying that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device, the processing module is further used to:
[0026] When there are multiple combinations showing that the total computing power of the video analysis algorithm in the same time period is less than or equal to the maximum computing power that the hardware device can support, the maximum value of the total computing power among each combination is selected. If the maximum value is the smallest, the combination corresponding to the smallest maximum value is selected as the optimal result to be displayed.
[0027] A third aspect of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned algorithm configuration method when executing the computer program.
[0028] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned algorithm configuration method are implemented.
[0029] The present invention calculates the computing power required by the video analysis algorithm, the time period in which the video analysis algorithm actually runs, and the number of scenarios in which the video analysis algorithm is used by acquiring algorithm characteristics of multiple video analysis algorithms, and performs computing power polling processing on the required computing power, actual running time period, and number of scenarios corresponding to the multiple video analysis algorithms, so that in different time periods, the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power that the hardware device can support.
[0030] That is to say, the present invention sets the operating environment of the video analysis algorithm to an edge server that can realize free scheduling of algorithms and video streams, so that the edge server can realize the most video analysis scenario applications while satisfying the maximum computing power that the total computing power in each time period is within the maximum computing power that the edge server can support. That is, one edge server can run other algorithms in parallel to realize computing power sharing, which solves the problem that the traditional approach strictly binds the algorithm type to the hardware device, resulting in the computing power in the hardware device can only run a single algorithm and cannot be configured on demand. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0032] Figure 1 is a flow chart of an algorithm configuration method in an embodiment of the present invention;
[0033] Figure 2 is a structural diagram of an algorithm configuration device in an embodiment of the present invention;
[0034] Figure 3 It is a structural schematic diagram of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] See also Figure 1 , an embodiment of the present invention proposes an algorithm configuration method, including but not limited to the following steps:
[0037] S10: Obtain algorithm characteristics of multiple video analysis algorithms configured in the monitoring area.
[0038] It should be noted that the algorithm characteristics include time characteristics, space characteristics, frequency characteristics, regular characteristics and complementary characteristics.
[0039] Specifically, taking the video analysis algorithm scenario of an elderly person falling as an example, the temporal characteristics of the algorithm are reflected in the fact that the video analysis algorithm is enabled when the door of the community elderly center is opened, and disabled after the door is closed;
[0040] Take the video analysis algorithm scenario of people staying as an example. For example, the spatial characteristics of the algorithm are reflected in the multiple entrances and exits of a community, and polling detection is performed;
[0041] Take the video analysis algorithm scenario of an overflowing trash can as an example. In daily use, the trash can will not be filled up in a short time. After the mall closes, no one stays in the venue and no garbage is thrown, that is, the scene of overflowing trash cans will no longer occur. Therefore, the scene of overflowing trash cans can be regarded as a low-frequency application. Through time-sharing access detection, for example, the algorithm is run at a certain frequency (such as every half an hour). At the same time, the algorithm is stopped after the mall closes. That is, the frequency characteristics of the algorithm are used to monitor whether the trash can is overflowing, so that the computing power corresponding to the algorithm can be retained and applied to the video analysis scenarios of other algorithms to avoid wasting computing resources.
[0042] Taking the video analysis algorithm scenario of electric vehicles entering elevators or transporting large items in elevators as an example, the rule characteristics of the algorithm are reflected in the property management monitoring of the fire control room, that is, the personnel polling playback and manual inspections complement each other, so that in the case of manual inspections, the operation of the intelligent analysis algorithm for the inspected video is stopped; in the absence of manual inspections, the intelligent analysis algorithm for the inspected video runs as usual.
[0043] S20: According to the algorithm characteristics of the video analysis algorithm, multiple demand indicators of the video analysis algorithm are obtained, and the demand indicators include the computing power required to run the video analysis algorithm, the time period in which the video analysis algorithm actually runs, and the number of scenarios using the video analysis algorithm.
[0044] For step S20, it is assumed that the computing power required to run the video analysis algorithm is A, the time period during which the video analysis algorithm actually runs is T, and the number of scenes using the video analysis algorithm is N.
[0045] For example, the computing power and scenarios corresponding to each time period in this embodiment are:
[0046] T1: A1, N1;
[0047] T2: A2, N2;
[0048] T3: A3, N3;
[0049] …
[0050] T24: A24, N24;
[0051] It should be noted that, for convenience, the above-listed records can be recorded as {(A1, T1, N1), (A2, T2, N2), ..., (An, Tn, Nn)}.
[0052] Specifically, the computing power A required to run the video analysis algorithm is related to the video stream / image resolution, video frame rate and the computational complexity of the algorithm. Among them, the video resolution and frame rate are basically fixed, so it is mainly the computational complexity of the algorithm that affects the size of the computing power A. The computational complexity is the number of calculations required by the model, reflecting the model's demand for hardware computing units. The overall computational complexity of the model is equal to the sum of the computational complexity of each operator in the model, and the computational complexity calculation methods of each operator are inconsistent (the evaluation methods of the computational complexity of different model algorithms are not the same).
[0053] The time period T during which the video analysis algorithm actually runs can be understood as the time that the algorithm needs to occupy computing power for calculation according to actual usage requirements.
[0054] For example, in the scenario where an elderly person falls, assuming that the business hours of the community elderly center are from 8:00 to 18:00 every day, the T corresponding to the algorithm is from 8:00 to 18:00 every day.
[0055] In the scenario of overflowing trash cans, assuming that the mall's business hours are from 10:00 to 22:00 every day, and the mall operator determines that the trash can overflow situation is only required once an hour based on business needs, then the T corresponding to this algorithm is within the first minute of every hour from 10:00 to 22:00 every day. Among them, the mall's business hours from 10:00 to 22:00 every day correspond to the time characteristics, and the first minute of every hour corresponds to the frequency characteristics.
[0056] It should be noted that the first minute listed here is an imaginary number and can be adjusted according to the actual situation of the algorithm. For example, if it takes 10 seconds to complete a detection, it can be set to the first 10 seconds of each hour.
[0057] For the number of scenes N, in this solution, N' corresponding to different time periods is less than or equal to N corresponding to the algorithm (for example, if the number of trash cans that need to be supervised in a community is 3, then the corresponding value of the number of scenes N is 3. In the T1 period, the number of trash cans may be 2, and in the T2 period, the number of trash cans may be 1; it is also possible that the number of trash cans in the T1 period is directly 3).
[0058] In addition, the number of scenes N can generally be understood as the number of video capture modules running the algorithm (such as the number of cameras). However, in some special scenarios, for example, the number of trash cans that need to be supervised in a community is 3, then the corresponding value of the number of scenes N is 3, but the number of cameras required can be 2, because one camera may just be able to monitor 2 trash cans in the area.
[0059] It should be noted that when obtaining the computing power A required for the video analysis algorithm, the time period T during which the video analysis algorithm actually runs, and the number N of scenarios in which the video analysis algorithm is used, it is necessary to simultaneously consider the multiple algorithm characteristics mentioned in the above steps.
[0060] S30: Perform computing power polling processing on the required computing power, actual operation time period and number of scenes corresponding to the multiple video analysis algorithms to output the computing power polling result.
[0061] S40: Display the computing power polling result, wherein the computing power polling result is that the total computing power of all the video analysis algorithms used in the monitoring area in different time periods is less than or equal to the maximum computing power supported by the hardware device.
[0062] For step S30 and step S40, specifically, for the video analysis algorithm of the present invention, its operating environment can be set to an edge server that can realize free scheduling of the algorithm and video stream, and the video stream resolution is 1080P. Among them, different video resolutions have a direct impact on the characteristics of the algorithm such as computing power.
[0063] Exemplarily, the computing power is combined and matched through the computing power polling model calculation, so that multiple video analysis scenario applications can be realized within a certain actual operating time period T, while the total computing power in each time period is within the range of the maximum computing power Cmax that the hardware device can support (that is, the maximum application of computing power).
[0064] For example, for {(A1, T1, N1), (A2, T2, N2), ..., (An, Tn, Nn)} obtained in step S20, the computing power polling model is used to calculate and combine the computing power to obtain a result similar to the following:
[0065] T1:A1*N1',A3*N3'...;
[0066] T2:A1*N1',A2*N2'...;
[0067] T3:A5*N5',A7*N7'...;
[0068] …
[0069] T24:A9*N9',A11*N11'...;
[0070] Among them, "T1: A1*N1', A3*N3'..." means:
[0071] During the T1 period, N1' A1 algorithms, N3' A3 algorithms, etc. can be run simultaneously.
[0072] The present invention calculates the computing power required by the video analysis algorithm, the time period in which the video analysis algorithm actually runs, and the number of scenarios in which the video analysis algorithm is used by acquiring algorithm characteristics of multiple video analysis algorithms, and performs computing power polling processing on the required computing power, actual running time period, and number of scenarios corresponding to the multiple video analysis algorithms, so that in different time periods, the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power that the hardware device can support.
[0073] That is to say, the present invention sets the operating environment of the video analysis algorithm to an edge server that can realize free scheduling of algorithms and video streams, so that the edge server can realize the most video analysis scenario applications while satisfying the maximum computing power that the total computing power in each time period is within the maximum computing power that the edge server can support. That is, one edge server can run other algorithms in parallel to realize computing power sharing, which solves the problem that the traditional approach strictly binds the algorithm type to the hardware device, resulting in the computing power in the hardware device can only run a single algorithm and cannot be configured on demand.
[0074] In one embodiment, step S30, i.e., the computing power polling process, specifically includes the following steps:
[0075] S31: Arrange and combine the required computing power, actual operation time periods and number of scenes corresponding to the multiple video analysis algorithms in different time periods to obtain multiple groups of combinations that satisfy the requirement that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device.
[0076] S32: Output the plurality of groups of combinations satisfying the requirement that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device as computing power polling results.
[0077] For steps S31 and S32, exemplarily, according to different computing requirements, the multiple groups {(A1, T1, N1), (A2, T2, N2), ..., (An, Tn, Nn)} calculated and obtained in step S20 are arranged and combined, that is, A, T, N are arranged and combined in different time periods, and multiple combinations that satisfy the requirement that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device are screened out.
[0078] Assume that there are 10 combinations Ct such that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device, and they are set as Ct1, Ct2, Ct3, Ct4, Ct5, Ct6, Ct7, Ct8, Ct9, and Ct10 respectively.
[0079] Each Ct actually includes T1, A1*N1', A3*N3'... described in step S40;
[0080] T2, A1*N1', A2*N2'...;
[0081] T3, A5*N5', A7*N7'...;
[0082] …
[0083] T24, A9*N9', A11*N11'...;
[0084] It should be noted that T1 to T24 can be set according to actual needs, such as allocation per hour, per minute or per second, etc. As long as different cameras and different algorithms can meet the actual usage requirements / business rules, and the total computing power in each time period is within the maximum computing power supported by the hardware device, it will be fine.
[0085] In one embodiment, in step S31, that is, after obtaining multiple groups of combinations satisfying that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device, the method further includes the following steps:
[0086] S33: When there are multiple combinations showing that the total computing power of the video analysis algorithm in the same time period is less than or equal to the maximum computing power that the hardware device can support, the maximum value of the total computing power in each combination is selected. If the maximum value is the smallest, the combination corresponding to the smallest maximum value is selected as the optimal result for display.
[0087] Exemplarily, since there are many combinations that satisfy the condition that the total computing power of the video analysis algorithm in the same time period is less than or equal to the maximum computing power that the hardware device can support, assuming that as described in steps S31 and S32, there are 10 combinations Ct that satisfy the condition that the total computing power of the video analysis algorithm in the same time period is less than or equal to the maximum computing power that the hardware device can support, calculate the maximum values of these 10 Cts respectively (for example, the maximum values of Ct1, Ct2, Ct3, Ct4, Ct5, Ct6, Ct7, Ct8, Ct9, and Ct10). When a certain maximum value is the minimum among the maximum values of these 10 Cts (assuming Ct3 is the smallest), then the maximum value is the optimal result, and the combination Ct3 corresponding to the maximum value is the optimal combination.
[0088] This embodiment, based on the above embodiment, selects the maximum value of the total computing power in each combination, analyzes and compares the selected maximum values, and when a certain maximum value is the smallest, the combination corresponding to the smallest maximum value is selected as the optimal result for display, so that the computing power can be maximized under the configured hardware equipment.
[0089] In one embodiment, in step S33, that is, after selecting the combination corresponding to the maximum value and the minimum value as the optimal result for display, the method further includes the following steps:
[0090] S34: Outputting hardware configuration indication information of the monitoring area according to the optimal result, wherein the hardware configuration indication information is used to indicate adjustment of the hardware configuration used in the monitoring area.
[0091] For step S34, assuming that the maximum value of Ct3 is the smallest, the hardware configuration indication information of the monitoring area is output according to the maximum value of Ct3, so that the operator can readjust the configuration of the hardware device according to the hardware configuration indication information, so that the difference between the maximum computing power C'max supported by the adjusted hardware device and the maximum value of Ct3 is reduced as much as possible, and it is ensured that the maximum computing power C'max supported by the adjusted hardware device is still greater than Ct3.
[0092] In one embodiment, in step S34, the hardware configuration indication information is used to indicate adjustment of the number and / or position of video capture modules in the monitoring area.
[0093] For example, the number of cameras may be changed, or the positions of cameras in a certain range may be offset.
[0094] In step S34, the maximum computing power Cmax that the hardware device can support is changed by adjusting the number and / or position of the video shooting modules in the hardware configuration, so that the adjusted C'max is as close to Ct3 as possible, that is, the maximum computing power Cmax that the hardware device can support is maximized, reducing the cost of building and operating the video shooting, and avoiding waste caused by excessive redundancy of computing power.
[0095] In one embodiment, an algorithm configuration device is provided, such as Figure 2 As shown, the algorithm configuration device includes a first acquisition module 101 , a second acquisition module 102 , a processing module 103 , and a display module 104 .
[0096] The detailed description of each functional module is as follows:
[0097] The first acquisition module 101 is used to acquire algorithm characteristics of multiple video analysis algorithms configured in the monitoring area;
[0098] A second acquisition module 102 is used to acquire multiple demand indicators of the video analysis algorithm according to the algorithm characteristics of the video analysis algorithm, wherein the demand indicators include the computing power required to run the video analysis algorithm, the time period during which the video analysis algorithm actually runs, and the number of scenes using the video analysis algorithm;
[0099] The processing module 103 is used to perform a computing power polling process on the required computing power, the actual operation time period and the number of scenes corresponding to the multiple video analysis algorithms to output a computing power polling result;
[0100] The display module 104 is used to display the computing power polling result, wherein the computing power polling result is that the total computing power of all the video analysis algorithms used in the monitoring area in different time periods is less than or equal to the maximum computing power supported by the hardware device.
[0101] In one embodiment, the processing module 103 is further configured to:
[0102] The required computing power, actual operation time period and number of scenes corresponding to the multiple video analysis algorithms are arranged and combined in different time periods to obtain multiple groups of combinations satisfying that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device;
[0103] The display module 104 is further specifically used for:
[0104] The multiple groups of combinations satisfying the requirement that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device are output as computing power polling results.
[0105] In one embodiment, after obtaining multiple groups of combinations satisfying that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device, the processing module 103 is further specifically used to:
[0106] When there are multiple combinations showing that the total computing power of the video analysis algorithm in the same time period is less than or equal to the maximum computing power that the hardware device can support, the maximum value of the total computing power among each combination is selected. If the maximum value is the smallest, the combination corresponding to the smallest maximum value is selected as the optimal result to be displayed.
[0107] In one embodiment, after selecting the combination corresponding to the maximum value and the minimum value as the optimal result for display, the processing module 103 is further configured to:
[0108] Outputting hardware configuration indication information of the monitoring area according to the optimal result, wherein the hardware configuration indication information is used to indicate adjustment of the hardware configuration used by the monitoring area.
[0109] For the specific definition of the algorithm configuration device, please refer to the definition of the algorithm configuration method above, which will not be repeated here. Each module in the above algorithm configuration device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0110] In one embodiment, a computer device is provided, the internal structure diagram of which can be as follows: Figure 3 As shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. When the computer program is executed by the processor, an algorithm configuration method can be implemented.
[0111] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0112] Obtain algorithm characteristics of multiple video analysis algorithms configured in the monitoring area;
[0113] According to the algorithm characteristics of the video analysis algorithm, a plurality of demand indicators of the video analysis algorithm are obtained, wherein the demand indicators include the computing power required to run the video analysis algorithm, the time period during which the video analysis algorithm is actually run, and the number of scenes in which the video analysis algorithm is used;
[0114] Performing a computing power polling process on the required computing power, the actual operation time period, and the number of scenes corresponding to the multiple video analysis algorithms to output a computing power polling result;
[0115] The computing power polling result is displayed, wherein the computing power polling result is that the total computing power of all the video analysis algorithms used in the monitoring area in different time periods is less than or equal to the maximum computing power supported by the hardware device.
[0116] Optionally, when the processor executes the computer program, the processor further specifically implements the following steps:
[0117] The required computing power, actual operation time period and number of scenes corresponding to the multiple video analysis algorithms are arranged and combined in different time periods to obtain multiple groups of combinations satisfying that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device;
[0118] The multiple groups of combinations satisfying the requirement that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device are output as computing power polling results.
[0119] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0120] Obtain algorithm characteristics of multiple video analysis algorithms configured in the monitoring area;
[0121] According to the algorithm characteristics of the video analysis algorithm, a plurality of demand indicators of the video analysis algorithm are obtained, wherein the demand indicators include the computing power required to run the video analysis algorithm, the time period during which the video analysis algorithm is actually run, and the number of scenes in which the video analysis algorithm is used;
[0122] Performing a computing power polling process on the required computing power, the actual operation time period, and the number of scenes corresponding to the multiple video analysis algorithms to output a computing power polling result;
[0123] The computing power polling result is displayed, wherein the computing power polling result is that the total computing power of all the video analysis algorithms used in the monitoring area in different time periods is less than or equal to the maximum computing power supported by the hardware device.
[0124] Preferably, when the computer program is executed by the processor, the following steps are further implemented:
[0125] The required computing power, actual operation time period and number of scenes corresponding to the multiple video analysis algorithms are arranged and combined in different time periods to obtain multiple groups of combinations satisfying that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device;
[0126] The multiple groups of combinations satisfying the requirement that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device are output as computing power polling results.
[0127] It should be noted that the specific description of the above computer device and computer storage medium can refer to the above-mentioned description of the algorithm configuration method, which will not be repeated here.
[0128] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0129] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0130] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. An algorithm configuration method, characterized in that: include: Obtain algorithm characteristics of multiple video analysis algorithms configured in the monitoring area; According to the algorithm characteristics of the video analysis algorithm, a plurality of demand indicators of the video analysis algorithm are obtained, wherein the demand indicators include the computing power required to run the video analysis algorithm, the time period during which the video analysis algorithm is actually run, and the number of scenes in which the video analysis algorithm is used; Performing a computing power polling process on the required computing power, the actual operation time period, and the number of scenes corresponding to the multiple video analysis algorithms to output a computing power polling result; Display the computing power polling result, wherein the computing power polling result is that the total computing power of all the video analysis algorithms used in the monitoring area in different time periods is less than or equal to the maximum computing power supported by the hardware device; The computing power polling process includes: The required computing power, actual operation time period and number of scenes corresponding to the multiple video analysis algorithms are arranged and combined in different time periods to obtain multiple groups of combinations satisfying that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device; The multiple groups of combinations satisfying the requirement that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device are output as computing power polling results.
2. The algorithm configuration method according to claim 1, characterized in that: After obtaining multiple groups of combinations satisfying that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power that the hardware device can support, the method further includes: When multiple combinations show that the total computing power of the video analysis algorithm in the same time period is less than or equal to the maximum computing power that the hardware device can support, the maximum value of the total computing power among each combination is selected. If the maximum value is the smallest, the combination corresponding to the smallest maximum value is selected as the optimal result for display.
3. The algorithm configuration method according to claim 2, characterized in that: After selecting the combination corresponding to the maximum value and the minimum value as the optimal result for display, the method further comprises: Outputting hardware configuration indication information of the monitoring area according to the optimal result, wherein the hardware configuration indication information is used to indicate adjustment of the hardware configuration used by the monitoring area.
4. The algorithm configuration method according to claim 3, characterized in that: The hardware configuration indication information is used to indicate the adjustment of the number and / or position of the video shooting modules in the monitoring area.
5. An algorithm configuration device, characterized in that: include: A first acquisition module is used to acquire algorithm characteristics of multiple video analysis algorithms configured in the monitoring area; A second acquisition module is used to acquire a plurality of demand indicators of the video analysis algorithm according to the algorithm characteristics of the video analysis algorithm, wherein the demand indicators include the computing power required to run the video analysis algorithm, the time period during which the video analysis algorithm actually runs, and the number of scenes using the video analysis algorithm; A processing module, used for performing a computing power polling process on the required computing power, the actual operation time period and the number of scenes corresponding to the multiple video analysis algorithms to output a computing power polling result; A display module, used to display the computing power polling result, wherein the computing power polling result is that the total computing power of all the video analysis algorithms used in the monitoring area in different time periods is less than or equal to the maximum computing power supported by the hardware device; The processing module is further used to arrange and combine the required computing power, actual operation time period and number of scenes corresponding to the multiple video analysis algorithms in different time periods to obtain multiple groups of combinations that satisfy the requirement that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power that the hardware device can support; The display module is also used to output the multiple groups of combinations that satisfy the requirement that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device as computing power polling results.
6. The algorithm configuration device according to claim 5, characterized in that: After obtaining multiple groups of combinations satisfying that the total computing power of all the video analysis algorithms used in the monitoring area is less than or equal to the maximum computing power supported by the hardware device, the processing module is further used to: When multiple combinations show that the total computing power of the video analysis algorithm in the same time period is less than or equal to the maximum computing power that the hardware device can support, the maximum value of the total computing power among each combination is selected. If the maximum value is the smallest, the combination corresponding to the smallest maximum value is selected as the optimal result for display.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the algorithm configuration method according to any one of claims 1 to 4 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the algorithm configuration method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Abnormal scene monitoring method and device, computer equipment and storage medium
CN113420601A
Computing power resource allocation method and device and mobile edge computing integrated equipment
CN113946437A