Method, device, equipment and medium based on video scene matching algorithm
By extracting the targets in the video screen in the video surveillance system and identifying their correlation and maturity with the preset algorithm knowledge base, we will automatically match the intelligent algorithm in video surveillance, which solves the problem of the inability to automatically match the intelligent algorithm in the existing technology. The problem is to realize the automated processing and early warning functions of video surveillance.
Patent Information
- Application Number
- CN202111165045.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-09-30
AI Technical Summary
In the existing technology, intelligent algorithms cannot be automatically matched for processing in video surveillance, resulting in staff needing to perform cumbersome video picture algorithm configuration, which increases the workload and is not conducive to the popularization and application of intelligent algorithms.
By obtaining the video screen of the current monitoring video, extracting the target and identifying it, obtaining the correlation and maturity between the target and the algorithm in the preset algorithm knowledge base, and determining the recommended weight between each target and the algorithm based on this information. Select the top-ranked algorithm as the matching algorithm for the current surveillance video.
It realizes the automatic matching of appropriate intelligent algorithms according to the current video scene in video surveillance, avoids the tedious process of video picture algorithm configuration, greatly reduces the workload of staff, and supports video surveillance to achieve automatic early warning according to different monitoring images.
Smart Images

Figure CN113920460B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video surveillance technology, and in particular to a method, device, equipment and medium based on a video scene matching algorithm. Background Art
[0002] Video surveillance includes video surveillance devices, controllers, monitors and recorders. Video surveillance devices are usually installed in urban main roads, buildings, rivers, shopping malls, homes and other places. Video images of specific outdoor areas are obtained through camera modules and transmitted to the controller of the video surveillance system. The controller converts the video images into video signals and distributes the video signals to the monitors and recorders. The monitors present the video images and the recorders store the video signals.
[0003] However, traditional video surveillance, on the one hand, requires staff to judge the monitored video images in order to eliminate warnings; on the other hand, even if the video analysis function of the video surveillance itself is used, staff are required to screen and judge the current monitored images, that is, staff are required to have technical development capabilities (detection rules, rule configuration, configuration effects, code implantation, etc.), therefore, it is not conducive to the popularization and application of intelligent algorithms in video surveillance. Summary of the invention
[0004] In view of the shortcomings of the prior art described above, the purpose of the present application is to provide a method, device, equipment and medium based on a video scene matching algorithm, which is used to solve the problem in the prior art video surveillance that it is impossible to automatically match the intelligent algorithm according to the scene in the current video surveillance.
[0005] Get the video screen of the current surveillance video;
[0006] Extracting objects in the video picture, and identifying the objects to obtain an object set of the current picture scene;
[0007] Obtaining the degree of association between each target in the target set and each algorithm in a preset algorithm knowledge base and the maturity of each algorithm;
[0008] Determine a recommendation weight between each goal and each algorithm according to the relevance and maturity;
[0009] According to the recommendation weight corresponding to each target in the current picture scene, the algorithm corresponding to the recommendation weight with a high ranking is selected as the matching algorithm of the current monitoring video.
[0010] In certain embodiments, further comprising:
[0011] Extracting a target in the video picture of the current frame by using a target detection algorithm, wherein the target is at least one;
[0012] Extracting target features corresponding to the target, comparing the extracted target features one by one in the target sample library, and obtaining the recognition result of the current target;
[0013] The recognition results corresponding to each target in the video picture of the current frame are expressed in the form of a data set to form a target set of the current picture scene.
[0014] In certain embodiments, further comprising:
[0015] Obtaining a first matching number between a current target in the target set and a current algorithm in a preset algorithm knowledge base;
[0016] Obtain the total number of first matches between the current target and each algorithm in the algorithm knowledge base;
[0017] Determining the degree of association between the current target and the current algorithm in the preset algorithm knowledge base according to the ratio between the first matching number and the first total matching number;
[0018] Obtaining the total number of second matches between the current algorithm and each target in the target set;
[0019] Obtaining the total number of third matches between each target in the target set and each algorithm in a preset algorithm knowledge base;
[0020] The maturity of the current algorithm is determined according to the ratio of the second total number of matches to the third total number of matches.
[0021] In certain embodiments, further comprising:
[0022] Obtaining a first product of a correlation degree between a current target and a current algorithm in a preset algorithm knowledge base and a preset target correlation coefficient;
[0023] Obtaining a second product between the maturity of the current algorithm and a preset algorithm maturity coefficient;
[0024] According to the sum of the first product and the second product, each algorithm is traversed to determine a recommendation weight between the current target and each algorithm in a preset algorithm knowledge base.
[0025] In certain embodiments, further comprising:
[0026] Determine the correspondence between the target and the algorithm according to the correlation between the current target and each algorithm in the preset algorithm knowledge base; wherein, if the correlation is less than a preset threshold, there is no correspondence between the target and the algorithm;
[0027] Determine the recommendation weight corresponding to each target of the current scene according to the corresponding relationship between the target and the algorithm;
[0028] An algorithm corresponding to a recommended weight with a high ranking is selected, and the algorithm is used as a matching algorithm for the current surveillance video.
[0029] In certain embodiments, further comprising:
[0030] According to the matching algorithm corresponding to the target in the current picture scene; the matching algorithm corresponding to the target is synchronized to the algorithm warehouse service according to the algorithm configuration rules, and the matching algorithm is loaded using the algorithm configuration rules to perform intelligent analysis on the current picture scene to generate corresponding warning information.
[0031] In certain embodiments, further comprising:
[0032] Extracting image frames of the surveillance video;
[0033] Analyze the current image frame to obtain the target state and attribute information of the target, and generate the on-screen display information of the target according to the target state, attribute information and matching algorithm;
[0034] Embedding a data frame containing the target on-screen display information into a video stream;
[0035] The on-screen display data frame is parsed to obtain the tracking frame position, size, attribute information and matching algorithm of the target and displayed on the front end.
[0036] Another object of the present application is to provide a device based on a video scene matching algorithm, comprising:
[0037] The first acquisition module is used to acquire the video image of the current monitoring video;
[0038] A target set generation module is used to extract targets in the video picture and identify the targets to obtain a target set of the current picture scene;
[0039] A second acquisition module is used to acquire the correlation between each target in the target set and each algorithm in a preset algorithm knowledge base and the maturity of each algorithm;
[0040] A recommendation weight determination module, used to determine the recommendation weight between each target and each algorithm according to the association degree and maturity;
[0041] The algorithm matching module is used to select the algorithm corresponding to the recommended weight ranked high as the matching algorithm of the current monitoring video according to the recommended weight corresponding to each target in the current picture scene.
[0042] Another object of the present application is to provide an electronic device, comprising:
[0043] one or more processing devices;
[0044] A memory is used to store one or more programs; when the one or more programs are executed by the one or more processing devices, the one or more processing devices execute the method based on the video scene matching algorithm.
[0045] Another object of the present application is to provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is used to enable the computer to execute the method based on the video scene matching algorithm.
[0046] As described above, the method, apparatus, device and medium based on the video scene matching algorithm of the present application have the following beneficial effects:
[0047] The present application obtains the correlation between each target in the target set and each algorithm in a preset algorithm knowledge base and the maturity of each algorithm; determines the recommendation weight between each target and each algorithm according to the correlation and maturity; selects the algorithm corresponding to the top-ranked recommendation weight according to the recommendation weight corresponding to each target in the current picture scene as the matching algorithm for the current monitoring video, which can automatically match the algorithm according to the target corresponding to the current video scene, avoids cumbersome video picture algorithm configuration, greatly reduces the workload of the staff, and is conducive to video monitoring to realize automatic early warning according to different monitoring pictures. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 Shown is a method flow chart based on a video scene matching algorithm provided by the present application;
[0049] Figure 2 Shown is a flowchart of determining the degree of association in a method based on a video scene matching algorithm provided by the present application;
[0050] Figure 3 Shown is a flow chart of maturity determination in a method based on a video scene matching algorithm provided by the present application;
[0051] Figure 4 Shown is a flow chart of determining recommendation weights in a method based on a video scene matching algorithm provided by the present application;
[0052] Figure 5 Shown is a structural block diagram of a device based on a video scene matching algorithm provided by the present application;
[0053] Figure 6 Shown is a schematic diagram of the structure of an electronic device provided by this application;
[0054] Figure 7Displays a video algorithm matching business process diagram provided by this application;
[0055] Figure 8 Shown is a schematic diagram of the algorithm knowledge base structure provided by this application. DETAILED DESCRIPTION
[0056] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0057] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0058] See also Figure 1 , is a flow chart of a method based on a video scene matching algorithm provided in this application, including:
[0059] Step S101, obtaining the video image of the current surveillance video;
[0060] Specifically, the monitoring screen can be collected through a video monitoring device, and the corresponding monitoring video can also be called using a third data platform or server.
[0061] Step S102, extracting objects in the video picture, and identifying the objects to obtain an object set of the current picture scene;
[0062] Specifically, the extracted target can be one or more; each target is identified in turn according to the number of targets in the picture, and then the category of each target is identified. For example, the identified targets include but are not limited to people, cars, gates, elevators, motor vehicle lanes, rivers, etc., which are not limited here.
[0063] Step S103, obtaining the correlation between each target in the target set and each algorithm in the preset algorithm knowledge base and the maturity of each algorithm;
[0064] It should be noted that each time an algorithm in the algorithm knowledge base is matched, the number of matches between the algorithm and the target increases once. By continuously accumulating and updating each algorithm in the algorithm knowledge base, the algorithm matching efficiency of the algorithm knowledge base can be effectively improved.
[0065] Step S104, determining the recommendation weight between each target and each algorithm according to the relevance and maturity;
[0066] Specifically, during initialization, since it is impossible to refer to the matching relationship between the targets in the target set and the algorithms in the algorithm knowledge base, that is, the correlation is weak, the preset correlation coefficient will be smaller, and it is necessary to rely on the maturity of each algorithm. On the contrary, the corresponding preset maturity coefficient will be larger, and the sum of the correlation coefficient and the maturity coefficient is equal to 1. With the application of the algorithm knowledge base, the correlation coefficient and the maturity coefficient can be reset according to needs.
[0067] Step S105 , according to the recommendation weight corresponding to each target in the current picture scene, an algorithm corresponding to the recommendation weight with a high ranking is selected as a matching algorithm for the current monitoring video.
[0068] Specifically, by selecting the recommended TOPN algorithm, an algorithm with a higher recommendation weight is selected as the matching algorithm for the current target of the current monitoring video.
[0069] Through the above method, by recommending the matching algorithm corresponding to each target in the current picture scene to the user, the cumbersome video picture algorithm configuration is avoided, the workload of the staff is greatly reduced, and it is conducive to the automatic early warning of video surveillance according to different monitoring pictures.
[0070] In some embodiments, the process of step S102 is described in detail as follows:
[0071] Extracting a target in the video picture of the current frame by using a target detection algorithm, wherein the target is at least one;
[0072] The acquired surveillance video is decoded to obtain each frame of the video, and the target detection algorithm is used to analyze each current frame of the video to obtain the target of each current frame of the video. The target detection algorithm includes but is not limited to (single-stage algorithm, YOLO, SSD) and (double-stage algorithm, RCNN, SPP-net, Fast-RCNN, VGG, GoogLeNet, ResNet) based on convolutional neural networks.
[0073] Extracting target features corresponding to the target, comparing the extracted target features one by one in the target sample library, and obtaining the recognition result of the current target;
[0074] Among them, the target feature corresponding to the target is extracted, and the target feature is compared with the corresponding target sample library one by one. When the comparison result reaches a preset threshold (similarity), the target recognition result of the target feature is determined.
[0075] The recognition results corresponding to the various targets in the current video screen are expressed in the form of a data set to form a target set of the current screen scene.
[0076] It should be noted that the target recognition results corresponding to the multiple targets in the picture are constructed in the form of a data set to form a target set of the current picture scene; for example, {river, house, shore, person}.
[0077] In certain embodiments, see Figure 2 , a flowchart of determining the relevance in a method based on a video scene matching algorithm provided in this application is described in detail as follows:
[0078] Step S201, obtaining a first matching number between a current target in the target set and a current algorithm in a preset algorithm knowledge base;
[0079] Step S202, obtaining the total number of first matches between the current target and each algorithm in the algorithm knowledge base;
[0080] Step S203, determining the degree of association between the current target and the current algorithm in the preset algorithm knowledge base according to the ratio of the first matching number to the first total matching number;
[0081] See also Figure 3 , is a flowchart of maturity determination in a method based on a video scene matching algorithm provided by this application, which is described in detail as follows:
[0082] Step S301, obtaining the total number of second matches between the current algorithm and each target in the target set;
[0083] Step S302, obtaining the total number of third matches between each target in the target set and each algorithm in the preset algorithm knowledge base;
[0084] Step S303: Determine the maturity of the current algorithm according to the ratio of the second total number of matches to the third total number of matches.
[0085] In this embodiment, formula (1) is used to obtain the correlation between each target in the target set and each algorithm in the preset algorithm knowledge base;
[0086]
[0087] Formula (2) is used to obtain the current maturity of each algorithm;
[0088]
[0089] In formula (1) and formula (2), W i,j is the number of target algorithm matches, the number of hit matches between target j and algorithm i; Si,j is the target algorithm association, indicating W i,j The ratio of the number of hits of target i to other algorithms is in the range of 0 to 1; T i It is the maturity of the algorithm itself, indicating the number of matching hits of algorithm i and the proportion of the number of matching hits of all algorithms, indicating the maturity of the algorithm. The more times it is recommended to match, the more mature the algorithm is. The value range is 0 to 1.
[0090] Table 1 W i,j is the number of historical matches between target j and algorithm i. The number of matches increases by 1 for each match.
[0091]
[0092] Through the above method, the correlation between each target in the target set and each algorithm in the preset algorithm knowledge base and the maturity of each algorithm can be accurately obtained.
[0093] In certain embodiments, see Figure 4 , which is a flowchart of determining a recommendation weight in a method based on a video scene matching algorithm provided by the present application, and also includes:
[0094] Step S401, obtaining a first product of a correlation degree between a current target and a current algorithm in a preset algorithm knowledge base and a preset target correlation coefficient;
[0095] Step S402, obtaining a second product between the maturity of the current algorithm and a preset algorithm maturity coefficient;
[0096] Step S403, according to the sum of the first product and the second product, traverse each algorithm to determine the recommendation weight between the current target and each algorithm in the preset algorithm knowledge base.
[0097] Specifically, the recommendation weight between target j and algorithm i is calculated using formula (3);
[0098] V i,j =S i,j *P+T i *Q (3)
[0099] In formula (3), V i,j is the recommendation weight of the target algorithm, indicating the recommendation weight of target j and algorithm i. The higher the weight, the higher the recommendation ranking. P is the target association coefficient, indicating the recommendation coefficient of the algorithm adapted to the target. Q is the algorithm maturity coefficient, indicating the algorithm recommendation coefficient. P+Q=1.
[0100] The recommendation weight indicates the recommendation possibility of target j and algorithm i, and the value range is between 0 and 2; P is the target association coefficient, which is initially set to 0.7; Q is the algorithm maturity coefficient, which is initially set to 0.3.
[0101] Table 2 shows the recommended weights between the objectives and the algorithms.
[0102] V Goal\Algorithm Algorithm 1 Algorithm 2 Algorithm 3 Algorithm 4 Algorithm 5 Algorithm 6 Algorithm i Target 0 1.1 1.7 0.9 0.6 0.1 0
[0103] The more times the target matches the algorithm in history, the more likely it is to be recommended next time. This situation accounts for the largest proportion (for example, 70%). If some algorithms are used frequently, it means that the algorithm is more mature and will be recommended to a large extent, but the proportion is lower than the former (for example, 30%), which means that the algorithm is not mature and will not be recommended to a large extent.
[0104] Through the above method, the algorithm corresponding to the recommended weight with the highest ranking is selected as the matching algorithm of the current monitoring video according to the recommended weight corresponding to each target in the current picture scene. The algorithm can be automatically matched according to the target corresponding to the current video scene. Compared with the traditional solution of manually setting rules for each video, the workload of the staff is greatly reduced, the cumbersome video picture algorithm configuration is avoided, and a method of algorithm recommendation that provides configuration-free operation is gradually formed.
[0105] In some other embodiments, step S105 further includes:
[0106] The correspondence between the target and the algorithm is determined according to the correlation between the current target and each algorithm in the preset algorithm knowledge base; wherein, if the correlation is less than a preset threshold, there is no correspondence between the target and the algorithm; if the correlation is not less than the preset threshold, there is a correspondence between the target and the algorithm, and the target and the corresponding algorithm can also be connected in a continuous manner.
[0107] Determine the recommendation weight corresponding to each target of the current scene according to the corresponding relationship between the target and the algorithm;
[0108] It should be noted that if it is determined that there is a corresponding relationship between the target and the algorithm, the recommendation weight between the target and the algorithm is determined; if it is determined that there is no corresponding relationship between the target and the algorithm, there is no need to determine the recommendation weight between the target and the algorithm; in this way, not only the workload of the algorithm matching processing can be effectively reduced, but also the calculation efficiency of the recommendation weight can be improved.
[0109] An algorithm corresponding to a recommended weight with a high ranking is selected, and the algorithm is used as a matching algorithm for the current surveillance video.
[0110] Using the TOPN recommendation algorithm to select the algorithm corresponding to the top-ranked recommendation weight can intuitively and effectively display the matching algorithm of the current surveillance video.
[0111] Specifically, see Figure 8 , a schematic diagram of the algorithm knowledge base structure provided by the present application, which includes two important factors: connection and weight value; wherein, the connection, indicates that this algorithm can be applied to the target scene and there is a correlation; the recommended weight V i,j >0; The weight value on the line indicates the recommended weight of the objects at both ends of the target and the algorithm. The larger the value, the higher the recommendation. According to Table 2, the order of algorithms that can be recommended for target j is: algorithm 3, algorithm 2, algorithm 4, algorithm 5, algorithm 6. According to the target j corresponding to the current actual scenario, the top 3 with the highest recommendation weight are selected in order: algorithm 3, algorithm 2, algorithm 4.
[0112] See Figure 7 , which is a video algorithm matching business process diagram provided by this application, including:
[0113] Install the camera equipment according to the specifications to ensure that it can monitor certain picture scenes; the code stream access module accesses the video stream from the camera device, and decodes the video through the video stream processing module, and then detects the target in each frame, and extracts the features of the target after acquiring the target; at the same time, prepare a certain number of target sample libraries to compare the extracted targets with the sample libraries, and match them one by one to identify the correct targets.
[0114] According to the matching algorithm corresponding to the target in the current picture scene; the matching algorithm corresponding to the target is synchronized to the algorithm warehouse service according to the algorithm configuration rules, and the matching algorithm is loaded using the algorithm configuration rules to perform intelligent analysis on the current picture scene to generate corresponding warning information.
[0115] For video footage of river scenes, targets such as the water surface, shore, and buoys are extracted through video stream analysis, and then compared with the sample library to match and identify these targets.
[0116] 1) For the identified "water surface" target: the algorithm knowledge base can provide a recommendation of intelligent algorithms such as swimming warning, falling into water warning, floating object warning, etc. according to the weight, and automatically mark the water surface area. Each time a recommendation is made, the number of matches corresponding to the warning algorithm is increased by 1, and the algorithm knowledge base is updated.
[0117] 2) For the identified "shore" targets: the algorithm knowledge base can provide intelligent algorithm recommendations such as shore fishing warnings and shore personnel activities, and mark the shore area. Each time a recommendation is made, the number of matches is increased by 1, and the algorithm knowledge base is updated.
[0118] 3) For the identified "surface buoy" target: the algorithm knowledge base can provide intelligent algorithm recommendations such as high tide warning and low tide warning, and mark the buoy position. Each time a recommendation is made, the number of matches corresponding to the warning algorithm is increased by 1, and the algorithm knowledge base is updated.
[0119] The user can use the video screen to check whether to enable the recommended algorithm for the target area marked with the above mark (overlay video OSD), accompanied by the corresponding algorithm recommendation prompt. The user does not need to worry about the complicated operations of how to configure the rules and how to detect. Once confirmed to start, the backend can execute the analysis capabilities of the corresponding algorithm and provide early warning services.
[0120] Every matching operation of the user will generate an operation record and save it in the algorithm knowledge base.
[0121] For example, for a video image of a factory or room, after the video stream is connected, the video stream processing module analyzes and identifies the existence of a "gate" frame. The algorithm knowledge base can match it with prompts and recommendations for personnel entry and exit warnings and personnel statistics algorithms. After the user starts this recommendation algorithm, the backend can execute the corresponding algorithm analysis capabilities and provide corresponding warning services.
[0122] In certain embodiments, see Figure 7 The OSD overlay annotation also includes:
[0123] Extracting image frames of the surveillance video;
[0124] Specifically, the surveillance video can be an image captured by a camera in a public area or an image collected by a camera in a specific place; the surveillance video is intercepted to obtain image frames, and the image frames are preprocessed, for example, the size of the image frames is determined according to the image size required by the algorithm, and the format and frame rate of the image frames are changed to meet the requirements of the algorithm.
[0125] Analyze the current image frame to obtain the target state and attribute information of the target, and generate the on-screen display information of the target according to the target state, attribute information and matching algorithm;
[0126] Specifically, the video stream frame rate is the video frame rate, and the target may be a moving target, such as a person, a car, a drone, etc.
[0127] Embedding a data frame containing the target on-screen display information into a video stream;
[0128] Among them, the data frame structure includes the scene graph, tracking frame and target attributes of the target, and the scene graph, tracking frame, matching algorithm and target attributes of the target are encapsulated into a private data frame, and the data frame is embedded into the video stream (video code stream) through encoding, so that the frame rate of the OSD (on screen display) information processed by the algorithm in the video stream is the same as the frame rate of the video stream.
[0129] The on-screen display data frame is parsed to obtain the tracking frame position, size, attribute information and matching algorithm of the target, which are displayed on the front end (compatible with terminals of different operating systems, browsers and resolutions).
[0130] Optionally, when it is detected that the image processing frame rate is lower than the video stream frame rate, a time-weighted filter is used to perform an interpolation operation on the on-screen display information of the target to complete the missing on-screen display information of the target in the image frame. The on-screen display information includes the tracking box position, size, attribute information and matching algorithm of the target.
[0131] Specifically, interpolation operation is performed based on the previous on-screen display information of the target to predict the tracking frame position, size and attribute information of the target in the current image frame, thereby completing the missing on-screen display information of the target in the image frame.
[0132] In this embodiment, when it is detected that the algorithm frame rate is less than the video stream frame rate, the on-screen display information of the target is interpolated using a time-weighted filter to complete the missing on-screen display information of the target in the image frame; the refresh frequency of the on-screen display information is increased to be the same as the video stream frame rate, thereby overcoming the flickering and unsmoothness problems caused by the display of superimposed characters (attribute information) and graphics (tracking boxes).
[0133] See also Figure 5 , is a structural block diagram of a device based on a video scene matching algorithm provided by this application; comprising:
[0134] The first acquisition module 501 is used to acquire the video image of the current monitoring video;
[0135] The target set generation module 502 is used to extract the target in the video picture and identify the target to obtain the target set of the current picture scene;
[0136] wherein, a target detection algorithm is used to extract a target in the video picture of the current frame, wherein the target is at least one;
[0137] Extracting target features corresponding to the target, comparing the extracted target features one by one in the target sample library, and obtaining the recognition result of the current target;
[0138] The recognition results corresponding to the various targets in the current video screen are expressed in the form of a data set to form a target set of the current screen scene.
[0139] The second acquisition module 503 is used to acquire the correlation between each target in the target set and each algorithm in the preset algorithm knowledge base and the maturity of each algorithm;
[0140] wherein, obtaining a first matching number between a current target in the target set and a current algorithm in a preset algorithm knowledge base;
[0141] Obtaining the total number of first matches between the current target and each algorithm in the algorithm knowledge base;
[0142] Determining the degree of association between the current target and the current algorithm in the preset algorithm knowledge base according to the ratio of the first matching number to the first total matching number;
[0143] Specifically, obtaining the total number of second matches between the current algorithm and each target in the target set;
[0144] Obtaining the total number of third matches between each target in the target set and each algorithm in a preset algorithm knowledge base;
[0145] The maturity of the current algorithm is determined according to the ratio of the second total number of matches to the third total number of matches.
[0146] A recommendation weight determination module 504, used to determine the recommendation weight between each target and each algorithm according to the association degree and maturity;
[0147] Wherein, a first product of a correlation degree between a current target and a current algorithm in a preset algorithm knowledge base and a preset target correlation coefficient is obtained;
[0148] Obtaining a second product between the maturity of the current algorithm and a preset algorithm maturity coefficient;
[0149] According to the sum of the first product and the second product, traverse each algorithm to determine the recommendation weight between the current target and each algorithm in the preset algorithm knowledge base
[0150] The algorithm matching module 505 is used to select the algorithm corresponding to the recommended weight with the highest ranking as the matching algorithm of the current monitoring video according to the recommended weight corresponding to each target in the current picture scene.
[0151] Wherein, the correspondence between the target and the algorithm is determined according to the correlation between the current target and each algorithm in the preset algorithm knowledge base; wherein, if the correlation is less than a preset threshold value, there is no correspondence between the target and the algorithm;
[0152] Determine the recommendation weight corresponding to each target of the current scene according to the corresponding relationship between the target and the algorithm;
[0153] An algorithm corresponding to a recommended weight with a high ranking is selected, and the algorithm is used as a matching algorithm for the current surveillance video.
[0154] In certain embodiments, further comprising:
[0155] According to the matching algorithm corresponding to the target in the current picture scene; the matching algorithm corresponding to the target is synchronized to the algorithm warehouse service according to the algorithm configuration rules, and the matching algorithm is loaded using the algorithm configuration rules to perform intelligent analysis on the current picture scene to generate corresponding warning information.
[0156] In certain embodiments, further comprising:
[0157] Extracting image frames of the surveillance video;
[0158] Analyze the current image frame to obtain the target state and attribute information of the target, and generate the on-screen display information of the target according to the target state, attribute information and matching algorithm;
[0159] Embedding a data frame containing the target on-screen display information into a video stream;
[0160] The on-screen display data frame is parsed to obtain the tracking frame position, size, attribute information and matching algorithm of the target and displayed on the front end.
[0161] Among them, it should be noted that the device based on the video scene matching algorithm and the method based on the video scene matching algorithm are in a one-to-one correspondence. Here, the technical details and technical effects involved in each module and the above-mentioned process steps are the same, and there is no need to elaborate on them one by one. Please refer to the above-mentioned method based on the video scene matching algorithm.
[0162] Reference below Figure 6 , which shows a structural schematic diagram of an electronic device (such as a terminal device or a server 600) suitable for implementing an embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0163] like Figure 6As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0164] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 6 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0165] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602. When the computer program is executed by the processing device 601, the above functions defined in the method of the embodiment of the present disclosure are executed.
[0166] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0167] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device. The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0168] The computer readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device executes Figures 1 to 3 Any of the steps.
[0169] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0170] In summary, the present application obtains the correlation between each target in the target set and each algorithm in the preset algorithm knowledge base and the maturity of each algorithm; determines the recommendation weight between each target and each algorithm according to the correlation and maturity; selects the algorithm corresponding to the recommended weight ranked high as the matching algorithm of the current monitoring video according to the recommended weight corresponding to each target in the current picture scene, and can automatically match the algorithm according to the target corresponding to the current video scene, avoiding cumbersome video picture algorithm configuration, greatly reducing the workload of the staff, and facilitating video monitoring to realize automatic early warning according to different monitoring pictures. Therefore, the present application effectively overcomes various shortcomings in the prior art and has a high industrial utilization value.
[0171] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A method based on a video scene matching algorithm, characterized in that: The method comprises the following steps: Get the video screen of the current surveillance video; Extracting objects in the video picture, and identifying the objects to obtain an object set of the current picture scene; Obtain the degree of association between each target in the target set and each algorithm in the preset algorithm knowledge base and the maturity of each algorithm; wherein, obtain the first number of matches between the current target in the target set and the current algorithm in the preset algorithm knowledge base; obtain the total number of first matches between the current target and each algorithm in the algorithm knowledge base; determine the degree of association between the current target and the current algorithm in the preset algorithm knowledge base according to the ratio of the first number of matches to the first total number of matches; obtain the total number of second matches between the current algorithm and each target in the target set; obtain the total number of third matches between each target in the target set and each algorithm in the preset algorithm knowledge base; determine the maturity of the current algorithm according to the ratio of the second total number of matches to the third total number of matches; Determine a recommendation weight between each goal and each algorithm according to the relevance and maturity; According to the recommendation weight corresponding to each target in the current picture scene, the algorithm corresponding to the recommendation weight with a high ranking is selected as the matching algorithm of the current monitoring video.
2. The method based on video scene matching algorithm according to claim 1, characterized in that: Also includes: Extracting a target in the video picture of the current frame by using a target detection algorithm, wherein the target is at least one; Extracting target features corresponding to the target, comparing the extracted target features one by one in the target sample library, and obtaining the recognition result of the current target; The recognition results corresponding to each target in the video picture of the current frame are expressed in the form of a data set to form a target set of the current picture scene.
3. The method based on video scene matching algorithm according to claim 1, characterized in that: Also includes: Obtaining a first product of a correlation degree between a current target and a current algorithm in a preset algorithm knowledge base and a preset target correlation coefficient; Obtaining a second product between the maturity of the current algorithm and a preset algorithm maturity coefficient; According to the sum of the first product and the second product, each algorithm is traversed to determine a recommendation weight between the current target and each algorithm in a preset algorithm knowledge base.
4. The method based on video scene matching algorithm according to claim 1, characterized in that: Also includes: Determine the correspondence between the target and the algorithm according to the correlation between the current target and each algorithm in the preset algorithm knowledge base; wherein, if the correlation is less than a preset threshold, there is no correspondence between the target and the algorithm; Determine the recommendation weight corresponding to each target of the current scene according to the corresponding relationship between the target and the algorithm; An algorithm corresponding to a recommended weight with a high ranking is selected, and the algorithm is used as a matching algorithm for the current surveillance video.
5. The method based on video scene matching algorithm according to claim 1 or 4, characterized in that: Also includes: According to the matching algorithm corresponding to the target in the current picture scene; The matching algorithm corresponding to the target is synchronized to the algorithm warehouse service according to the algorithm configuration rules, and the matching algorithm is loaded using the algorithm configuration rules to perform intelligent analysis on the current screen scene and generate corresponding warning information.
6. The method based on video scene matching algorithm according to claim 1, characterized in that: Also includes: Extracting image frames of the surveillance video; Analyze the current image frame to obtain the target state and attribute information of the target, and generate the on-screen display information of the target according to the target state, attribute information and matching algorithm; Embedding a data frame containing the target on-screen display information into a video stream; The on-screen display data frame is parsed to obtain the tracking frame position, size, attribute information and matching algorithm of the target and displayed on the front end.
7. A device based on a video scene matching algorithm, characterized in that: The device comprises: The first acquisition module is used to acquire the video image of the current monitoring video; A target set generation module is used to extract targets in the video picture and identify the targets to obtain a target set of the current picture scene; The second acquisition module is used to obtain the degree of association between each target in the target set and each algorithm in the preset algorithm knowledge base and the maturity of each algorithm; wherein, the first matching number between the current target in the target set and the current algorithm in the preset algorithm knowledge base is obtained; the total first matching number between the current target and each algorithm in the algorithm knowledge base is obtained; according to the ratio of the first matching number to the first matching total number, the degree of association between the current target and the current algorithm in the preset algorithm knowledge base is determined; the total second matching number between the current algorithm and each target in the target set is obtained; the total third matching number between each target in the target set and each algorithm in the preset algorithm knowledge base is obtained; according to the ratio of the second matching total number to the third matching total number, the maturity of the current algorithm is determined; A recommendation weight determination module, used to determine the recommendation weight between each target and each algorithm according to the association degree and maturity; The algorithm matching module is used to select the algorithm corresponding to the recommended weight ranked high as the matching algorithm of the current monitoring video according to the recommended weight corresponding to each target in the current picture scene.
8. An electronic device, characterized in that: include: one or more processing devices; A memory for storing one or more programs; When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the method based on the video scene matching algorithm as described in any one of 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is used to enable the computer to execute the method based on the video scene matching algorithm in any one of claims 1 to 6.
Citation Information
Patent Citations
Model matching method and device, computer readable storage medium and computer equipment
CN110321405A
Scene-based edge analysis algorithm issuing method and device and storage medium
CN113065615A