An information detection method and device
Through the multi-level distributed database and binary weight method, the weight factor is dynamically adjusted, which solves the problem of accuracy reduction caused by feature changes in traditional recognition methods, and realizes intelligent analysis of inter-group relationships, which is suitable for intelligent security scenarios.
Patent Information
- Application Number
- CN202210710678.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-06-22
AI Technical Summary
In the prior art, the traditional single-object recognition method has a decrease in recognition accuracy due to the change of features over time, and cannot perform intelligent analysis of intergroup relationships, and cannot meet the needs of complex intelligent usage scenarios.
Using a multi-level distributed database architecture, by establishing the primary feature vector and the auxiliary feature vector, combining the binary weight method, dynamically adjusting the weight factor, optimizing the recognition accuracy, and recording the relationship between groups through the permission database, flexible permission verification is achieved.
It improves the recognition accuracy of a single target, can conduct intelligent analysis between groups, solves the problems of degradation of identification accuracy and group relationship judgment in traditional methods, and is suitable for complex intelligent usage scenarios.
Smart Images

Figure CN115019346B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing technologies, and in particular, to an information detection method and device. Background Art
[0002] With the continuous in-depth development of intelligent technologies and the continuous extension of intelligent services in the market, traditional simple intelligent technologies such as face recognition and vehicle detection in one-time intelligent analysis are not applicable to increasingly complex intelligent usage scenarios. For example, there will be problems such as the permission issue of non-matching people and vehicles in the community, and the safety issue of strangers taking children in and out of the community.
[0003] In addition, when performing target recognition in the prior art, multiple features are used to recognize a single target, and each feature has a fixed weight factor. When recognizing a single target, the comprehensive similarity is calculated through the sum of the similarity of each feature and the weight factor. However, because the features of a single target change over time, the recognition accuracy will decrease. Summary of the Invention
[0004] Embodiments of this application provide an information detection method and device to improve the target recognition accuracy and avoid the problem of decreased recognition accuracy caused by the change of target features over time.
[0005] An information detection method provided by an embodiment of this application includes:
[0006] For each feature of the detection target, compare the feature with the main feature vector in the feature database corresponding to the feature to obtain the comparison similarity of the main feature vector of the feature; and compare the feature with the auxiliary feature vector in the feature database corresponding to the feature to obtain the comparison similarity of the auxiliary feature vector of the feature;
[0007] For each of the above features, based on the comparison similarity of the main feature vector of the feature, the comparison similarity of the auxiliary feature vector of the feature, the preset main feature weight factor, and the preset auxiliary feature weight factor, determine the weight factor and similarity corresponding to the feature;
[0008] Use the weight factor corresponding to each feature of the detection target to determine the normalized weight factor of the detection target; and use the normalized weight factor of the detection target and the similarity corresponding to each feature of the detection target to determine the comprehensive similarity of the detection target.
[0009] For each feature of the detection target, two feature vectors, namely the main feature vector and the auxiliary feature vector, are established through this method, thereby deriving the binary weight method - based on the main feature vector comparison similarity, auxiliary feature vector comparison similarity, preset main feature weight factor, and preset auxiliary feature weight factor of this feature, determine the weight factor and similarity corresponding to this feature, and use the weight factor corresponding to each feature of the detection target to determine the normalized weight factor of the detection target; and use the normalized weight factor of the detection target and the similarity corresponding to each feature of the detection target to determine the comprehensive similarity of the detection target, so as to effectively optimize the problem of the decline in recognition accuracy caused by the change of the features of the detection target over time, thus improving the target recognition accuracy.
[0010] In some embodiments, the main feature weight factor and the auxiliary feature weight factor are preset in a preset weight database; the method further includes:
[0011] Determine the weight database corresponding to the detection target; the weight database includes the main feature weight factor and the auxiliary feature weight factor of at least one category of features of the detection target.
[0012] In some embodiments, the corresponding weight database is determined according to the category to which the detection target belongs.
[0013] In some embodiments, the weight database further includes a feature database index of at least one category of features;
[0014] For each of the features, in the weight database, determine the feature database index corresponding to this feature according to the category to which this feature belongs.
[0015] In some embodiments, when there are n such features in the detection target, for any feature i:
[0016] Determine the main feature weight factor of feature i And the comparison similarity of the main feature vector of feature i Of the product , and the auxiliary feature weight factor of feature i And the comparison similarity of the auxiliary feature vector of feature i Of the product ;
[0017] Subtract From , to obtain the first difference, and subtract From , to obtain the second difference, and calculate And The absolute value of the difference;
[0018] When the first difference is a positive number, multiply the ratio of the first difference to the absolute value by the main feature weight factor of feature i, and use the obtained value as the weight factor of feature i ;
[0019] When the second difference is a positive number, multiply the ratio of the second difference to the absolute value by the secondary feature weight factor of feature i, and use the obtained value as the weight factor of feature i 。
[0020] In some embodiments, when there are n such features for the detection target, for any feature i:
[0021] Determine the main feature weight factor of feature i Compare the similarity with the main feature vector of feature i The product of , and the secondary feature weight factor of feature i Compare the similarity with the secondary feature vector of feature i The product of ;
[0022] Subtract from to obtain the first difference, and subtract from to obtain the second difference, and calculate the absolute value of the difference between and ;
[0023] When the first difference is a positive number, multiply the ratio of the first difference to the absolute value by the similarity of the main feature vector of feature i, and use the obtained value as the similarity of feature i ;
[0024] When the second difference is a positive number, multiply the ratio of the second difference to the absolute value by the similarity of the secondary feature vector of feature i, and use the obtained value as the similarity of feature i 。
[0025] In some embodiments, when there are n such features for the detection target, for any feature i, determine the product of the normalized weight factor and the similarity of feature i, accumulate the products corresponding to the n features, and use the obtained sum as the comprehensive similarity of the detection target
[0026] In some embodiments, the method further includes:
[0027] When the comprehensive similarity of the detection target meets a preset condition, determine that the detection target is successfully recognized
[0028] In some embodiments, the method further includes:
[0029] When the comprehensive similarity of the detection target does not meet the preset condition, an alarm message is sent in a preset manner.
[0030] Another information detection method provided by an embodiment of the present application includes:
[0031] When there are multiple detection targets, for each of the detection targets, the above method is used to determine the comprehensive similarity of the detection target; when the comprehensive similarity of the detection target meets the preset condition, it is determined that the detection target is successfully recognized;
[0032] If there is a preset detection subject among the detection targets that are successfully recognized among the multiple detection targets, the relationship between the detection targets that are successfully recognized among the multiple detection targets is subjected to permission verification. If the permission verification passes, the alarm is not triggered; otherwise, the alarm is triggered.
[0033] In some embodiments, the relationship between the detection targets that are successfully recognized among the multiple detection targets is subjected to permission verification. If the permission verification passes, the alarm is not triggered; otherwise, the alarm is triggered. Specifically, it includes:
[0034] Judge whether the regular expression corresponding to the detection subject recorded in the preset permission database is established. If it is established, the permission verification passes; otherwise, the alarm is triggered; wherein, the relationship between multiple targets is pre-recorded in the permission database in the form of a regular expression.
[0035] Another embodiment of the present application provides an information detection device, which includes a memory and a processor. Among them, the memory is used to store program instructions, and the processor is used to call the program instructions stored in the memory and execute any of the above methods according to the obtained program.
[0036] In addition, according to an embodiment, for example, a computer program product for a computer is provided, which includes a software code part. When the product runs on the computer, these software code parts are used to execute the steps of the method defined above. The computer program product may include a computer-readable medium on which the software code part is stored. In addition, the computer program product can be directly loaded into the internal memory of the computer and / or sent via the network through at least one of the upload process, download process, and push process.
[0037] Another embodiment of the present application provides a computer-readable storage medium, and the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to make the computer execute any of the above methods. Description of the Drawings
[0038] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0039] Figure 1 Schematic diagram of the usage scenario of the primary database provided by the embodiment of the present application;
[0040] Figure 2 Schematic diagram of the multi-level database distribution architecture provided by the embodiment of the present application;
[0041] Figure 3 Schematic diagram of the internal structure of the feature database provided by the embodiment of the present application;
[0042] Figure 4 Schematic diagram of the internal structure of the weight database provided by the embodiment of the present application;
[0043] Figure 5 Schematic diagram of the flow of an information detection method provided by the embodiment of the present application;
[0044] Figure 6 Schematic diagram of the flow of an information detection method provided by the embodiment of the present application;
[0045] Figure 7 Schematic diagram of the structure of an information detection device provided by the embodiment of the present application;
[0046] Figure 8 Schematic diagram of the structure of another information detection device provided by the embodiment of the present application. Detailed implementation manners
[0047] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0048] The embodiments of the present application provide an information detection method and device to improve the target recognition accuracy and avoid the problem of the decline in recognition accuracy caused by the change of the target's features over time.
[0049] Among them, the method and the device are based on the same inventive concept. Since the principles of the method and the device for solving problems are similar, the implementation of the device and the method can be referred to each other, and the repeated parts will not be elaborated.
[0050] In the description, claims, and the above-mentioned accompanying drawings of the embodiments of the present application, terms such as "first", "second", etc. (if any) are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments described herein can be implemented in an order different from that illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0051] The following examples and embodiments are only to be understood as illustrative examples. Although this specification may mention "one", "a", or "some" examples or embodiments in several places, this does not mean that each such mention relates to the same example or embodiment, nor does it mean that the feature only applies to a single example or embodiment. The individual features of different embodiments can also be combined to provide other embodiments. In addition, terms such as "including" and "comprising" should be understood not to limit the described embodiments to only consisting of the features already mentioned; such examples and embodiments can also include features, structures, units, modules, etc. that are not specifically mentioned.
[0052] The following will describe each embodiment of the present application in detail with reference to the accompanying drawings of the specification. It should be noted that the display order of the embodiments of the present application only represents the sequence of the embodiments and does not represent the superiority or inferiority of the technical solutions provided by the embodiments.
[0053] In the technical solution provided by the embodiments of the present application, for each feature of the recognition target, two feature vectors are established, thereby deriving a binary weight method, which can effectively optimize the problem of the decrease in recognition accuracy caused by the change of the features of the recognition target over time.
[0054] Moreover, in the technical solution provided by the embodiments of the present application, it is also proposed to express the relationship between multiple targets (groups) in the manner of regular permissions, and thus derive a method for intelligent recognition that can effectively and flexibly judge the relationship between groups, solving the increasingly complex intelligent scenario service requirements in the security field and the problem of the single existing intelligent detection means.
[0055] The embodiments of the present application propose a distributed architecture for a database, which flexibly cascades the feature vectors horizontally, so as to achieve the effect of secondary intelligent group intelligent combination analysis based on a single intelligent analysis.
[0056] The introduction of the three-level distributed architecture of the feature vector database and the event database provided by the embodiments of the present application is as follows:
[0057] In the traditional security monitoring field, the intelligent detection and recognition of people and objects are achieved by matching a primary database. A typical technical implementation scenario is as Figure 1 shown.
[0058] The brief description is as follows:
[0059] For the person or object to be recognized (hereinafter referred to as the recognition target or detection target), a feature vector database is established in advance. For example, the feature vectors can be extracted by importing pictures in advance, or automatically extracted and added when the target is detected for the first time. The feature vector database contains the feature vectors of multiple recognition targets.
[0060] When a recognition target is captured by the intelligent recognition module of a Network Video Recorder (NVR), the relevant intelligent module of the NVR extracts its feature vector, and then uses the extracted feature vector to compare with the feature database. If the match is successful, it means the target has been recognized; otherwise, it means the target cannot be recognized.
[0061] When a target is recognized, the corresponding event (such as face recognition) is stored in the event database for query use.
[0062] As Figure 1 can be seen, the so-called primary database is because there is only one feature vector database, and a certain feature of the recognition target corresponds to one database. For example, when a person is the recognition target, the face can be used as the feature vector database, and the body can also be used as the feature vector database. However, the traditional intelligent recognition and comparison technology is one-to-one, that is, one target corresponds to one database. The disadvantages of the traditional intelligent recognition and comparison technology are also relatively obvious, that is, only one intelligent analysis can be performed, and more in-depth secondary combined intelligent analysis cannot be performed.
[0063] Therefore, the embodiment of this application proposes a new multi-level distributed database structure to improve the comparison accuracy of one-time intelligence and the ability of secondary combined intelligent analysis. Its core effect is to be able to perform intelligent detection on groups and fully consider the relationship between the group and each target (i.e., target permissions).
[0064] The multi-level database distribution architecture proposed in the embodiment of this application is as Figure 2 shown, and the detailed description is as follows:
[0065] Feature database: That is, the feature vector database. For the internal structure of the feature database, see Figure 3 , and the feature database contains the feature vectors of a certain feature of at least one recognition target. Each feature contains two feature vectors, one is the main feature vector, and the other is the auxiliary feature vector (non-essential feature vector). See Figure 2, the feature database 1 and the feature database 2 respectively correspond to different features of the same target. For example, when manually identifying a target, the feature database 1 can be a database of face features, the feature database 2 can be a database of human body features, or a feature database of hair (hairstyle, hair color), etc. A target can have multiple features, so there can be multiple feature databases. Figure 2 Only two feature databases are schematically shown. In fact, there can be more databases to represent multiple different features of the same recognition target.
[0066] Different targets can be distinguished by category. For example, people and vehicles belong to different categories of detection targets.
[0067] Weight database: The internal structure of the weight database is as Figure 4 shown. It contains the indexes of each feature database of each target and the recognition weights (i.e., weight factors) of each feature vector (including the main feature vector and the secondary feature vector) of each feature. For example, when the category of the recognition target is a person, the weight database contains the indexes of the face feature database and the human body feature database, as well as the corresponding comparison weights. For example, for face features, the weight factor of the main feature vector is 90%, and the weight factor of the secondary feature vector is 50%; for human body features, the weight factor of the main feature vector is 20%, and the weight factor of the secondary feature vector is 15%.
[0068] As Figure 2 shown, there can be multiple categories of detection targets. For example, there are people, vehicles, etc. People can also be divided into two categories, such as adults and children. Therefore, according to the category of the detection target, the corresponding weight database can be found respectively. For example: adults correspond to weight database 1, children correspond to weight database 2, vehicles correspond to weight database 3, and so on.
[0069] Permission database: It contains the indexes of each weight database and the permission relationships between different weight databases.
[0070] For example, there are two weight databases, namely the resident weight database and the motor vehicle weight database. Then, the permission database contains the corresponding relationships and permission relationships of each resident and their corresponding motor vehicles in the two weight data. There are three relationships between the two weight databases, namely: AND, OR, and NOT. For example:
[0071] AND: [Weight database object 1] AND [Weight database object 2], which describes the relationship that two weight objects (such as resident weight and motor vehicle weight) must have an AND relationship. If they have an AND relationship, the permission verification passes and the alarm is not triggered. Otherwise, the permission verification fails and the alarm is triggered.
[0072] OR: [Weight database object 1] OR [Weight database object 2]. The described relationship means that the two weight objects must have an OR relationship, that is, at least one of them must exist. If the OR relationship is met, the permission verification passes and no alarm is triggered. Otherwise, the permission verification fails and an alarm is triggered.
[0073] NOT: [Weight database object 1] NOT [Weight database object 2]. The described relationship means that there is no relationship between the two weight objects, that is, it cannot be used for permission verification and no alarm needs to be triggered.
[0074] Inside the permission database, the relationships between various objects (i.e., the described detection targets) in each weight database are recorded in a regular expression manner.
[0075] For example, there are 3 weight databases: A1, B1, C1; and there are multiple targets in each weight database:
[0076] a1, a2, a3 (in A1);
[0077] b1, b2, b3 (in B1);
[0078] c1, c2, c3 (in C1).
[0079] The permission database records:
[0080] a1 AND b2, that is, a1 and b2 have an AND relationship;
[0081] a2 OR c3, that is, a2 and c3 have an OR relationship.
[0082] If two targets do not have an AND or OR relationship, the default is a NOT relationship.
[0083] That is, through the permission database, the mutual relationships between each target object under each weight database can be known.
[0084] In addition to the relationships between two target objects, the permission database can also record the relationships between more than two target objects, such as (a1 OR a2) AND b1.
[0085] Simply put, inside the permission database, the relationships between each target object under each weight database are recorded in a regular expression manner (if there is no relationship, it is a NOT relationship). The permission verification result is expressed by the value of the regular expression: [Weight database object 1] AND / OR [Weight database object 2] AND / OR... [Weight database object n]. If the value of the regular expression is true, the permission verification passes; if the value is false, the permission verification fails and an alarm is triggered.
[0086] The described event database is a database used to record events. For example, if the regular expressions A and B are recorded in the permission database and an alarm is triggered during a target detection, then the event database will record it. The role of the record is to support subsequent querying of the alarm record.
[0087] The working process of the multi-level distributed database is introduced as follows:
[0088] Establish the main feature vectors of each feature vector database: By importing the pictures or video streams of the human target or object target to be detected, the NVR intelligent module extracts each feature vector and stores each feature vector correspondingly in each feature database. For example, for a certain community, each resident and motor vehicle in the community are imported, and the NVR intelligent module builds models by itself to establish each feature vector database under the resident weight database and the motor vehicle weight database.
[0089] Configure the weight factors of each feature database under each weight database: For example, for the weight database corresponding to people, such as configuring the weight factor A1 of the face feature database and the weight factor A2 of the human body feature database. For the motor vehicle weight database, such as configuring the weight factor V1 of the license plate number feature database and the weight factor V2 of the vehicle special decoration (special feature decoration) database. The above are the basic weight factors of each configured weight database, that is, the default values. When a new target object is added to the weight database, each weight factor of the target object is filled with the default value. Subsequently, during actual detection, it is supported to modify the weight factors of each feature of each target to more reasonable values. In this way, each weight database is established. Of course, for newly added categories of targets, new weight databases can also be established.
[0090] Establish the permission database: In the initial state, the permission database is empty, indicating that there is a NOT relationship between each target object under each weight database, that is, there is no relationship between each target object. The relationship between each target object under each weight database is specified as an AND or OR relationship through regular expressions and saved in the permission database to establish the permission database in this way. For example, for a certain community, if the resident weight database and the motor vehicle weight database have been established, then each resident in the resident weight database is bound to the motor vehicle in the motor vehicle weight database with an AND or OR relationship.
[0091] Inspection of a single target: When a single recognized target is detected, such as a person, the NVR intelligent module extracts its various feature vectors, such as face features and human body features. The NVR intelligent module respectively gives the matching similarity M1 and M2 of each feature, and then calculates the final similarity according to the weight factors of each feature in the weight database through the binary weight method provided by the embodiments of the present application.
[0092] Verification of group target: Based on single target detection and combined with the permission database, regular permission judgment is carried out to determine whether the mutual relationship between each individual in the group meets the alarm conditions.
[0093] The following introduces the binary weight method for detecting single target provided by the embodiments of the present application.
[0094] For the conventional recognition of single targets, the weight factors are fixed. That is, once the weight factors are set, they remain unchanged during the target recognition process. Using the weight factors to recognize single targets at multiple levels has its reasonable elements, but fixing the weight factors also has its unreasonable elements. For example, when recognizing a person, some features of a person are constantly changing, such as the hairstyle and hair color of a person's hair, the body posture (height, weight, walking posture, etc.). The hair features and body features may change over time, but the weight factors of the features are set and fixed. If analyzed with a fixed weight, it is obviously unreasonable. Based on this, the embodiments of the present application propose a binary weight method to optimize this problem.
[0095] For a single target object, assume that its feature vectors with n features (including the main feature vector and the auxiliary feature vector) are stored in its corresponding feature database. The weight factors of the main feature vectors of the n features are F1, F2,..., Fn (already normalized); the weight factors of the auxiliary feature vectors of the n features are f1, f2,..., fn (already normalized).
[0096] Then the calculation process of the binary weight method proposed by the embodiments of the present application is as follows:
[0097] Step 1: In a certain recognition comparison, for any feature, the comparison similarities between this feature and the main feature vectors in the corresponding feature database of this feature are M1, M2,..., Mn respectively; and the comparison similarities between this feature and the auxiliary feature vectors in this feature database are m1, m2,..., mn respectively. For example, for face features, the comparison similarities between this face feature and each main feature vector in the face feature database are M1, M2,..., Mn respectively; and the comparison similarities between this face feature and the auxiliary feature vectors in this face feature database are m1, m2,..., mn respectively. The comparison of other features is the same.
[0098] Step 2: According to the comparison results of the main and auxiliary feature vectors, choose one of the two and adjust the weight factor. For a certain feature, if choosing the weight factor of one of the main and auxiliary features is more beneficial than choosing the other, then the weight factor of this feature chooses the more beneficial one. For example, the weight factor of feature i is calculated using the following formula :
[0099] , , where \(i\) is a positive integer.
[0100] Moreover, the similarity also needs to be calculated by making a corresponding binary selection. For example, the similarity obtained by comparing the feature vector of feature \(i\) with the feature vector in the feature database of feature \(i\) is calculated using the following formula:
[0101] , , where \(i\) is a positive integer.
[0102] Step 3: Re-normalize the weight factor , to obtain :
[0103] , , where \(i\), \(k\), and \(n\) are positive integers.
[0104] Step 4: Calculate the comprehensive similarity \(S\). According to the changed weight factor and the similarity , re-calculate the comprehensive similarity \(S\):
[0105] , , where \(i\) and \(n\) are positive integers.
[0106] According to to determine whether the recognized target object is successfully recognized. Assume is the recognition threshold for a certain recognition target, such as 80%. If ≥ 80%, it indicates that the target object is successfully recognized; otherwise, it indicates that the recognition fails.
[0107] If the recognition target is successful, the feature vectors of each feature extracted during the process of recognizing the target object are stored (or overwritten) in the auxiliary feature vectors of the corresponding feature database for this comparison target, and the main feature vector remains unchanged.
[0108] The above is the process of a complete binary weight method. For each recognition feature, the binary refers to the main feature vector and the auxiliary feature vector. The core idea of the binary weight method is that during the long-term recognition process of the target object, the latest features of the recognition target can be added and saved. During a certain recognition process, one that is more conducive to recognizing the target is mutually selected between the most original features (main feature vector) and the latest features (auxiliary feature vector), which can effectively solve the problem of the decline in target detection accuracy caused by the gradual change of the recognition target features (a person's hairstyle or body shape may change over time).
[0109] The following gives a practical example to illustrate the binary weight method.
[0110] Taking the identification of a single individual target object as an example, there are three feature databases, namely, the face feature database, the hair database (hair style, hair color, etc.), and the human body posture database (height, weight, walking posture, etc.). Assume that the comprehensive comparison similarity reaches 80% (for example) or more, then it can be determined that the comparison of the single individual target hits.
[0111] Now, identify a target. The main feature similarities of the three features are 0.9, 0.3, and 0.3 respectively, and the secondary feature similarities are 0.8, 0.7, and 0.6 respectively. After querying the weight database, the main feature weight factors of the three features are 0.8, 0.1, and 0.1 respectively, and the secondary feature weight factors of the three features are 0.7, 0.15, and 0.15 respectively.
[0112] According to the traditional calculation method, there is:
[0113] ;
[0114] Obviously , that is, the identification using the method of the existing technology does not hit.
[0115] If calculated according to the binary weight provided in the embodiment of the present application, then there is:
[0116] , ;
[0117] , ;
[0118] ;
[0119] ;
[0120] Similarly, it can be calculated that: F1(2)=0.15, M1(2)=0.7; F1(3)=0.15, M1(3)=0.6.
[0121] Normalize the weight factors:
[0122]
[0123] Calculate the binary comprehensive similarity:
[0124] ;
[0125] Obviously, , that is, by using the method provided in the embodiment of the present application, it can be identified and hit, that is, the target identification is successful.
[0126] Next, introduce the regular permission judgment method between group targets provided in the embodiment of the present application.
[0127] The binary weight method identifies a single target based on the different characteristics of the single target. After identifying the single target, the next step is to consider how to judge the relationship between multiple single targets (groups).
[0128] The permission database records the relationships between multiple single targets in the form of regular expressions (abbreviated as regex).
[0129] Suppose there are two weight databases, A and B (for example, A is the weight database of community residents, and B is the weight database of community motor vehicles). a1, a2,..., an are n target objects in A (i.e., n people), and b1, b2,..., bm are m target objects in B (i.e., m motor vehicles). Among them, n and m are both integers greater than or equal to 1, and they can be the same or different.
[0130] As recorded in the permission database , if the value is true, the permission verification passes and the alarm is not triggered; otherwise, the permission verification fails and the alarm is triggered.
[0131] It should be noted that adding [ ] to a1 and b1 respectively means that both a1 and b1 are detection subjects. [ ] is used to identify the detection subject. The role of the detection subject is to verify the truth or falsehood of the value of a regular expression. It must be verified centered around at least one detection subject. That is to say, there must be a detection subject among the identified detection targets before the permission verification is carried out. That is, when the detection target belongs to the detection subject, it is possible to trigger an alarm. For example, if the detected target is a child living in this community, then the permission verification needs to be carried out to verify whether other people (other detection targets) related to the child are his family members, that is, whether they are people with an associated relationship with the child. If not, the alarm is triggered; if so, the verification passes and the alarm may not be triggered.
[0132] If is true, it means that in a certain group detection, the detection subject must be identified, and the rest of the regular expression except the detection subject is true. That is, the a1 object and the b1 object must exist simultaneously, that is, the "and" relationship holds. If they do not exist simultaneously, it means that is false.
[0133] As recorded in the permission database , if the value is true, the permission verification passes and the alarm is not triggered; otherwise, the permission verification fails and the alarm is triggered. If If it is true, it means that during a certain group detection, the detection subject must be recognized, and the rest of the regular expression except the detection subject is true. That is, at least one of the a1 object and the b1 object must exist, that is, the "or" relationship holds. If none of them exist, it means it is false.
[0134] Such as the permission database record , if the value is true, the permission verification passes and the alarm is not triggered. Otherwise, the permission verification fails and the alarm is triggered. If is true, it means that during a certain group detection, if the detection subject b1 exists, that is, the detection subject b1 exists in the recognized detection targets, and at least one of a1 and a2 exists. If the detection subject b1 exists and neither a1 nor a2 exists, then is false.
[0135] Another case is is true, that is, it is detected that at least one of a1 and a2 exists, but b1 is not detected. At this time there is no need to determine true or false because the detection subject b1 is not detected. That is to say, if the detection subject does not exist in the detection target, there is no need to perform permission verification, that is, no judgment is made on whether it meets the alarm condition.
[0136] The following gives a specific example to illustrate how the group intelligence of the embodiment of the present application is configured and determined.
[0137] (1), Community gate permission verification, residents and non-motor vehicles.
[0138] A resident weight database A and a non-motor vehicle weight database B are established in advance. For a certain resident ai and a certain non-motor vehicle bj, where i and j are both integers greater than or equal to 1, and they can be the same or different. In the permission database, there is a regular expression recorded: .
[0139] The NVR intelligent module analyzes the real-time video stream data at the community gate, and uses each feature database, the resident weight database A, the non-motor vehicle weight database B, and the binary weight method provided by the embodiment of the present application to identify single targets one by one. When the detection target ai or bj is successfully recognized, because ai and bj are both pre-recorded as detection subjects in the permission database, therefore, by querying the permission database, it is known that ai or bj is the detection subject, and it is necessary to judge the true or false value of this regular expression. That is, continue to judge whether ai and bj exist simultaneously in the current detection target. If so, then is true, the permission passes, and the gate is released. If it is recognized that ai and bj do not exist simultaneously, then is false, and the alarm is triggered.
[0140] (2) Community gate access permission verification for residents and motor vehicles.
[0141] A resident weight database A and a motor vehicle weight database B are established in advance, which pre-record residents ai and motor vehicles bj, and there is a regular expression in the permission database: .
[0142] The NVR intelligent module analyzes the real-time video stream data at the community gate. Through each feature database, resident weight database A, motor vehicle weight database B, and binary weight method provided by the embodiments of the present application, each detection target is identified. When ai or bj is successfully identified, it can be known by querying the permission database that ai or bj is the detection subject, so it is necessary to judge the true or false value of this regular expression. Since the relationship between ai and bj in this regular expression is of the OR type, as long as one of the detection subjects exists, this regular expression is true and the permission verification passes. That is, as long as at least one of ai and bj is ensured, the permission can pass.
[0143] (3) Community gate access permission verification for the issue of children entering and leaving.
[0144] A resident adult weight database A and a resident child weight database B are established in advance, which pre-record adult residents ai and ak, and child residents bj. The regular expression is recorded in the permission database: .
[0145] The NVR intelligent module analyzes the real-time video stream data at the community gate. Through each feature database, resident adult weight database A, resident child weight database B, and binary weight method provided by the embodiments of the present application, each detection target is identified one by one. When resident adults ai or ak are identified, it can be known by querying the permission database that ai or ak is not the detection subject, so there is no need to judge the true or false value of this regular expression When the child bj is detected, it can be known by querying the permission database that bj is the detection subject, so it is necessary to judge the true or false of this regular expression That is, it is necessary to continue to judge whether ai or ak exists simultaneously in the current detection target. If at least one of ai and ak exists, it means is true and the permission passes. If neither ai nor ak exists, it means is false and an alarm is triggered.
[0146] The above are only examples for several application scenarios. In actual usage scenarios, setting the permissions of residents and non-motor vehicles to the AND type can effectively prevent the theft of non-motor vehicles in the community. Setting the permissions of residents and motor vehicles to the OR type can effectively improve the efficiency of community registration. For example, if a resident's friend drives the resident's car, they can directly enter the residential community, and the resident can also drive their friend's car directly into the residential community. Setting the permissions of children and family members to the AND type and the permissions among family members to the OR type can effectively prevent the occurrence of illegal child abduction incidents in the community.
[0147] In the embodiments of the present application, the community gate is used as an example for the convenience of description. The method provided by the embodiments of the present application is not limited to the above scenarios. The technical solutions provided by the embodiments of the present application are also applicable to places such as shopping malls, entertainment venues, office buildings, etc.
[0148] In summary, the technical solutions provided by the embodiments of the present application have the following advantages:
[0149] The method of binary weights for multiple features of a single recognition target proposed by the technical solutions provided by the embodiments of the present application can effectively solve the problem that the features of a single target change over time, resulting in a decrease in recognition accuracy.
[0150] Traditional intelligent comparison technologies based on a first-level database may reduce the recognition accuracy due to the poor angles of people and objects in the video. However, due to the design of the weight database in the technical solutions provided by the embodiments of the present application, a single recognition target is recognized through multiple features, which can effectively improve the recognition accuracy of a single recognition target.
[0151] Traditional intelligent comparison technologies based on a first-level database cannot achieve effects similar to group intelligent analysis. The intelligent comparison scheme of a multi-level distributed database proposed by the technical solutions provided by the embodiments of the present application can perform secondary intelligent analysis based on a primary intelligent analysis, analyze the binding and corresponding permission relationships between single targets among groups, and determine whether to issue an alarm notification based on the permission relationships. The technical solutions provided by the embodiments of the present application are more flexible and are also more conducive to being embedded in deeper business scenarios.
[0152] The technical solutions provided by the embodiments of the present application are summarized as follows:
[0153] See Figure 5 , regarding the above binary weight method, an information detection method provided by the embodiments of the present application includes:
[0154] S101. For each feature of the detection target, compare the feature with the main feature vector in the feature database corresponding to the feature to obtain the comparison similarity of the main feature vector of the feature (such as M1, M2,..., Mn mentioned above); and, compare the feature with the auxiliary feature vector in the feature database corresponding to the feature to obtain the comparison similarity of the auxiliary feature vector of the feature (such as m1, m2,..., mn mentioned above).
[0155] The detection target is, for example, a person, a vehicle, etc.
[0156] S102. For each of the above-mentioned features, based on the comparison similarity of the main feature vector of the feature, the comparison similarity of the auxiliary feature vector of the feature, the preset main feature weight factor (such as F1, F2,..., Fn mentioned above), and the preset auxiliary feature weight factor (such as f1, f2,..., fn mentioned above), determine the weight factor (such as ) and similarity (such as ) corresponding to the feature.
[0157] S103. Use the weight factor corresponding to each feature of the detection target to determine the normalized weight factor (such as ) of the detection target; and use the normalized weight factor of the detection target and the similarity corresponding to each feature of the detection target to determine the comprehensive similarity (such as ) of the detection target.
[0158] In some embodiments, the main feature weight factor and the auxiliary feature weight factor are preset in a preset weight database; the method further includes:
[0159] Determine the weight database corresponding to the detection target; the weight database includes the main feature weight factor and the auxiliary feature weight factor of at least one type of feature of the detection target.
[0160] In some embodiments, determine the corresponding weight database according to the category to which the detection target belongs.
[0161] For example, when it is recognized that the detection target is an adult, search for the weight database corresponding to adults; if it is recognized that the detection target is a child, search for the weight database corresponding to children; if it is recognized that the detection target is a vehicle, search for the weight database corresponding to vehicles.
[0162] In some embodiments, the weight database further includes the feature database index of at least one type of feature.
[0163] For example, in the weight database corresponding to adults or the weight database corresponding to children, both include the feature database index corresponding to facial features, the feature database index corresponding to human body features, the feature database index corresponding to hair features, and so on.
[0164] For each of the said features, in the weight database, determine the feature database index corresponding to the feature according to the category to which the feature belongs.
[0165] In some embodiments, when there are n such features for the detection target, for any feature i:
[0166] Determine the main feature weight factor of feature i And the comparison similarity with the main feature vector of feature i The product of , and the secondary feature weight factor of feature i And the comparison similarity with the secondary feature vector of feature i The product of ;
[0167] Subtract from , to obtain the first difference, and subtract from , to obtain the second difference, and calculate and The absolute value of the difference;
[0168] When the first difference is positive, multiply the ratio of the first difference to the absolute value by the main feature weight factor of feature i, and take the obtained value as the weight factor of feature i ;
[0169] When the second difference is positive, multiply the ratio of the second difference to the absolute value by the secondary feature weight factor of feature i, and take the obtained value as the weight factor of feature i .
[0170] In some embodiments, when there are n such features for the detection target, for any feature i:
[0171] Determine the main feature weight factor of feature i And the comparison similarity with the main feature vector of feature i The product of , and the secondary feature weight factor of feature i And the comparison similarity with the secondary feature vector of feature i The product of ;
[0172] Subtract from , a first difference is obtained, and is subtracted from to obtain a second difference, and the absolute value of the difference between and is calculated;
[0173] When the first difference is positive, the ratio of the first difference to the absolute value is multiplied by the similarity of the principal eigenvector of the feature i, and the obtained value is used as the similarity of the feature i ;
[0174] When the second difference is positive, the ratio of the second difference to the absolute value is multiplied by the similarity of the auxiliary eigenvector of the feature i, and the obtained value is used as the similarity of the feature i .
[0175] In some embodiments, when there are n such features for the detection target, for any feature i, the product of the normalized weight factor of the feature i and the similarity is determined, and the products corresponding to the n features are accumulated, and the obtained sum is used as the comprehensive similarity of the detection target.
[0176] In some embodiments, the method further includes:
[0177] When the comprehensive similarity of the detection target meets a preset condition, it is determined that the detection target is successfully recognized.
[0178] For example, if the comprehensive similarity of the detection target is greater than or equal to a preset threshold, it is determined that the detection target is successfully recognized.
[0179] In some embodiments, the method further includes:
[0180] When the comprehensive similarity of the detection target does not meet the preset condition, an alarm message is sent in a preset manner.
[0181] For example, if the comprehensive similarity of the detection target is less than the preset threshold, an alarm sound is emitted, and / or the detection target is prohibited from entering or leaving, and further, information related to the detection target can be sent to the management personnel, etc.
[0182] See Figure 6 , regarding the determination of the relationship between groups, that is, regarding whether the relationship between multiple detection targets meets the preset permissions, an information detection method provided by an embodiment of the present application includes:
[0183] S201. When there are multiple detection targets, for each detection target, the method as shown in Figure 5 is used to determine the comprehensive similarity of the detection target; when the comprehensive similarity of the detection target meets the preset condition, it is determined that the detection target is successfully recognized;
[0184] S202. If there is a preset detection subject among the successfully recognized detection targets among the multiple detection targets, then perform permission verification on the relationships among the successfully recognized detection targets among the multiple detection targets. If the permission verification passes, no alarm is triggered; otherwise, an alarm is triggered.
[0185] In some embodiments, performing permission verification on the relationships among the successfully recognized detection targets among the multiple detection targets. If the permission verification passes, no alarm is triggered; otherwise, an alarm is triggered, specifically including:
[0186] Determine whether the regular expression corresponding to the detection subject recorded in the preset permission database holds. If it holds, the permission verification passes; otherwise, an alarm is triggered. Among them, the relationships among multiple targets are pre-recorded in the permission database in the form of regular expressions.
[0187] In addition, in some embodiments, the alarm event can also be recorded in the event database, that is, record the relevant information about triggering the alarm, such as recording the video information about the detection target, etc., for subsequent staff to view.
[0188] Next, the device or apparatus provided by the embodiments of the present application is introduced. The explanations or illustrative examples of the same or corresponding technical features as those in the above method will not be repeated hereinafter.
[0189] See Figure 7 , correspondingly to the above method, an information detection device provided by the embodiments of the present application includes:
[0190] The first unit 11 is configured to, for each feature of the detection target, compare the feature with the main feature vector in the feature database corresponding to the feature to obtain the comparison similarity of the main feature vector of the feature (such as M1, M2,..., Mn as described above); and compare the feature with the auxiliary feature vector in the feature database corresponding to the feature to obtain the comparison similarity of the auxiliary feature vector of the feature (such as m1, m2,..., mn as described above);
[0191] The detection target, such as a person, a vehicle, etc.
[0192] The second unit 12 is configured to, for each of the features, based on the comparison similarity of the main feature vector of the feature, the comparison similarity of the auxiliary feature vector of the feature, the preset main feature weight factor (such as F1, F2,..., Fn as described above), and the preset auxiliary feature weight factor (such as f1, f2,..., fn as described above), determine the weight factor (such as ) and similarity (such as ) corresponding to the feature;
[0193] The third unit 13 is configured to determine a normalized weight factor of the detection target by using the weight factor corresponding to each feature of the detection target (such as the above ); and determine a comprehensive similarity of the detection target by using the normalized weight factor of the detection target and the similarity corresponding to each feature of the detection target (such as the above ).
[0194] In some embodiments, the main feature weight factor and the secondary feature weight factor are preset in a preset weight database; the first unit 11 is further configured to:
[0195] Determine the weight database corresponding to the detection target; the weight database includes the main feature weight factor and the secondary feature weight factor of at least one type of feature of the detection target.
[0196] In some embodiments, the first unit 11 determines the corresponding weight database according to the category to which the detection target belongs.
[0197] In some embodiments, the weight database further includes a feature database index of at least one type of feature;
[0198] For each of the features, the first unit 11 determines the feature database index corresponding to the feature in the weight database according to the category to which the feature belongs.
[0199] In some embodiments, when there are n such features of the detection target, for any feature i:
[0200] Determine the product of the main feature weight factor of feature i and the comparison similarity with the main feature vector of feature i ; and the product of the secondary feature weight factor of feature i and the comparison similarity with the secondary feature vector of feature i ; ; ;
[0201] Subtract from to obtain a first difference, and subtract from to obtain a second difference, and calculate the absolute value of the difference between and ;
[0202] When the first difference is positive, multiply the ratio of the first difference to the absolute value by the main feature weight factor of feature i, and use the obtained value as the weight factor of feature i ;
[0203] When the second difference is a positive number, multiply the ratio of the second difference to the absolute value by the auxiliary feature weight factor of feature i, and use the obtained value as the weight factor of feature i 。
[0204] In some embodiments, when there are n such features of the detection target, for any feature i:
[0205] Determine the main feature weight factor of feature i And compare the similarity with the main feature vector of feature i The product of , and the auxiliary feature weight factor of feature i And compare the similarity with the auxiliary feature vector of feature i The product of ;
[0206] Subtract from , to obtain the first difference, and subtract from , to obtain the second difference, and calculate and The absolute value of the difference;
[0207] When the first difference is a positive number, multiply the ratio of the first difference to the absolute value by the main feature vector comparison similarity of feature i, and use the obtained value as the similarity of feature i ;
[0208] When the second difference is a positive number, multiply the ratio of the second difference to the absolute value by the auxiliary feature vector comparison similarity of feature i, and use the obtained value as the similarity of feature i 。
[0209] In some embodiments, when there are n such features of the detection target, for any feature i, determine the product of the normalized weight factor and the similarity of feature i, accumulate the products corresponding to the n features, and use the obtained sum as the comprehensive similarity of the detection target.
[0210] In some embodiments, the third unit 13 is further configured to:
[0211] When the comprehensive similarity of the detection target meets a preset condition, determine that the detection target is successfully recognized.
[0212] In some embodiments, the third unit 13 is further configured to:
[0213] When the comprehensive similarity of the detection target does not meet the preset condition, send an alarm message in a preset manner.
[0214] In some embodiments, when there are multiple detection targets, the third unit 13 determines the comprehensive similarity of each detection target; when the comprehensive similarity of the detection target meets a preset condition, it is determined that the detection target is successfully recognized;
[0215] The third unit 13 is further configured to: if there is a preset detection subject among the successfully recognized detection targets among the multiple detection targets, perform a permission verification on the relationship between the successfully recognized detection targets among the multiple detection targets. If the permission verification passes, no alarm is triggered; otherwise, an alarm is triggered.
[0216] In some embodiments, performing a permission verification on the relationship between the successfully recognized detection targets among the multiple detection targets. If the permission verification passes, no alarm is triggered; otherwise, an alarm is triggered, specifically including:
[0217] Judge whether the regular expression corresponding to the detection subject recorded in the preset permission database holds. If it holds, the permission verification passes; otherwise, an alarm is triggered; wherein, the relationship between multiple targets is pre-recorded in the permission database in the form of a regular expression.
[0218] In addition, in some embodiments, the third unit 13 is further configured to record the alarm event in the event database, that is, record the relevant information about triggering the alarm, such as recording the video information about the detection target, etc., for subsequent staff to view.
[0219] It should be noted that the division of units in the embodiments of the present application is illustrative, only a logical function division. In actual implementation, there may be other division methods. In addition, in each embodiment of the present application, each functional unit may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0220] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processOR) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.
[0221] Another information detection device provided by the embodiments of this application can be, for example, a computing device, which can specifically be any type of terminal device, such as the aforementioned community gate, or other types of terminal devices, such as a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), etc.; of course, it can also be a network device.
[0222] For example, referring to Figure 8 , the information detection device may include a central processing unit (CPU) 600, a memory 620, an input / output device (i.e., a user interface 630), etc. The input device may include a keyboard, a mouse, a touch screen, etc. The output device may include a display device, such as a liquid crystal display (LCD), a cathode ray tube (CRT), etc. Additionally, it may also include modules such as a transceiver 610.
[0223] The memory may include a read-only memory (ROM) and a random access memory (RAM), and provide the program instructions and data stored in the memory to the processor. In the embodiments of this application, the memory can be used to store the program of any of the methods provided by the embodiments of this application.
[0224] By invoking the program instructions stored in the memory, the processor is used to execute any of the methods provided by the embodiments of this application according to the obtained program instructions.
[0225] Specifically, the processor 600 is used to read the program in the memory 620 and execute the following process:
[0226] For each feature of the detection target, compare the feature with the main feature vector in the feature database corresponding to the feature to obtain the comparison similarity of the main feature vector of the feature (such as M1, M2, ..., Mn mentioned above); and, compare the feature with the auxiliary feature vector in the feature database corresponding to the feature to obtain the comparison similarity of the auxiliary feature vector of the feature (such as m1, m2, ..., mn mentioned above).
[0227] The detection target is, for example, a person, a vehicle, etc.
[0228] For each of the above-mentioned features, based on the comparison similarity of the main feature vector of the feature, the comparison similarity of the auxiliary feature vector of the feature, the preset main feature weight factors (such as F1, F2, ..., Fn mentioned above), and the preset auxiliary feature weight factors (such as f1, f2, ..., fn mentioned above), determine the weight factor (such as ) and the similarity (such as ) corresponding to the feature;
[0229] Using the weight factor corresponding to each feature of the detection target, determine the normalized weight factor (such as ) of the detection target; and use the normalized weight factor of the detection target and the similarity corresponding to each feature of the detection target to determine the comprehensive similarity (such as ) of the detection target.
[0230] In some embodiments, the main feature weight factors and the auxiliary feature weight factors are preset in a preset weight database; the processor 600 is further configured to read the program in the memory 620 and execute the following process:
[0231] Determine the weight database corresponding to the detection target; the weight database includes the main feature weight factors and the auxiliary feature weight factors of at least one type of feature of the detection target.
[0232] In some embodiments, the processor 600 determines the corresponding weight database according to the category to which the detection target belongs.
[0233] For example, when it is recognized that the detection target is an adult, the weight database corresponding to adults is searched accordingly; if it is recognized that the detection target is a child, the weight database corresponding to children is searched accordingly; if it is recognized that the detection target is a vehicle, the weight database corresponding to vehicles is searched accordingly.
[0234] In some embodiments, the weight database further includes the feature database index of at least one type of feature;
[0235] For example, in the weight database corresponding to adults or the weight database corresponding to children, both include the feature database index corresponding to facial features, the feature database index corresponding to human body features, the feature database index corresponding to hair features, and so on.
[0236] For each of the said features, in the weight database, determine the feature database index corresponding to the feature according to the category to which the feature belongs.
[0237] In some embodiments, when there are n such features for the detection target, the processor 600 for any feature i:
[0238] Determine the main feature weight factor of feature i And the comparison similarity with the main feature vector of feature i Of the product , and the secondary feature weight factor of feature i And the comparison similarity with the secondary feature vector of feature i Of the product ;
[0239] Subtract From , to obtain the first difference, and subtract From , to obtain the second difference, and calculate And The absolute value of the difference;
[0240] When the first difference is positive, multiply the ratio of the first difference to the absolute value by the main feature weight factor of feature i, and take the obtained value as the weight factor of feature i ;
[0241] When the second difference is positive, multiply the ratio of the second difference to the absolute value by the secondary feature weight factor of feature i, and take the obtained value as the weight factor of feature i .
[0242] In some embodiments, when there are n such features for the detection target, the processor 600 for any feature i:
[0243] Determine the main feature weight factor of feature i And the comparison similarity with the main feature vector of feature i Of the product , and the secondary feature weight factor of feature i And the comparison similarity with the secondary feature vector of feature i Of the product ;
[0244] Subtract From , obtain a first difference value, and subtract , obtain a second difference value, and calculate and the absolute value of the difference between them;
[0245] When the first difference value is positive, multiply the ratio of the first difference value to the absolute value by the similarity of the principal eigenvector of the feature i, and use the obtained value as the similarity of the feature i ;
[0246] When the second difference value is positive, multiply the ratio of the second difference value to the absolute value by the similarity of the auxiliary eigenvector of the feature i, and use the obtained value as the similarity of the feature i .
[0247] In some embodiments, when there are n such features for the detection target, the processor 600 determines the product of the normalized weight factor and the similarity for any feature i, accumulates the products corresponding to the n features, and uses the obtained sum as the comprehensive similarity of the detection target.
[0248] In some embodiments, the processor 600 is further configured to:
[0249] When the comprehensive similarity of the detection target meets a preset condition, determine that the detection target is successfully recognized.
[0250] For example, if the comprehensive similarity of the detection target is greater than or equal to a preset threshold, determine that the detection target is successfully recognized.
[0251] In some embodiments, the processor 600 is further configured to:
[0252] When the comprehensive similarity of the detection target does not meet the preset condition, send an alarm message in a preset manner.
[0253] For example, if the comprehensive similarity of the detection target is less than the preset threshold, emit an alarm sound, and / or prohibit the detection target from entering or leaving, and further, information related to the detection target may be sent to the management personnel, etc.
[0254] Regarding determining the relationship between groups, that is, regarding determining whether the relationship between multiple detection targets meets the preset permissions, when there are multiple detection targets, the processor 600 determines the comprehensive similarity of each detection target; when the comprehensive similarity of the detection target meets the preset condition, determine that the detection target is successfully recognized;
[0255] The processor 600 is further configured to: if there is a preset detection subject among the successfully recognized detection targets among the multiple detection targets, perform permission verification on the relationships among the successfully recognized detection targets among the multiple detection targets, and if the permission verification passes, no alarm is triggered; otherwise, an alarm is triggered.
[0256] In some embodiments, performing permission verification on the relationships among the successfully recognized detection targets among the multiple detection targets, and if the permission verification passes, no alarm is triggered; otherwise, an alarm is triggered, specifically including:
[0257] Determine whether the regular expression corresponding to the detection subject recorded in the preset permission database holds. If it holds, the permission verification passes; otherwise, an alarm is triggered. Wherein, the relationships among multiple targets are pre-recorded in the permission database in the form of regular expressions.
[0258] In addition, in some embodiments, the processor 600 can also record the alarm event in the event database, that is, record the relevant information about triggering the alarm, such as recording the video information about the detection target, etc., for subsequent staff to view.
[0259] The transceiver 610 is configured to receive and send data under the control of the processor 600.
[0260] Among them, in Figure 8 The bus architecture may include any number of interconnected buses and bridges, specifically various circuits of one or more processors represented by the processor 600 and the memory represented by the memory 620 are linked together. The bus architecture can also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art, and therefore, they will not be further described herein. The bus interface provides an interface. The transceiver 610 may be multiple components, that is, including a transmitter and a receiver, and provides a unit for communicating with various other devices on the transmission medium. For different user devices, the user interface 630 may also be an interface capable of externally or internally connecting required devices, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, etc.
[0261] The processor 600 is responsible for managing the bus architecture and general processing, and the memory 620 can store the data used by the processor 600 when performing operations.
[0262] Optionally, the processor 600 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a CPLD (Complex Programmable Logic Device).
[0263] Embodiments of the present application also provide a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes any one of the methods in the foregoing embodiments. The program product may adopt any combination of one or more readable media. The readable media 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, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having 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 foregoing.
[0264] Embodiments of the present application provide a computer-readable storage medium for storing computer program instructions used for the device provided in the embodiments of the present application, and the computer-readable storage medium includes a program for executing any one of the methods provided in the embodiments of the present application. The computer-readable storage medium may be a non-transitory computer-readable medium.
[0265] The computer-readable storage medium may be any available medium or data storage device accessible by a computer, including but not limited to magnetic memories (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical memories (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor memories (such as ROM, EPROM, EEPROM, non-volatile memories (NAND FLASH), solid state drives (SSD)), etc.
[0266] It should be understood that:
[0267] The access technology through which entities in a communication network transmit traffic to and from each other can be any suitable current or future technology, such as WLAN (Wireless Local Area Network), WiMAX (Worldwide Interoperability for Microwave Access), LTE, LTE A, 5G, Bluetooth, infrared, etc.; additionally, embodiments can also apply wired technologies, for example, IP-based access technologies, such as wired networks or fixed lines.
[0268] Embodiments suitable for being implemented as software code or a part thereof and running using a processor or processing function are independent of the software code and can be specified using any known or future-developed programming language, such as high-level programming languages, such as objective C, C, C++, C#, Java, Python, Javascript, other scripting languages, etc., or low-level programming languages, such as machine language or assembler.
[0269] The implementation of embodiments is independent of hardware and can be implemented using any known or future-developed hardware technology or any combination thereof, such as a microprocessor or CPU (Central Processing Unit), MOS (Metal Oxide Semiconductor), CMOS (Complementary MOS), BiMOS (Bipolar MOS), BiCMOS (Bipolar CMOS), ECL (Emitter Coupled Logic) and / or TTL (Transistor Transistor Logic).
[0270] Embodiments can be implemented as a separate device, apparatus, unit, component or function, or in a distributed manner. For example, one or more processors or processing functions can be used or shared in a process, or one or more processing segments or processing parts can be used and shared in a process, where one physical processor or more than one physical processor can be used to implement one or more processing parts dedicated to a specific process as described.
[0271] The apparatus can be implemented by a semiconductor chip, chipset or (hardware) module including such a chip or chipset.
[0272] Embodiments can also be implemented as any combination of hardware and software, such as ASIC (Application-Specific IC (Integrated Circuit)) components, FPGA (Field Programmable Gate Array) or CPLD (Complex Programmable Logic Device) components or DSP (Digital Signal Processor) components.
[0273] Embodiments can also be implemented as a computer program product, including a computer-usable medium in which computer-readable program code is embodied, the computer-readable program code being adapted to execute the processes as described in the embodiments, where the computer-usable medium can be a non-transitory medium.
[0274] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0275] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the flows and / or blocks in the flowchart and / or block diagram can also be implemented. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0276] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0277] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0278] 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 equivalent technologies, the present application is also intended to include these changes and modifications.
Claims
1. An information detection method, characterized in that, Applied to the field of video surveillance, used to determine whether the detection target identified by video surveillance is successfully recognized. The method includes: For each feature of the detection target, compare the feature with the main feature vector in the feature database corresponding to the feature to obtain the comparison similarity of the main feature vector of the feature; and compare the feature with the auxiliary feature vector in the feature database corresponding to the feature to obtain the comparison similarity of the auxiliary feature vector of the feature. Wherein, the feature database contains feature vectors of at least one feature of at least one recognition target, and each feature contains a main feature vector and an auxiliary feature vector; any one of the feature vectors is a feature vector extracted for the detection target on the image; For each of the features, based on the comparison similarity of the main feature vector of the feature, the comparison similarity of the auxiliary feature vector of the feature, the preset main feature weight factor, and the preset auxiliary feature weight factor, determine that the weight factor and similarity corresponding to the feature are respectively the main feature weight factor and the comparison similarity of the main feature vector of the feature, or respectively the auxiliary feature weight factor and the comparison similarity of the auxiliary feature vector of the feature; Use the weight factor corresponding to each feature of the detection target to determine the normalized weight factor of the detection target; and use the normalized weight factor of the detection target and the similarity corresponding to each feature of the detection target to determine the comprehensive similarity of the detection target. Determine whether the recognized detection target is successfully recognized according to the comprehensive similarity.
2. The method according to claim 1, wherein For each of the features, based on the comparison similarity of the main feature vector of the feature, the comparison similarity of the auxiliary feature vector of the feature, the preset main feature weight factor, and the preset auxiliary feature weight factor, determine that the weight factor and similarity corresponding to the feature are respectively the main feature weight factor and the comparison similarity of the main feature vector of the feature, or respectively the auxiliary feature weight factor and the comparison similarity of the auxiliary feature vector of the feature, including: When there are n such features for the detection target, for any feature i: Determine the product Fi*Mi of the main feature weight factor Fi of feature i and the comparison similarity Mi of the main feature vector of feature i, and the product fi*mi of the auxiliary feature weight factor fi of feature i and the comparison similarity mi of the auxiliary feature vector of feature i; Subtract fi*mi from Fi*Mi to obtain a first difference, subtract Fi*Mi from fi*mi to obtain a second difference, and calculate the absolute value of the difference between Fi*Mi and fi*mi; When the first difference is positive, multiply the ratio of the first difference to the absolute value by the main feature weight factor of feature i, and take the obtained value as the weight factor F1(i) of feature i; multiply the ratio of the first difference to the absolute value by the comparison similarity of the main feature vector of feature i, and take the obtained value as the similarity M1(i) of feature i; When the second difference is a positive number, multiply the ratio of the second difference to the absolute value by the auxiliary feature weight factor of feature i, and use the obtained value as the weight factor F1(i) of feature i; multiply the ratio of the second difference to the absolute value by the similarity of the auxiliary feature vector comparison of feature i, and use the obtained value as the similarity M1(i) of feature i.
3. The method according to claim 1, characterized in that, The main feature weight factor and the auxiliary feature weight factor are preset in a preset weight database; The method further includes: Determine the weight database corresponding to the detection target; the weight database includes the main feature weight factor and the auxiliary feature weight factor of at least one category of features of the detection target.
4. The method according to claim 3, wherein Determine the corresponding weight database according to the category to which the detection target belongs.
5. The method according to claim 3, characterized in that, The weight database further includes a feature database index of at least one category of features; For each of the features, in the weight database, determine the feature database index corresponding to the feature according to the category to which the feature belongs.
6. The method according to claim 1, characterized in that, When there are n such features for the detection target, for any feature i, determine the product of the normalized weight factor and the similarity of feature i, accumulate the products corresponding to the n features, and use the obtained sum as the comprehensive similarity of the detection target.
7. The method according to claim 1, characterized in that Judging whether the detected detection target is successfully recognized according to the comprehensive similarity includes: When the comprehensive similarity of the detection target meets a preset condition, determine that the detection target is successfully recognized.
8. The method according to claim 1, wherein The method further includes: When it is determined that the detected detection target is successfully recognized according to the comprehensive similarity, for each feature of the detection target, store or overwrite the feature vector of the feature into the auxiliary feature vector of the feature database corresponding to the feature.
9. The method according to claim 1, wherein Judging whether the detected detection target is successfully recognized according to the comprehensive similarity includes: When the comprehensive similarity of the detection target does not meet the preset condition, send an alarm message in a preset manner.
10. An information detection method, characterized in that, Applied to the field of video surveillance, the method includes: When there are multiple detection targets, for each of the detection targets, use the method described in claim 1 to determine the comprehensive similarity of the detection target; when the comprehensive similarity of the detection target meets the preset condition, determine that the detection target is successfully recognized; If there is a preset detection subject among the successfully recognized detection targets among the multiple detection targets, perform a permission check on the relationship between the successfully recognized detection targets among the multiple detection targets. If the permission check passes, no alarm is triggered; otherwise, an alarm is triggered.
11. The method according to claim 10, characterized in that, Performing a permission check on the relationship between the successfully recognized detection targets among the multiple detection targets. If the permission check passes, no alarm is triggered; otherwise, an alarm is triggered, specifically including: Judge whether the regular expression corresponding to the detection subject recorded in the preset permission database holds. If it holds, the permission check passes; otherwise, an alarm is triggered; wherein, the relationship between multiple targets is pre-recorded in the permission database in the form of a regular expression.
12. An information detection device, characterized in that, Applied to the field of video surveillance, including: A memory for storing program instructions; A processor for calling program instructions stored in the memory and executing the method according to any one of claims 1 to 11 according to the obtained program.
13. A computer program product for a computer, characterized in that, Applied to the field of video surveillance, including a software code part, which is used to execute the method according to any one of claims 1 to 11 when the product runs on the computer.
14. A computer-readable storage medium, characterized in that, Applied to the field of video surveillance, the computer-readable storage medium stores computer-executable instructions for causing the computer to execute the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Dynamic face recognition method and device based on video streaming
CN111860165A
Facial recognition method and apparatus, electronic device and computer-readable medium
WO2020038136A1