Image classification method, device, equipment and storage medium
Image merging is performed through the similarity and connection relationship of the monitoring device, which solves the problem of flowing objects error recognition caused by unclear images collected by the monitoring device, and realizes the accuracy of image classification and analysis reliability.
Patent Information
- Application Number
- CN202210429880.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2042-04-22
AI Technical Summary
When collecting images, existing monitoring equipment has large deployment range, many images, unsatisfactory equipment position, and failures, resulting in insufficient image clarity and poor angle, resulting in the flowing object being misidentified as multiple different flowing objects, increasing analysis. Difficulty and may lead to loss of clues.
By obtaining the preclassified image information set of each preset flow object, the image subset is merged and processed based on the similarity and connection relationship of the monitoring device to ensure that the image information of the same flow object is classified and avoiding error recognition and clue loss.
It effectively reduces the difficulty of analysis, ensures the accuracy of analysis, avoids the situation where flow objects are mistakenly identified as multiple different flow objects, and ensures the accuracy and completeness of image classification.
Smart Images

Figure CN114926677B_ABST
Abstract
Description
Background Art
[0002] With the rapid development of mobile Internet technology, various monitoring devices are widely used.
[0003] At present, in order to effectively strengthen public safety management, images of mobile objects are collected through monitoring equipment, and a time series database is built for mobile objects within the same deployment range. However, due to the influence of many factors such as the large deployment range, the large number of collected images, the unsatisfactory installation location of the monitoring equipment, monitoring equipment failure, glass reflection, bad weather, etc., the collected images are not clear enough, the angle is not good, and the mobile objects overlap, resulting in the situation that one mobile object is mistakenly identified as multiple different mobile objects.
[0004] When a flow object is mistakenly identified as multiple different flow objects, it will increase the difficulty of analysis and cause the loss of key clues. Summary of the invention
[0005] The present application provides an image classification method, apparatus, device and storage medium, which are used to avoid clue loss, reduce analysis difficulty and ensure analysis accuracy when a flow object is mistakenly identified as multiple different flow objects.
[0006] In a first aspect, an embodiment of the present application provides a method for image classification, the method comprising:
[0007] For each preset flow object, a corresponding pre-classified image information set is obtained respectively, wherein each pre-classified image information set includes at least one image and a monitoring device corresponding to each of the at least one image;
[0008] For any monitoring device, based on each acquired set of pre-classified image information, at least one target preset flow object corresponding to the monitoring device and a target image subset respectively matching the at least one target preset flow object are determined; and based on the set similarity between at least one target image subset, the target image subsets meeting the first similarity condition are merged to obtain an object image subset;
[0009] Based on the connection relationship between various monitoring devices, the object image subsets used to represent the same flow object are classified.
[0010] In a second aspect, an embodiment of the present application provides a device for image classification, the device comprising:
[0011] An acquisition unit, configured to acquire, for each preset flow object, a corresponding pre-classified image information set, wherein each pre-classified image information set includes at least one image and a monitoring device corresponding to each of the at least one image;
[0012] A merging unit, for any monitoring device, determines, based on each acquired set of pre-classified image information, at least one target preset flow object corresponding to the monitoring device and a target image subset that matches the at least one target preset flow object respectively; and based on the set similarity between at least one target image subset, merges the target image subsets that meet the first similarity condition to obtain an object image subset;
[0013] The classification unit is used to classify the object image subsets used to represent the same flow object based on the connection relationship between the various monitoring devices.
[0014] In a possible implementation, the acquiring unit is specifically configured to:
[0015] Based on the identification information of each preset flow object, a query request is sent to the storage service to obtain the preset classification image information set corresponding to each preset flow object within a set time range.
[0016] In a possible implementation, after respectively acquiring corresponding pre-classified image information sets, before determining at least one preset flow object corresponding to each monitoring device based on each acquired pre-classified image information set, the merging unit is further configured to:
[0017] For any pre-classified image information set, determining a first image similarity between each image in the pre-classified image information set;
[0018] Based on the first image similarity, images that do not meet the second similarity condition are removed from the preset classification image information set.
[0019] In a possible implementation, the merging unit is specifically used for:
[0020] For any pre-classified image information set, images belonging to the same monitoring device are classified to determine the image subsets corresponding to each monitoring device;
[0021] For any monitoring device, the target image subsets corresponding to the monitoring device are screened out from the image subsets corresponding to each pre-classified image set, and the target preset flow objects corresponding to the monitoring device are determined based on the target preset flow objects corresponding to each of the screened target image subsets.
[0022] In a possible implementation, the merging unit is specifically used for:
[0023] Determine the centroid vertices corresponding to each of at least one target image subset, construct a centroid vertex set, and determine the centroid similarity between each centroid vertex, use the centroid similarity as the set similarity, merge the target image subsets corresponding to the centroid similarities that meet the first similarity condition, and obtain the object image subset; and / or
[0024] Determine the second image similarity between images included in different target image subsets, take the second image similarity as the set similarity, merge the target image subsets corresponding to the second image similarities that meet the first similarity condition, and obtain the object image subset.
[0025] In a possible implementation, the classification unit is specifically used to:
[0026] Based on the connection relationship between the monitoring devices, the target image subsets corresponding to the monitoring devices with the connection relationship are aggregated to obtain an aggregated image set;
[0027] Based on each target image subset in the summary image set, an adjacency matrix is constructed;
[0028] The adjacency matrix is traversed to obtain a connectivity graph, and the object image subsets belonging to the same connectivity graph are classified, wherein one connectivity graph corresponds to one target flow object.
[0029] In a possible implementation, the connection relationship between the monitoring devices is determined in the following manner:
[0030] The acquired monitoring device tag set is parsed and processed to obtain the location information of each monitoring device; wherein the monitoring device tag set is the latest monitoring device tag set obtained from the registration center based on the registered state change monitoring event;
[0031] Based on the point information, a list of monitoring equipment point directions is constructed;
[0032] According to the monitoring device point pointing list, the monitoring devices located on the same route and pointing in the same direction are bound to obtain the connection relationship between the various monitoring devices.
[0033] In a third aspect, an embodiment of the present application provides an image classification device, comprising: a memory and a processor, wherein the memory is used to store computer instructions; and the processor is used to execute computer instructions to implement the steps of the image classification method provided in the embodiment of the present application.
[0034] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a processor, the steps of the image classification method provided in the embodiment of the present application are implemented.
[0035] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; when a processor of an electronic device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the electronic device performs the steps of the image classification method provided in the embodiment of the present application.
[0036] In the embodiment of the present application, for each preset flow object, a corresponding pre-classified image information set is obtained respectively, wherein each pre-classified image information set contains at least one image and a monitoring device corresponding to at least one image; for any monitoring device, based on the monitoring device corresponding to each image in each pre-classified image information set, at least one target preset flow object corresponding to a monitoring device and a target image subset respectively matching the at least one target preset flow object are determined, and then, based on the set similarity between at least one target image subset, the target image subset that meets the first similarity condition is merged to obtain the object image subset, so as to merge the image subsets collected under the same monitoring device; finally, based on the connection relationship between each monitoring device, the object image subsets used to characterize the same flow object are classified, so as to classify the object image subsets used to characterize the same flow object between multiple monitoring devices with a connection relationship; the image classification function is realized as a whole, so that in the case where a flow object is mistakenly identified as multiple different flow objects, the image classification scheme provided in the embodiment of the present application can realize the classification of images used to characterize the same flow object, avoid clue loss, reduce analysis difficulty, and ensure analysis accuracy.
[0037] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A schematic diagram of an application scenario in the related technology;
[0040] Figure 2A schematic diagram of an image classification service system provided in an embodiment of the present application;
[0041] Figure 3 A flow chart of a method for image classification provided in an embodiment of the present application;
[0042] Figure 4 A flow chart of a method for purifying a preset classified image information set provided in an embodiment of the present application;
[0043] Figure 5 A flow chart of a method for merging a target image subset provided in an embodiment of the present application;
[0044] Figure 6 A flow chart of another method for merging a target image subset provided in an embodiment of the present application;
[0045] Figure 7 A flow chart of a method for establishing a monitoring device connection relationship provided in an embodiment of the present application;
[0046] Figure 8 A flowchart of a method for constructing a monitoring device tag set provided in an embodiment of the present application;
[0047] Fig. 9 A flow chart of a method for classifying a subset of object images provided in an embodiment of the present application;
[0048] Fig.10 A flowchart of a specific implementation method of image classification provided in an embodiment of the present application;
[0049] Fig.11 A structural diagram of an image classification device provided in an embodiment of the present application;
[0050] Fig.12 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and beneficial effects of this application clearer, the technical solution in the embodiment of this application will be clearly and completely described in conjunction with the drawings in the embodiment of this application. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0052] In order to help those skilled in the art better understand the technical solution of the present application, some concepts involved in the present application are introduced below.
[0053] Stream computing: It acquires massive amounts of data from different data sources in real time, performs real-time analysis and processing, and obtains valuable information. It is generally used to process data-intensive applications.
[0054] Pre-classified image information set: It is used to store the image information of a preset mobile object, which is equivalent to a time series database constructed for the same mobile object within the same deployment range. In this field, technicians can also refer to the pre-classified image information set as a preset mobile object archive. Each image information in the pre-classified image information set is called a sub-file detail, where the image information includes the image and the monitoring device information for acquiring the image.
[0055] The word “exemplary” is used hereinafter to mean “serving as an example, example, or illustration.” Any embodiment described as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0056] The terms "first" and "second" in this document are used for descriptive purposes only and should not be understood as explicitly or implicitly indicating relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, unless otherwise specified, the meaning of "multiple" is two or more.
[0057] The following is a brief introduction to the design concept of the embodiment of the present application:
[0058] With the development of mobile Internet technology, various monitoring devices are widely used in various fields, especially in the field of security monitoring. In order to effectively strengthen public safety governance, related technologies often use the method of mobile object aggregation to build a time series database for mobile objects within the same deployment range. However, due to the influence of many factors such as the large deployment range, too many collected images, unsatisfactory location of monitoring equipment, monitoring equipment failure, glass reflection, bad weather, etc., the collected images are not clear enough, the angle is not good, the mobile objects overlap, and other undesirable situations, which leads to the emergence of multiple preset mobile object sets. The emergence of this situation increases the difficulty of analysis and may even lead to the loss of key information and reduce the accuracy of analysis.
[0059] In view of this, the embodiment of the present application takes into account the characteristics of data within the same monitoring device, that is, the correlation between data within the same monitoring device, and the spatial relationship between monitoring devices, that is, the probability of the same flow object appearing in adjacent monitoring devices is high, and realizes the function of merging image information sets corresponding to multiple preset flow objects, which effectively reduces the probability of the appearance of multiple image information sets corresponding to preset flow objects. In the case where a flow object is mistakenly identified as multiple different flow objects, the technical solution of image classification provided by the embodiment of the present application can be used to merge the image information sets used to characterize the same flow object, that is, the image information sets of the wrongly identified flow objects can be merged, thereby avoiding the loss of clues, reducing the difficulty of analysis, and ensuring the accuracy of analysis.
[0060] Specifically, an embodiment of the present application provides a method, apparatus, device and storage medium for image classification. In the embodiment of the present application, for each preset flow object, a corresponding pre-classified image information set is obtained respectively, wherein each pre-classified image information set contains at least one image and a monitoring device corresponding to at least one image; for any monitoring device, based on the monitoring device corresponding to each image in each pre-classified image information set, at least one target preset flow object corresponding to a monitoring device and a target image subset that matches the at least one target preset flow object are determined, and then, based on the set similarity between at least one target image subset, the target image subset that meets the first similarity condition is merged to obtain an object image subset, thereby merging the image subsets collected under the same monitoring device; finally, based on the connection relationship between each monitoring device, the object image subsets used to represent the same flow object are classified, thereby classifying the object image subsets used to represent the same flow object between multiple monitoring devices with a connection relationship.
[0061] In the embodiment of the present application, a set of pre-classified image information of each preset flow object is acquired in real time, and the pre-classified image information is merged using a divide-and-conquer, merge strategy. By analyzing the correlation of the monitoring equipment from the perspective of geographic space, after local optimization and merging, the merged set is merged again using the correlation of geographic space. In this way, the advantages during classification can be effectively guaranteed, and the performance of use can be guaranteed, so as to achieve a balance between the effect and performance of image classification. Moreover, the implementation based on streaming computing technology has significant advantages over offline clustering technology in terms of timeliness. In the embodiment of the present application, the function of image classification is realized as a whole, so that in the case where a flow object is mistakenly identified as multiple different flow objects, the image classification scheme provided in the embodiment of the present application can realize the classification of images used to characterize the same flow object, avoid the loss of clues, reduce the difficulty of analysis, and ensure the accuracy of analysis.
[0062] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0063] Please refer to Figure 1 , Figure 1 Schematic diagram of an application scenario of an embodiment of the present application. The application scenario includes multiple monitoring devices 110 and an image classification service system 120, and the multiple monitoring devices 110 and the image classification service system 120 can communicate with each other through a communication network.
[0064] In an optional implementation, the communication network may be a wired network or a wireless network. Therefore, the monitoring device 110 and the image classification service system 120 may be directly or indirectly connected via wired or wireless communication. For example, the monitoring device 110 may be indirectly connected to the image classification service system 120 via a wireless access point, or the monitoring device 110 may be directly connected to the image classification service system 120 via the Internet, and this application does not limit this.
[0065] In the embodiment of the present application, the monitoring device 110 includes a camera installed in a shopping mall, or a checkpoint device installed on a road, etc.;
[0066] The image classification service system 120 is a device for processing images collected by the monitoring device 110. The image classification service system can be a server that includes multiple functional modules, or it can be composed of multiple servers, each of which is used to implement a function. The server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0067] Based on the above application scenarios, the image classification method provided by the exemplary embodiment of the present application is described below in combination with the above-described application scenarios according to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present application, and the implementation methods of the present application are not limited in this regard.
[0068] In a possible implementation, the image classification method provided in the embodiment of the present application is applied to an image classification service system, that is, the image classification service system performs the image classification method; please refer to Figure 2 , Figure 2 The schematic diagram of an image classification service system in the embodiment of the present application is provided as an example. The image classification service system 200 includes but is not limited to: a registration center 201, a monitoring device management service module 202, a storage service module 203, a real-time flow object pre-clustering service module 204, and an image classification service module 205.
[0069] The registration center 201 is used to store the service information of each service module and the configuration information during image processing; the service information includes but is not limited to: service address, service port, service status; the configuration information includes but is not limited to: read parallelism, read window; wherein, the read parallelism is used to indicate that multiple lines can be processed simultaneously to increase efficiency; the read window refers to the time for reading a set of pre-classified image information and the time for processing the read set of pre-classified image information. The configuration of the read window takes into account the time that a mobile object can exist within a range.
[0070] The monitoring device management service module 202 is used to construct and store a monitoring device tag set based on the monitoring device information extracted from the monitoring device list, wherein the monitoring device information includes location information such as monitoring routes and monitoring intersections;
[0071] The monitoring device management service module 202 is also used to query the polling subtask based on the monitoring device tag information, regularly determine whether the monitoring device list has changed, and timely update the monitoring device tag set, and register the current service status with the registration center to indicate that the monitoring device tag set update is completed.
[0072] The storage service module 203 is used to store the connection relationship between various monitoring devices and the pre-classified image information set corresponding to the preset flow object.
[0073] The real-time flow object pre-clustering service module 204 is used to acquire image information in real time, and perform pre-clustering processing on the image information acquired in real time, determine each pre-classified image information set, the corresponding preset flow object, and the identification information of the preset flow object; and transmit the determined preset flow object and the corresponding pre-classified image information set to the storage service module 203 for storage.
[0074] The image classification service module 205 is used to merge the target image subsets that meet the first similarity condition to obtain the object image subsets; and classify the object image subsets used to represent the same flow object to implement the image classification method provided in the embodiment of the present application.
[0075] Based on the above image classification service system, a method for image classification in an embodiment of the present application is described; please refer to Figure 3 , Figure 3 A flowchart of a method for image classification in an embodiment of the present application is exemplarily provided, and the method includes:
[0076] Step S300: For each preset flow object, a corresponding pre-classified image information set is obtained respectively, wherein each pre-classified image information set includes at least one image and a monitoring device corresponding to each of the at least one image.
[0077] For example, the preset flow object A corresponds to the pre-classified image information set U A = {U A1 - Monitoring equipment S1, U A2 - Monitoring equipment S1, U A3 - Monitoring equipment S1, U A4 - Monitoring equipment S2, U A5- Monitoring equipment S2, U A6 - Monitoring equipment S2, U A7 - Monitoring equipment S3, U A8 - Monitoring equipment S3, U A9 - Monitoring equipment S3, U A10 - Monitoring equipment S4, U A11 - monitoring device S4}.
[0078] In an embodiment of the present application, before obtaining the corresponding pre-classified image information set for each preset flow object, the identification information of each preset flow object is first determined, and then based on the identification information of the preset flow object, the pre-classified image information set corresponding to each preset flow object is obtained; wherein the pre-classified image information set includes at least one image, and the monitoring device corresponding to each image.
[0079] Among them, the identification information of each preset flow object is read from the real-time flow object pre-clustering service module in the image classification service system; the corresponding pre-classified image information set is read from the storage service module in the image classification service system.
[0080] Specifically, the steps for obtaining the pre-classified image information set are as follows: first, through the registration center in the image classification service system, obtain the first service address of the real-time flow object pre-clustering service module and the second service address of the storage service module; then, based on the first service address, send a query request to the corresponding real-time flow object pre-clustering service module to obtain the identification information of each preset flow object; then, based on the identification information of each preset flow object, send a query request to the storage service module corresponding to the second service address to obtain the pre-classified image information set corresponding to each preset flow object.
[0081] In order to ensure the accuracy and speed of reading the pre-classified image information set, a reading window and a reading parallelism are also configured in the embodiment of the present application. Specifically, the pre-configured reading parallelism and reading window are read from the registration center; then, within each reading window of the reading parallelism, according to the identification information of the preset flow object, a query request is sent to the storage service module to obtain the preset classification image information set corresponding to the preset flow object within the set time range.
[0082] Furthermore, in order to ensure the accuracy of image classification based on the acquired pre-classified image information set, in the embodiment of the present application, after the pre-classified image information set is acquired, the images in the pre-classified image information set will be purified.
[0083] In a possible implementation, after respectively obtaining the pre-classified image information sets corresponding to the respective preset flow objects, the first image similarities between the respective images in the pre-classified image information sets are respectively determined for the respective pre-classified image information sets; based on the first image similarities, the images that do not meet the second similarity conditions are removed from the corresponding preset classified image information sets.
[0084] In another possible implementation, after respectively obtaining the pre-classified image information sets corresponding to each preset flow object, all the pre-classified image information sets are scattered to obtain all the images corresponding to all the pre-classified image information sets; then, a vertex is constructed for each image, and the first image similarity between any two vertices is determined; then, all the calculation results are obtained to obtain the edges between all the vertices, and all the edges are grouped by the pre-classified image information sets to obtain the image compactness sets within each pre-classified image information set; finally, all the edges within each pre-classified image information set are traversed to eliminate the images that are greater than the detection threshold.
[0085] It should be noted that after the images with values larger than the detection threshold are eliminated, they are pushed back to the real-time flow object pre-clustering service module to perform pre-clustering again, thus completing the image purification process in the pre-classified image information set.
[0086] Please refer to Figure 4 , Figure 4 A flowchart of a method for purifying a preset classified image information set in an embodiment of the present application is provided as an example, comprising the following steps:
[0087] Step S400: obtaining, through a registration center, a first service address of a real-time flow object pre-clustering service module and a second service address of a storage service module.
[0088] Step S401: Obtain a pre-configured read parallelism and a read window through a registration center.
[0089] Step S402: Read identification information of each preset flow object from the real-time flow object pre-clustering service module corresponding to the first service address in the reading window corresponding to each reading parallelism.
[0090] Step S403: Initiate a query request to the storage service module corresponding to the second service address according to the identification information of each preset flow object, and read the pre-classified image information set corresponding to each preset flow object.
[0091] Step S404: break up each pre-classified image information set, construct a vertex with the images in the pre-classified image information set, and determine the first image similarity between each pair of vertices.
[0092] Step S405: Obtain edges between all vertices according to the determined first image similarity.
[0093] Step S406: group all edges into pre-classified image information sets to obtain image precision sets within each pre-classified image information set.
[0094] Step S407, traverse all edges in each pre-classified image information set, and remove images with values greater than the detection threshold from the pre-classified image information set.
[0095] In an embodiment of the present application, after obtaining the pre-classified image information set, the pre-classified image information set is purified to ensure that the images in the pre-classified image information set have a higher similarity, thereby providing a guarantee for the subsequent classification processing of the object image subset.
[0096] Step S301, for any monitoring device, based on the obtained sets of pre-classified image information, determine at least one target preset flow object corresponding to the monitoring device, and a target image subset that matches the at least one target preset flow object respectively; and based on the set similarity between at least one target image subset, merge the target image subsets that meet the first similarity condition to obtain an object image subset.
[0097] Since each pre-classified image information set includes at least one image and a monitoring device corresponding to each image, the images contained in each pre-classified image information set can be classified according to the monitoring device, and the images belonging to the same monitoring device can be classified to determine the image subsets corresponding to each monitoring device. Furthermore, the association relationship between the preset flow object, the monitoring device and the image subset can be determined.
[0098] For example: the preset flow object A corresponds to the pre-classified image information set U A = {UA1 , U A2 , U A3 , U A4 , U A5 , U A6 , U A7 , U A8 , U A9 , U A10 , U A11}, where: U A1 , U A2 , U A3 is obtained through monitoring device S1, U A4 , U A5 , U A6 is obtained through monitoring device S2, U A7 , U A8 , U A9 is obtained through monitoring device S3, U A10 , U A11 is obtained through the monitoring device S4; at this time, the association relationship between the preset flow object A, the monitoring device and the corresponding image subset can be seen in Table 1:
[0099] Table 1
[0100]
[0101] For example: the preset flow object B corresponds to the pre-classified image information set U B = {U B1 , U B2 , U B3 , U B4 , U B5 , U B6 , U B7 , U B8 , U B9 , U B10 , U B11}, where: U B1 , U B2 , U B3 is obtained through monitoring device S2, U B4 , U B5 , U B6 is obtained through monitoring device S3, U B7 , U B8 , U B9 is obtained through monitoring device S4, U B10 , U B11 is obtained through the monitoring device S5; at this time, the association relationship between the preset flow object B, the monitoring device and the corresponding image subset can be seen in Table 2:
[0102] Table 2
[0103]
[0104] After determining the association relationship among the preset flow objects, monitoring devices and image subsets, based on the association relationship among the three, for any monitoring device, the target image subset corresponding to the monitoring device can be screened out from the image subsets corresponding to each pre-classified image set. At this time, at least one target image subset corresponding to the monitoring device can be determined, and then based on the preset flow objects corresponding to the at least one screened target image subset, at least one target preset flow object corresponding to the monitoring device can be determined.
[0105] Taking the contents recorded in Table 1 and Table 2 as an example, the corresponding target preset flow object and target image subset are determined for each monitoring device. For details, see Table 3:
[0106] Table 3
[0107]
[0108] In an embodiment of the present application, after determining at least one target image subset corresponding to a monitoring device, the target image subsets in the same monitoring device are merged. When merging the target image subsets, it can be determined whether the target image subsets can be merged based on at least one of the centroid vertex of the target image subset and the images in the target image subset.
[0109] The specific implementation method of merging the target image subsets is described in detail below through the first and second methods.
[0110] Method 1: Based on the centroid vertex of the target image subset, the target image subset is merged.
[0111] In one possible implementation, for any monitoring device, at least one target image subset corresponding to the monitoring device and the centroid vertices corresponding to each target image subset are determined to construct a centroid vertex set; then, a parallel computing subtask is started to determine the centroid similarity between each centroid vertices, and the centroid similarity is used as the set similarity. The target image subsets corresponding to the centroid similarities that meet the first similarity condition are merged to obtain the object image subset.
[0112] In another possible implementation, after determining the centroid similarities between each centroid vertices, the centroid similarities can be converted into edges between target preset flow objects according to the target preset flow objects to which the target image subset corresponding to the centroid similarities belongs; then, all edges are traversed to construct a first proximity matrix, and then the first adjacency matrix is traversed to obtain all first-class connected graphs; finally, the target image subsets corresponding to the target preset flow objects in the same first-class connected graph are merged.
[0113] Please refer to Figure 5 , Figure 5 A flowchart of a method for merging a target image subset in an embodiment of the present application is exemplarily provided, comprising the following steps:
[0114] Step S500, for any monitoring device, determining at least one target image subset corresponding to the monitoring device;
[0115] Step S501, determining the centroid vertices corresponding to each of at least one target image subset, and constructing a centroid vertex set;
[0116] Step S502, determining the centroid similarity between each centroid vertex in the centroid vertex set;
[0117] Step S503, according to the target preset flow object to which the target image subset corresponding to the centroid similarity belongs, converting the centroid similarity into an edge between the target preset flow objects;
[0118] Step S504, traverse all edges, construct a first proximity matrix, and obtain all first-type connected graphs based on the first adjacency matrix;
[0119] Step S505 , merging the target image subsets corresponding to the target preset flow objects in the same first-type connectivity graph.
[0120] Method 2: Based on the images of the target image subset, the target image subset is merged.
[0121] In a possible implementation, for any monitoring device, at least one target image subset corresponding to the monitoring device is determined, and then the images contained in each of the at least one target image set are determined; and the second image similarity between the images contained in different target image subsets is determined, and the second image similarity is used as the set similarity. The target image subsets corresponding to the second image similarities that meet the first similarity condition are merged to obtain the object image subset.
[0122] For example, for monitoring device S2, it is determined that the target image subset contained in the monitoring device is {U A4 , UA5 , U A6} and {U B1 , U B2 , U B3}, at this time, it can be determined that {U A4 , U A5 , U A6 Any image in {U B1 , U B2 , U B3}, such as determining the second image similarity between any image in U A4 and U B3 and then perform a merging process on the target image subset based on the second image similarity. For example, when it is determined that the second image similarity is greater than a set similarity threshold, {U A4 , U A5 , U A6} and {U B1 , U B2 , U B3}merge.
[0123] In another possible implementation, after determining the second image similarity between images included in different target image subsets, the second image similarity between images is used as the set similarity between target image subsets; then, based on the set similarity, a second proximity matrix is constructed, and then the second adjacency matrix is traversed to obtain all second-class connected graphs; finally, the target image subsets in the same second-class connected graph are merged.
[0124] In an embodiment of the present application, when calculating and determining the second image similarity between images included in different target image subsets: first, determine all images corresponding to the monitoring device, that is, the sum of the images included in all target image subsets; then, determine whether the number of all images corresponding to the monitoring device is greater than a set threshold. If it is greater than the set threshold, a dimension marking array is used to calculate the second image similarity within the array. If it is less than the set threshold, the second image similarity is directly determined without performing array marking and other operations on all images corresponding to the monitoring device.
[0125] Please refer to Figure 6 , Figure 6 Another method flow chart for merging a target image subset in an embodiment of the present application is exemplarily provided, comprising the following steps:
[0126] Step S600, for any monitoring device, determining at least one target image subset corresponding to the monitoring device;
[0127] Step S601, determining images contained in at least one target image subset;
[0128] Step S602, determining second image similarities between images included in different target image subsets;
[0129] Step S603, using the second image similarity between the images as the set similarity between the target image subsets;
[0130] Step S604, constructing a second proximity matrix based on the set similarity, and obtaining all second-type connected graphs based on the second adjacency matrix;
[0131] Step S605 , merging the target image subsets in the same second-type connected graph.
[0132] It should be noted that in the embodiment of the present application, the target image subsets can be preliminarily merged based on method one to obtain a new target image subset, and then the new target image subsets can be merged based on method two to prevent omissions and ensure accuracy.
[0133] Step S302: classify the object image subsets representing the same flow object based on the connection relationship between the various monitoring devices.
[0134] In the embodiment of the present application, before classifying the object image subsets used to represent the same flow object based on the connection relationship between the various monitoring devices, it is necessary to obtain the connection relationship between the various monitoring devices.
[0135] Optionally, the connection relationship between each monitoring device is obtained from the storage service module of the image classification service system; wherein the connection relationship between each monitoring device is determined in the following manner.
[0136] Please refer to Figure 7 , Figure 7 A flowchart of a method for establishing a connection relationship between monitoring devices in an embodiment of the present application is provided as an example, including the following steps:
[0137] Step S700, obtaining a third service address and a service port of the monitoring device management service module through the registration center;
[0138] Step S701: Based on the third service address and service port, a monitoring device query request is initiated to the corresponding monitoring device management service module through the HTTP protocol to obtain the monitoring device tag set constructed in the monitoring device management service module.
[0139] It should be noted that the monitoring device tag set is constructed by the monitoring device management service module; please refer to Figure 8 , Figure 8 A flowchart of a method for constructing a monitoring device tag set in an embodiment of the present application is provided as an example, comprising the following steps:
[0140] Step S800: The monitoring device management service module obtains a monitoring device list in the local area, extracts monitoring device information from the monitoring device list, and constructs a monitoring device tag set.
[0141] Step S801, start the monitoring device tag information query polling subtask and regularly update the monitoring device tag set.
[0142] Step S802, registering the current status with the registration center, indicating that the update of the monitoring device tag set is completed.
[0143] Step S702: parse and process the acquired monitoring device tag set to obtain location information of each monitoring device.
[0144] Step S703: construct a monitoring device point orientation list based on the point information.
[0145] Step S704: According to the monitoring device point pointing list, the monitoring devices located on the same route and pointing in the same direction are bound to obtain the connection relationship between the various monitoring devices.
[0146] Step S705, registering a monitoring device tag set state change monitoring event with a registration center to determine whether the monitoring device tag set has changed, if so, executing step S701, otherwise executing step S706.
[0147] Step S706, end.
[0148] Therefore, in the embodiment of the present application, the monitoring device tag set is the latest monitoring device tag set obtained from the registration center based on the registered state change monitoring event.
[0149] In a possible implementation, after obtaining the connection relationship between each monitoring device, the connection relationship between each monitoring device is traversed, and the connection relationship between each monitoring device is converted into a storable mapping structure, such as a (K, List(V)) structure. The service address of the storage service module is obtained through the registration center, and based on the service address of the storage service module, the mapping (K, List(V)) structure of the connection relationship between each monitoring device is stored in the storage service module, so that it can be directly obtained from the storage service module for subsequent use, thereby increasing efficiency.
[0150] After determining the connection relationship between each monitoring device, based on the connection relationship between each monitoring device, the object image subsets corresponding to each monitoring device with a connection relationship are aggregated to obtain a aggregated image set; based on each object image subset in the aggregated image set, an adjacency matrix is constructed; the adjacency matrix is traversed to obtain a connectivity graph, and the object image subsets belonging to the same connectivity graph are classified, wherein one connectivity graph corresponds to one target flow object.
[0151] Please refer to Fig. 9 , Fig. 9 An exemplary flow chart of a method for classifying a subset of object images in an embodiment of the present application is provided, comprising the following steps:
[0152] Step S900: determining the object image subsets corresponding to the respective monitoring devices.
[0153] The object image subset is obtained by merging the target image subsets that meet the first similarity condition.
[0154] Step S901, obtaining the connection relationship between each monitoring device from the storage service module, traversing all monitoring devices, and determining a list of monitoring devices with associated relationships.
[0155] Step S902: based on the determined list of associated monitoring devices, determine the object image subsets corresponding to the respective monitoring devices in the monitoring device list, and perform aggregation processing to obtain an aggregated image set.
[0156] That is, the object image subsets corresponding to adjacent monitoring devices are aggregated together.
[0157] Step S903: construct an adjacency matrix based on each object image subset in the summary image set.
[0158] Step S904, traverse the adjacency matrix, obtain the connectivity graph, and mark all traversed object image subsets.
[0159] Step S905: classify the object image subsets belonging to the same connected graph.
[0160] Please refer to Fig.10 , Fig.10 An exemplary flowchart of a specific implementation of image classification in an embodiment of the present application is provided, including the following steps:
[0161] Step S1000: The monitoring device management service module obtains a monitoring device list in the local area, extracts monitoring device information in the monitoring device list, and constructs a monitoring device tag set.
[0162] Step S1001: Obtain the third service address and service port of the monitoring device management service module through the registration center.
[0163] Step S1002: Based on the third service address and service port, a monitoring device query request is initiated to the corresponding monitoring device management service module to obtain a monitoring device tag set constructed in the monitoring device management service module.
[0164] Step S1003, based on the location information of each monitoring device in the monitoring device tag set, obtain the connection relationship between each monitoring device, and store the connection relationship between each monitoring device in the storage service module.
[0165] Step S1004: obtaining, through the registration center, a first service address of the real-time flow object pre-clustering service module and a second service address of the storage service module.
[0166] Step S1005: Read identification information of each preset flow object from the real-time flow object pre-clustering service module corresponding to the first service address.
[0167] Step S1006: Initiate a query request to the storage service module corresponding to the second service address according to the identification information of each preset flow object, and read the pre-classified image information set corresponding to each preset flow object.
[0168] Step S1007: purify each pre-classified image information set.
[0169] Step S1008, for any monitoring device, based on each purified pre-divided image information set, determine at least one target preset flow object corresponding to the monitoring device and a target image subset that matches the at least one target preset flow object.
[0170] Step S1009: for any monitoring device, based on the centroid vertex of at least one target image subset, merge the target image subsets in the monitoring device to obtain at least one merged image subset.
[0171] It should be noted that the merged image subset may be obtained by merging at least two target image subsets, or may be a target image subset that is not merged.
[0172] Step S1010, for any monitoring device, based on the images contained in each of at least one merged image subset, determine the second image similarity between the images contained in different merged image subsets, and based on the two image similarities, merge the merged image subsets again in the monitoring device to obtain the object image subset.
[0173] Step S1011, reading the connection relationship between each monitoring device from the storage service address.
[0174] Step S1012: classify the object image subsets representing the same flow object based on the connection relationship between the various monitoring devices.
[0175] In the present application, for each preset flow object, a corresponding pre-classified image information set is obtained respectively, wherein each pre-classified image information set contains at least one image and at least one monitoring device corresponding to each image; for any monitoring device, based on the monitoring device corresponding to each image in each pre-classified image information set, at least one target preset flow object corresponding to a monitoring device and a target image subset that matches the at least one target preset flow object are determined, and then, based on the set similarity between at least one target image subset, the target image subset that meets the first similarity condition is merged to obtain the object image subset, so as to merge the image subsets collected under the same monitoring device; finally, based on the connection relationship between each monitoring device, the object image subsets used to characterize the same flow object are classified, so as to classify the object image subsets used to characterize the same flow object between multiple monitoring devices with a connection relationship; the image classification function is realized as a whole, so that when a flow object is mistakenly identified as multiple different flow objects, the image classification scheme provided in the embodiment of the present application can realize the classification of images used to characterize the same flow object, avoid clue loss, reduce analysis difficulty, and ensure analysis accuracy.
[0176] Based on the same inventive concept as the above method embodiment of the present application, an image classification device is also provided in the embodiment of the present application. The principle of solving the problem by the device is similar to that of the method in the above embodiment. Therefore, the implementation of the device can refer to the implementation of the above method, and the repeated parts will not be repeated.
[0177] Please refer to Fig.11 , Fig.11 The present application embodiment provides an apparatus 1100 for classifying an image. The apparatus 1100 for classifying an image includes:
[0178] The acquisition unit 1101 is used to acquire corresponding pre-classified image information sets for each preset flow object, wherein each pre-classified image information set includes at least one image and a monitoring device corresponding to each of the at least one image;
[0179] The merging unit 1102 determines, for any monitoring device, at least one target preset flow object corresponding to the monitoring device and a target image subset that matches the at least one target preset flow object based on each acquired pre-classified image information set; and based on the set similarity between at least one target image subset, merges the target image subsets that meet the first similarity condition to obtain an object image subset;
[0180] The classification unit 1103 is used to classify the object image subsets used to represent the same flow object based on the connection relationship between the various monitoring devices.
[0181] In a possible implementation, the acquiring unit 1101 is specifically configured to:
[0182] Based on the identification information of each preset flow object, a query request is sent to the storage service to obtain the preset classification image information set corresponding to each preset flow object within a set time range.
[0183] In a possible implementation, after respectively acquiring corresponding pre-classified image information sets, before determining at least one preset flow object corresponding to each monitoring device based on each acquired pre-classified image information set, the merging unit 1102 is further configured to:
[0184] For any pre-classified image information set, determining a first image similarity between each image in the pre-classified image information set;
[0185] Based on the first image similarity, images that do not meet the second similarity condition are removed from the preset classification image information set.
[0186] In a possible implementation, the merging unit 1102 is specifically configured to:
[0187] For any pre-classified image information set, images belonging to the same monitoring device are classified to determine the image subsets corresponding to each monitoring device;
[0188] For any monitoring device, the target image subsets corresponding to the monitoring device are screened out from the image subsets corresponding to each pre-classified image set, and the target preset flow objects corresponding to the monitoring device are determined based on the target preset flow objects corresponding to each of the screened target image subsets.
[0189] In a possible implementation, the merging unit 1102 is specifically configured to:
[0190] Determine the centroid vertices corresponding to each of at least one target image subset, construct a centroid vertex set, and determine the centroid similarity between each centroid vertex, use the centroid similarity as the set similarity, merge the target image subsets corresponding to the centroid similarities that meet the first similarity condition, and obtain the object image subset; and / or
[0191] Determine the second image similarity between images included in different target image subsets, take the second image similarity as the set similarity, merge the target image subsets corresponding to the second image similarities that meet the first similarity condition, and obtain the object image subset.
[0192] In a possible implementation, the classification unit 1103 is specifically configured to:
[0193] Based on the connection relationship between the monitoring devices, the target image subsets corresponding to the monitoring devices with the connection relationship are aggregated to obtain an aggregated image set;
[0194] Based on each target image subset in the summary image set, an adjacency matrix is constructed;
[0195] The adjacency matrix is traversed to obtain a connectivity graph, and the object image subsets belonging to the same connectivity graph are classified, wherein one connectivity graph corresponds to one target flow object.
[0196] In a possible implementation, the connection relationship between the monitoring devices is determined in the following manner:
[0197] The acquired monitoring device tag set is parsed and processed to obtain the location information of each monitoring device; wherein the monitoring device tag set is the latest monitoring device tag set obtained from the registration center based on the registered state change monitoring event;
[0198] Based on the point information, a list of monitoring equipment point directions is constructed;
[0199] According to the monitoring device point pointing list, the monitoring devices located on the same route and pointing in the same direction are bound to obtain the connection relationship between the various monitoring devices.
[0200] In the present application, it is achieved that a subset of images collected under the same monitoring device is merged and processed; and it is achieved that a subset of object images used to represent the same flow object between multiple monitoring devices with a connection relationship is classified and processed; the function of image classification is realized as a whole, so that in the case where a flow object is mistakenly identified as multiple different flow objects, the image classification scheme provided in the embodiment of the present application can achieve the classification processing of images used to represent the same flow object, avoid the loss of clues, reduce the difficulty of analysis, and ensure the accuracy of analysis.
[0201] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.
[0202] After introducing the method and device for image classification according to an exemplary embodiment of the present application, next, an image classification device according to another exemplary embodiment of the present application is introduced.
[0203] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.
[0204] In some possible implementations, the apparatus for image classification according to the present application may include at least a processor and a memory. The memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the method for image classification according to various exemplary implementations of the present application described in this specification.
[0205] After introducing the method and apparatus for image classification according to an exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.
[0206] Based on the same inventive concept as the above method embodiment of the present application, an electronic device is also provided in the embodiment of the present application, and the electronic device may be a server. In this embodiment, the structure of the electronic device may be as follows: Fig.12 As shown, it includes a memory 1201 , a communication module 1203 and one or more processors 1202 .
[0207] The memory 1201 is used to store computer programs executed by the processor 1202. The memory 1201 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0208] The memory 1201 may be a volatile memory, such as a random-access memory (RAM); the memory 1201 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 1201 may be any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1201 may be a combination of the above memories.
[0209] The processor 1202 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 1202 is used to implement the above-mentioned image classification method when calling the computer program stored in the memory 1201 .
[0210] The communication module 1203 is used to communicate with terminal devices and other servers.
[0211] The specific connection medium between the memory 1201, the communication module 1203 and the processor 1202 is not limited in the embodiment of the present application. Fig.12 In the embodiment, the memory 1201 and the processor 1202 are connected via a bus 1204. The bus 1204 is connected to the processor 1202 via a bus 1204. Fig.12 The connections between the other components are only for illustration and are not intended to be limiting. The bus 1204 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Fig.12 The diagram shows that only one thick line is used, but this does not mean that there is only one bus or one type of bus.
[0212] The memory 1201 stores a computer storage medium, and the computer storage medium stores computer executable instructions, and the computer executable instructions are used to implement the data decryption method of the embodiment of the present application. The processor 1202 is used to execute the above-mentioned image classification method.
[0213] In some possible implementations, various aspects of the image classification method provided by the present application may also be implemented in the form of a program product, which includes a computer program. When the program product is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the image classification method according to various exemplary implementations of the present application described above in this specification.
[0214] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The 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 readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable 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.
[0215] The program product of the embodiment of the present application can adopt a portable compact disk read-only memory (CD-ROM) and include a computer program, and can be run on a computing device. However, the program product of the present application is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with a command execution system, device or device.
[0216] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a command execution system, apparatus, or device.
[0217] The computer program embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0218] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.
[0219] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0220] Those skilled in the art will appreciate that the present application embodiments can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain a computer-usable computer program.
[0221] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0222] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for image classification, It is characterized in that The method comprises: For each preset flow object, a corresponding pre-classified image information set is obtained respectively, wherein each of the pre-classified image information sets includes at least one image and a monitoring device corresponding to each of the at least one image; For any of the monitoring devices, based on the acquired sets of pre-classified image information, at least one target preset flow object corresponding to the monitoring device and a target image subset that matches the at least one target preset flow object are determined; and based on the set similarity between at least one of the target image subsets, the target image subsets that meet the first similarity condition are merged to obtain an object image subset; Based on the connection relationship between the monitoring devices, a subset of the object images used to represent the same flow object is classified; Wherein, determining at least one target preset flow object corresponding to the monitoring device and a target image subset respectively matching the at least one target preset flow object based on each of the acquired pre-classified image information sets includes: For any of the pre-classified image information sets, classify the images belonging to the same monitoring device to determine the image subsets corresponding to the respective monitoring devices; For any monitoring device, respectively, from the image subsets corresponding to each of the pre-classified image information sets, a target image subset corresponding to the monitoring device is screened out, and based on the target preset flow objects corresponding to each of the screened target image subsets, the target preset flow object corresponding to the monitoring device is determined; The connection relationship between the monitoring devices is determined in the following manner: The obtained monitoring device tag set is parsed and processed to obtain the location information of each monitoring device; wherein the monitoring device tag set is the latest monitoring device tag set obtained from the registration center based on the registered state change monitoring event; Based on the point information, a monitoring device point pointing list is constructed; According to the monitoring device point pointing list, the monitoring devices located on the same route and pointing in the same direction are bound to obtain the connection relationship between the various monitoring devices.
2. The method according to claim 1, It is characterized in that The step of obtaining a corresponding set of pre-classified image information for each preset flow object includes: Based on the identification information of each preset flow object, a query request is sent to the storage service to obtain the corresponding pre-classified image information sets of each preset flow object within a set time range.
3. The method according to claim 1, It is characterized in that After respectively acquiring the corresponding pre-classified image information sets, before determining at least one preset flow object corresponding to each monitoring device based on each acquired pre-classified image information set, the method further includes: For any of the pre-classified image information sets, determining a first image similarity between each image in the pre-classified image information set; Based on the first image similarity, images that do not meet the second similarity condition are removed from the pre-classified image information set.
4. The method according to any one of claims 1 to 3, It is characterized in that The step of merging target image subsets meeting the first similarity condition based on the set similarity between at least one of the target image subsets to obtain the object image subsets comprises: Determine the centroid vertex corresponding to each of at least one of the target image subsets, construct a centroid vertex set, and determine the centroid similarity between the centroid vertices, use the centroid similarity as the set similarity, merge the target image subsets corresponding to the centroid similarities that meet the first similarity condition, and obtain the object image subset; and / or Determine the second image similarity between the images included in different target image subsets, use the second image similarity as the set similarity, merge the target image subsets corresponding to the second image similarities that meet the first similarity condition, and obtain the object image subset.
5. The method according to claim 1, It is characterized in that The classifying of the object image subsets representing the same flow object based on the connection relationship between the monitoring devices includes: Based on the connection relationship between the monitoring devices, the object image subsets corresponding to the monitoring devices having the connection relationship are aggregated to obtain an aggregated image set; constructing an adjacency matrix based on each object image subset in the summary image set; The adjacency matrix is traversed to obtain a connectivity graph, and a subset of object images belonging to the same connectivity graph is classified, wherein one connectivity graph corresponds to one target flow object.
6. A device for classifying images, It is characterized in that The device comprises: An acquisition unit, configured to acquire, for each preset flow object, a corresponding pre-classified image information set, wherein each of the pre-classified image information sets includes at least one image and a monitoring device corresponding to each of the at least one image; a merging unit, for any of the monitoring devices, determining, based on each of the acquired pre-classified image information sets, at least one target preset flow object corresponding to the monitoring device, and a target image subset that matches the at least one target preset flow object respectively; and based on the set similarity between at least one of the target image subsets, merging the target image subsets that meet the first similarity condition to obtain an object image subset; A classification unit, configured to classify a subset of the object images representing the same flow object based on the connection relationship between the monitoring devices; Wherein, the merging unit is specifically used for: For any of the pre-classified image information sets, classify the images belonging to the same monitoring device to determine the image subsets corresponding to the respective monitoring devices; For any monitoring device, respectively, from the image subsets corresponding to each of the pre-classified image information sets, a target image subset corresponding to the monitoring device is screened out, and based on the target preset flow objects corresponding to each of the screened target image subsets, the target preset flow object corresponding to the monitoring device is determined; The connection relationship between the monitoring devices is determined in the following manner: The obtained monitoring device tag set is parsed and processed to obtain the location information of each monitoring device; wherein the monitoring device tag set is the latest monitoring device tag set obtained from the registration center based on the registered state change monitoring event; Based on the point information, a monitoring device point pointing list is constructed; According to the monitoring device point pointing list, the monitoring devices located on the same route and pointing in the same direction are bound to obtain the connection relationship between the various monitoring devices.
7. An electronic device, It is characterized in that The electronic device comprises: a memory and a processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to implement the steps of any method described in claims 1 to 5.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
