Real-time early warning method and system based on deep learning for feature recognition
By using deep learning-based feature recognition methods and leveraging clustering and matching degree groups, the computational load is reduced, improving the timeliness and accuracy of early warnings for video tracking in the Industrial Internet and solving the problem of early warning delays caused by excessive computation.
Patent Information
- Application Number
- CN202310307430.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-27
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2043-03-27
AI Technical Summary
When conducting real-time online analysis in the Industrial Internet, the large amount of target data in the video leads to excessive computational load, affecting the timeliness of early warning.
A feature recognition method based on deep learning is adopted. By obtaining the matching degree group between the feature vector to be detected and the cluster, feature vectors with matching degree greater than a preset threshold are detected. The number of targets q is determined according to the matching degree list and weight coefficient, which reduces the amount of computation and improves the timeliness and accuracy of the warning.
By reducing computational load, the timeliness and accuracy of early warnings are improved, the possibility of computational backlog is reduced, and the online analysis and early warning effect of video tracking in the industrial internet is enhanced.
Smart Images

Figure CN116310458B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data processing, in particular to a real-time early warning method and system based on deep learning for feature recognition. BACKGROUND
[0002] Industrial Internet is a new generation of information communication technology and industrial economy deep integration of new infrastructure, application mode and industrial ecology, through the overall connection of people, machines, things, systems, etc., a new manufacturing and service system covering the whole industry chain, the whole value chain is built, which provides an implementation approach for the development of industrial and even industrial digitization, networking and intelligentization.
[0003] At present, large-scale real-time online analysis technology will be applied in industrial internet. When performing real-time online analysis, the data of a plurality of targets will be obtained based on video tracking, that is, the targets in the video will be identified to obtain the data of a plurality of targets, and a corresponding feature vector is obtained according to the data of each target. Among them, the target can be a human body or equipment in an industrial production environment, and the data of the target is the image of the target. After obtaining the feature vector corresponding to the data of any target, the feature vector can be matched and compared with a plurality of preset feature vectors in a database one by one. If the matching degree of the feature vector and any preset feature vector is greater than a preset value, it means that the target corresponding to the feature vector is more likely to be a sensitive target, and at this time, an early warning is performed.
[0004] However, in actual application, there are a large number of target data in the video, and even in some videos, thousands of target data will be generated per second, and the preset feature vectors in the database are generally more, so when the feature vector corresponding to each target data in the video is matched and compared with each preset feature vector in the database, the calculation amount is too large, which may cause the accumulation of calculation amount, so that the timeliness of the early warning is poor. SUMMARY
[0005] In view of the above technical problems, the technical scheme adopted by the present application is:
[0006] According to one aspect of the present application, a real-time early warning method based on deep learning for feature recognition is provided, which comprises:
[0007] S100, obtaining a matching degree group C=(c1, c2,...,cL) corresponding to a to-be-detected feature vector, j=1, 2,...,L; wherein the to-be-detected feature vector is a feature vector corresponding to to-be-detected data; c j ,...,c L ), j=1, 2,...,L; wherein the to-be-detected feature vector is a feature vector corresponding to to-be-detected data; c jThe matching degree of the to-be-detected feature vector and the cluster center vector corresponding to the jth cluster, each cluster including a plurality of feature vectors of target object data, any two feature vectors in all clusters being different, c1≥c2≥...≥c j ≥...≥c L ; L is a preset number of cluster.
[0008] S200, detecting whether there is a feature vector with a matching degree greater than a preset threshold in the cluster corresponding to c1, c2,..., c q ; if yes, a warning is given; q is a target number.
[0009] The determination method of q includes the following steps:
[0010] S210, taking at least part of the feature vectors in all clusters as target feature vectors.
[0011] S220, obtaining a preset feature vector group T=(t1, t2,..., t r ,...,t s ), r=1, 2,..., s; wherein t r is a preset feature vector with a matching degree greater than a preset threshold with the rth target feature vector, and s is a number of target feature vectors.
[0012] S230, obtaining a matching degree list D=(d1, d2,..., d r ,...,d s ), d r =(d r1 ,d r2 ,...,d rj ,...,d rL ); wherein d r is a matching degree group corresponding to t r , and d r is a matching degree of t r and the cluster center vector corresponding to the jth cluster.
[0013] S240, sorting the matching degrees in d r in descending order to obtain a sorted matching degree group d r corresponding to d r 1 , to obtain a sorted matching degree list D 1 =(d1 1 ,d2 1 ,...,d r 1 ,...,d s 1 ), d r1 =(d r1 1 ,d r2 1 ,...,d rj 1 ,...,d rL 1 ), where d r1 1 ≥d r2 1 ≥...≥d rj 1 ≥...≥d rL 1 .
[0014] S250, according to D 1 , get the sequence array NUM=(num1,num2,...,num r ,...,num s ); where num r t r The matching degree of the cluster where the corresponding target feature vector is located is d r 1 The ordinal number in .
[0015] S260, determine whether the reference number ceil(w1*n / (L*acy)) is less than L; if so, determine q=ceil(w1*n / (L*acy)); where ceil() is a preset upward rounding function, w1 is a first weight coefficient, 0<w1<1; n is the total number of eigenvectors in all clusters, acy is the influence coefficient, acy=ber / s, ber is a number in NUM that is less than or equal to the reference ordinal number num ave The number of ordinal numbers, num ave =(∑ r=1 s num r ) / s.
[0016] According to another aspect of the present invention, a real-time warning system for feature recognition based on deep learning is also provided. The real-time warning system includes a first device and several second devices connected to the first device. The above-mentioned real-time warning method is applied to the first device, and each cluster is used to be stored in any second device. At least two of the L clusters are stored in different second devices.
[0017] Step S200 includes the following steps:
[0018] S201, send the feature vector to be detected to c1, c2, ..., c q The second device where the corresponding cluster is located.
[0019] Each second device is configured to perform the following steps:
[0020] S310, in response to receiving the feature vector to be detected, determining c1, c2,..., c q Each cluster in the corresponding cluster in which each second device exists as a cluster to be detected.
[0021] S320, determining whether there is a feature vector in all clusters to be detected, which has a matching degree greater than a preset threshold with the feature vector to be detected; if yes, returning a warning instruction to the first device.
[0022] After step S201, step S200 further includes the following steps:
[0023] S202, if the warning instruction is received, performing a warning.
[0024] According to another aspect of the present application, there is also provided a real-time warning device for feature recognition based on deep learning, which comprises:
[0025] an acquisition module configured to acquire a matching degree group C = (c1, c2,..., c j ..., c L ), j = 1, 2,..., L corresponding to a feature vector to be detected; wherein the feature vector to be detected is a feature vector corresponding to data to be detected; c j is a matching degree of the feature vector to be detected and a cluster center vector corresponding to the jth cluster; each cluster includes a plurality of feature vectors of target object data, any two feature vectors in all clusters are different, c1≥ c2≥... ≥ c j ≥... ≥ c L ; L is a preset number of clusters.
[0026] a detection module configured to detect whether there is a feature vector in the corresponding cluster of c1, c2,..., c q , which has a matching degree greater than a preset threshold with the feature vector to be detected; if yes, performing a warning; q is a target number.
[0027] wherein the determination method of q includes the following steps:
[0028] S210, taking at least part of the feature vectors in all clusters as target feature vectors.
[0029] S220, acquiring a preset feature vector group T = (t1, t2,..., t r ..., t s ), r = 1, 2,..., s; wherein t ris a preset feature vector whose matching degree with the rth target feature vector is greater than the preset threshold, and s is the number of target feature vectors.
[0030] S230, obtain the matching degree list D = (d1, d2, ..., d r ,...,d s ), d r =(d r1 ,d r2 ,...,d rj ,...,d rL ), where d r t r The corresponding matching degree group, d r t r The matching degree of the cluster center vector corresponding to the j-th cluster.
[0031] S240, d r The matching degrees in the d are sorted in ascending order, and d r The corresponding sorted matching degree group d r 1 , to get the sorted matching list D 1 =(d1 1 ,d2 1 ,...,d r 1 ,...,d s 1 ), d r 1 =(d r1 1 ,d r2 1 ,...,d rj 1 ,...,d rL 1 ), where d r1 1 ≥d r2 1 ≥...≥d rj 1 ≥...≥d rL 1 .
[0032] S250, according to D 1 , get the sequence array NUM=(num1,num2,...,num r ,...,num s ); where num r t r The matching degree of the cluster where the corresponding target feature vector is located is d r1 the ordinal number in NUM.
[0033] S260, determining whether the reference number ceil(w1*n / (L*acy)) is less than L; if yes, determining that q=ceil(w1*n / (L*acy)); wherein ceil() is a preset rounding-up function, w1 is a first weight coefficient, 0 ave < w1 < 1; n is the total number of feature vectors in all the clustering clusters, and acy is an influence coefficient, acy=ber / s, ber is the number of ordinal numbers in NUM that are less than or equal to the reference ordinal number num ave r=1 s num r ) / s.
[0034] According to another aspect of the present application, there is also provided a non-transitory computer readable storage medium, the storage medium storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by a processor to implement the above real-time warning method based on deep learning for feature recognition.
[0035] According to another aspect of the present application, there is also provided an electronic device comprising a processor and the above non-transitory computer readable storage medium.
[0036] The present application has at least the following beneficial effects:
[0037] In the present application, a matching degree group C is obtained according to the to-be-detected feature vector and the feature vector corresponding to each clustering cluster, and it is detected whether there is a feature vector in the clustering cluster corresponding to the larger q matching degrees in C, which has a matching degree greater than a preset threshold with the to-be-detected feature vector, if yes, a warning is given. Compared with detecting whether there is a feature vector in each clustering cluster, which has a matching degree greater than a preset threshold with the to-be-detected feature vector, in the case that q is less than the number L of clustering clusters, the present application can reduce the number of feature vectors that are matched with the to-be-detected feature vector for matching degree calculation, and thus can reduce the calculation amount, so as to reduce the possibility of calculation amount backlog, and achieve the purpose of improving the timeliness of the warning.
[0038] Further, since acy=ber / s, and ber is the number of ordinal numbers in NUM that are less than or equal to the reference ordinal number num ave The greater the acy, the greater the ber, and the greater the acy, the greater the number of preset feature vectors in T that have a smaller ordinal number in the corresponding matching degree group of the cluster center vector of the cluster to which the corresponding target feature vector belongs among the s preset feature vectors, and the greater the ber. Therefore, the greater the acy, the greater the number of preset feature vectors in T that will be warned after the to-be-detected feature vector passes through steps S100 and S200, so that the acy is greater, and the accuracy of the warning by the real-time warning method is higher. The acy is used to represent the accuracy of the warning. In the present application, the determination of q not only considers the total number n of feature vectors in all clusters and the number L of clusters, but also considers the acy used to represent the accuracy of the warning. Compared with the preset value of q, a smaller q can be used when the accuracy of the warning is higher, and the purpose of further improving the timeliness of the warning is achieved.
[0039] In addition, when video tracking is performed, the real-time warning method in the present application can be combined with large-scale real-time online analysis of industrial internet to improve the timeliness of online analysis based on video tracking. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0041] Figure 1 The real-time warning method flowchart for feature recognition based on deep learning provided by the embodiments of the present application. DETAILED DESCRIPTION
[0042] The technical solutions in the embodiments of the present application will be described clearly and completely 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 of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0043] The embodiments of the present application provide a real-time warning method for feature recognition based on deep learning, wherein the method can be completed by any one or any combination of the following: terminal, server, other devices with processing capability, which are not limited by the embodiments of the present application.
[0044] The technical solutions in the embodiments of the present application will be described clearly and completely 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 of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application. Figure 1The flowchart of the real-time early warning method based on deep learning feature recognition is shown, and the real-time early warning method based on deep learning feature recognition is introduced.
[0045] The real-time early warning method comprises the following steps:
[0046] S100, obtaining a matching degree group C=(c1, c2,..., c j ,...,c L ), j=1, 2,..., L corresponding to the to-be-detected feature vector.
[0047] Wherein, the to-be-detected feature vector is the feature vector corresponding to the to-be-detected data; c j is the matching degree of the to-be-detected feature vector and the cluster center vector corresponding to the jth cluster, each cluster includes several feature vectors of target object data, any two feature vectors in all clusters are different, c1≥c2≥...≥c j ≥...≥c L ; L is the number of preset clusters.
[0048] Specifically, the to-be-detected data is a to-be-detected image, and the matching degree is a similarity, preferably, the matching degree is a cosine similarity. The target object can be a human body or equipment in an industrial production environment, and the corresponding target object data is a human body image or equipment image. The cluster center vector corresponding to each cluster is a cluster center vector determined based on each feature vector included in the cluster.
[0049] One specific embodiment of the above step S100 can be that the target video is recognized by a deep learning model to obtain data of several target objects, and any target object data is used as to-be-detected data. If the target video is a real-time updated video such as a monitoring video, the to-be-detected data is the data of the target object in the data generated by the target video at present. After obtaining the to-be-detected data, the feature vector corresponding to the to-be-detected data can also be obtained by the deep learning model, that is, the to-be-detected feature vector is obtained, and then the matching degree group C corresponding to the to-be-detected feature vector is obtained.
[0050] S200, detecting whether there is a feature vector with a matching degree greater than a preset threshold in the cluster corresponding to c1, c2,..., c q corresponding to the to-be-detected feature vector; if yes, early warning is performed.
[0051] Wherein, q is the target number.
[0052] Optionally, the preset threshold is 80%-99%, and preferably, the preset threshold is 95%.
[0053] A specific embodiment of the step S200 is that each feature vector in the clustering cluster corresponding to the first q matching degrees in C and the matching degree of the feature vector to be detected are all taken as target matching degrees, and it is determined whether the minimum target matching degree among all target matching degrees is greater than a preset threshold value, and if yes, an identifier indicating that the detection fails is displayed and the target object data corresponding to the minimum target matching degree among all target matching degrees is output.
[0054] The determination method of q includes the following steps:
[0055] S210, taking at least part of the feature vectors in all clustering clusters as target feature vectors.
[0056] S220, obtaining a preset feature vector group T=(t1, t2,..., t r ,...,t s ), r=1, 2,..., s.
[0057] Wherein, t r is a preset feature vector with a matching degree greater than a preset threshold value with the rth target feature vector, and s is the number of target feature vectors.
[0058] S230, obtaining a matching degree list D=(d1, d2,..., d r ,...,d s ), d r =(d r1 ,d r2 ,...,d rj ,...,d rL ).
[0059] Wherein, d r is a matching degree group corresponding to t r , and d r is a matching degree of t r with the jth clustering cluster center vector.
[0060] S240, the matching degrees in d r are sorted in descending order to obtain a sorted matching degree group d r corresponding to d r 1 , to obtain a sorted matching degree list D 1 =(d1 1 ,d2 1 ,...,d r 1 ,...,d s 1 ), d r 1 =(d r11 d r2 1 d rj 1 d rL 1 .
[0061] wherein d r1 1 ≥ d r2 1 ≥... ≥ d rj 1 ≥... ≥ d rL 1 .
[0062] S250, according to D 1 , obtaining a sequence group NUM = (num1, num2,..., num r ,..., num s ).
[0063] wherein num r is the ordinal number of the matching degree corresponding to the cluster corresponding to the target feature vector of t r . r 1
[0064] S260, determining whether the reference quantity ceil(w1*n / (L*acy)) is less than L; if yes, determining that q = ceil(w1*n / (L*acy)).
[0065] wherein ceil() is a preset upward rounding function, w1 is a first weight coefficient, 0 < w1 < 1; n is the total quantity of feature vectors in all cluster groups, and acy is an influence coefficient, acy = ber / s, ber is the quantity of ordinal numbers in NUM less than or equal to the reference ordinal number num ave , num ave = (∑ r=1 s num r ) / s.
[0066] Preferably, w1 = 0.2.
[0067] Therefore, according to the application, the matching degree group C is obtained according to the to-be-detected feature vector and the feature vector corresponding to each cluster, and it is detected whether there is a feature vector in the cluster corresponding to the larger q matching degrees in C, which has a matching degree greater than the preset threshold with the to-be-detected feature vector, and if so, a pre-warning is performed. Compared with detecting whether there is a feature vector in each cluster, which has a matching degree greater than the preset threshold with the to-be-detected feature vector, in the case that q is less than the number L of clusters, the number of feature vectors that are matched with the to-be-detected feature vector for matching degree calculation can be reduced in the application, and thus the calculation amount can be reduced to reduce the possibility of calculation backlog, so that the timeliness of pre-warning is improved.
[0068] Further, since acy=ber / s, and ber is the number of ordinal numbers in NUM that are less than or equal to the reference ordinal number num ave , therefore, the larger acy is, the larger ber is, at this time, it is indicated that the more preset feature vectors in the s preset feature vectors in T have smaller ordinal numbers in the corresponding matching degree group, which are matching degrees of cluster center vectors of the cluster where the corresponding target feature vector is located, and thus the larger ber is, the larger the number of preset feature vectors in T that will be pre-warned after the to-be-detected feature vector passes through steps S100 and S200, so that acy is larger, and the accuracy of pre-warning by the above real-time pre-warning method is higher, that is, acy is used to represent the accuracy of pre-warning. In the application, the determination of q not only considers the total number n of feature vectors in all clusters and the number L of clusters, but also considers acy, which is used to represent the accuracy of pre-warning. Compared with q being a preset constant value, in the application, a smaller q can be used when the accuracy of pre-warning is higher, and thus the timeliness of pre-warning is further improved.
[0069] In addition, when video tracking is performed, the real-time pre-warning method in the application can be combined with large-scale real-time online analysis of industrial internet to improve the timeliness of pre-warning based on online analysis of video tracking.
[0070] Optionally, step S210 comprises the following steps:
[0071] S211, obtaining a cluster group V=(v1, v2,..., v j ,..., v L ).
[0072] Wherein, v j is the jth cluster, v j =(v j 1 ,v j 2 ,...,v j k ,...,vj m(j) ), k=1,2,...,m(j);v j k v j The kth eigenvector included; m(j) is v j The number of eigenvectors included, ∑ k=1 L m(k)=n; any two eigenvectors in V are different.
[0073] S212, in v j A preset number pre of feature vectors are randomly selected as target feature vectors; m(j)≥pre.
[0074] Optional, pre=1.
[0075] It can be seen from this that the present invention selects the same number of feature vectors from each cluster as target feature vectors. Compared with randomly selecting feature vectors from all clusters as target feature vectors, the present invention can make the target feature vectors more evenly distributed in several clusters, and then the acy determined according to the target feature vector can more comprehensively reflect the accuracy of the warning, and then reduce the possibility of low warning accuracy of the real-time warning method due to unreasonable q setting, thereby achieving the purpose of improving the warning accuracy of the real-time warning method.
[0076] Optional, pre=ceil(w2*m min ).
[0077] Wherein, w2 is the second weight coefficient, 0.001≤w2≤0.2; m min is the minimum number, m min =min(m(1),m(2),...,m(j),...,m(L)).
[0078] Preferably, w2=0.005.
[0079] Optionally, step S260 includes the following steps:
[0080] S261, determine whether the reference quantity ceil(w1*n / (L*acy)) is less than or equal to L; if so, determine q=ceil(w1*n / (L*acy)); otherwise, determine q=L.
[0081] Optionally, V is obtained by clustering the eigenvectors in the eigenvector group A according to L, A=(a1, a2, ..., a i ,...,a n ), i=1,2,...,n; where, a iThe feature vector of the preset ith target object data is different from any two feature vectors in A.
[0082] Specifically, the method for obtaining V includes the following steps:
[0083] S111, obtaining a feature vector group A=(a1, a2,..., an) from the target object data. i ,...,a n ), i=1, 2,..., n.
[0084] Wherein, a i is the feature vector of the ith target object data; any two feature vectors in A are different;
[0085] S112, clustering the n feature vectors in A according to L to obtain a cluster group V=(v1, v2,..., vm). j ,...,v L ).
[0086] Wherein, v j is the jth cluster, v j =(v j 1 ,v j 2 ,...,v j k ,...,v j m(j) ), k=1, 2,..., m(j); v j k is the kth feature vector included in v j , v j k is any one in A; m(j) is the number of feature vectors included in v j , ∑ k=1 L m(k)=n; any two feature vectors in V are different.
[0087] The embodiment of the application further provides a real-time early warning system for feature recognition based on deep learning, which comprises a first device and a plurality of second devices connected with the first device, the real-time early warning method is applied to the first device, each cluster is used for storing in any second device, and at least two clusters in the L clusters are stored in different second devices.
[0088] Specifically, the first device and the second device can be a terminal, a server or other devices with processing capability, and the embodiment of the application does not make any limitation.
[0089] Based on this, step S200 includes the following steps:
[0090] S201, sending a to-be-detected feature vector to c1, c2,..., c q The second device where the corresponding cluster is located.
[0091] Each second device is configured to perform the following steps:
[0092] S310, in response to receiving the to-be-detected feature vector, sending c1, c2,..., c q Each cluster in the corresponding cluster that exists in the second device is taken as a to-be-detected cluster.
[0093] S320, determining whether there is a feature vector with a matching degree greater than a preset threshold in all to-be-detected clusters; if yes, returning a warning instruction to the first device.
[0094] After step S201, step S200 further includes the following steps:
[0095] S202, if the warning instruction is received, performing a warning.
[0096] Therefore, at least part of the clusters are stored in different second devices, and the matching degree calculation of the cluster and the to-be-detected feature vector is performed in the second device, thereby reducing the calculation amount of the first device and each second device, and thus reducing the possibility of abnormal situations such as lag or death of the real-time warning system.
[0097] Optionally, after step S201, step S200 further includes the following steps:
[0098] S203, if the warning instruction is not received after a preset time period, displaying an identifier for indicating passing detection.
[0099] Embodiments of the present application also provide a real-time warning device for feature recognition based on deep learning, which comprises:
[0100] An acquisition module is configured to acquire a matching degree group C=(c1, c2,..., c j ,...,c L ), j=1, 2,..., L corresponding to a to-be-detected feature vector; wherein the to-be-detected feature vector is a feature vector corresponding to to-be-detected data; c j is a matching degree of the to-be-detected feature vector and a cluster center vector corresponding to the jth cluster, each cluster includes a plurality of feature vectors of target object data, any two feature vectors in all clusters are different, c1≥c2≥...≥c j ≥...≥c L ; L is a preset number of clusters.
[0101] The detection module is configured to detect whether there is a feature vector in the corresponding cluster that has a matching degree greater than a preset threshold with the feature vector to be detected; if yes, a pre-warning is performed; q is a target number; q whether there is a feature vector in the corresponding cluster that has a matching degree greater than a preset threshold with the feature vector to be detected; if yes, a pre-warning is performed; q is a target number;
[0102] The real-time pre-warning device further comprises a determination module, and q is determined by the determination module. The determination module is configured to:
[0103] all the feature vectors in all the clusters are taken as target feature vectors;
[0104] obtain a preset feature vector group T=(t1, t2,..., t r ,...,t s ), r=1, 2,..., s; wherein t r is a preset feature vector having a matching degree greater than a preset threshold with the rth target feature vector, and s is the number of target feature vectors;
[0105] obtain a matching degree list D=(d1, d2,..., d r ,...,d s ), d r =(d r1 ,d r2 ,...,d rj ,...,d rL ); wherein d r is a matching degree group corresponding to t r , and d r is a matching degree of t r with a cluster center vector corresponding to the jth cluster;
[0106] sort the matching degrees in d r in descending order to obtain a sorted matching degree group d r corresponding to d r 1 , to obtain a sorted matching degree list D 1 =(d1 1 ,d2 1 ,...,d r 1 ,...,d s 1 ); wherein d r 1 =(d r1 1 ,d r2 1 ,...,d rj 1 ,...,d rL 1 ; wherein dr1 1 ≥d r2 1 ≥...≥d rj 1 ≥...≥d rL 1 ;
[0107] According to D 1 , a sequence group NUM=(num1, num2,..., num r ,...,num s ) is obtained; wherein num r is the sequence number of the matching degree corresponding to the target feature vector corresponding to t r in d r 1 ;
[0108] It is determined whether the reference quantity ceil(w1*n / (L*acy)) is less than L; if yes, q=ceil(w1*n / (L*acy)) is determined; wherein ceil() is a preset rounding-up function, w1 is a first weight coefficient, 0 ave ave n is the total number of feature vectors in all clustering clusters, and acy is an influence coefficient, acy=ber / s, ber is the number of sequence numbers in NUM less than or equal to the reference sequence number num r=1 s num r / s.
[0109] Optionally, the determination module is further configured to:
[0110] A clustering cluster group V=(v1, v2,..., v j ,...,v L ) is obtained; wherein v j is the jth clustering cluster, v j =(v j 1 ,v j 2 ,...,v j k ,...,v j m(j) ), k=1, 2,..., m(j); v j k is the kth feature vector included in v j ; m(j) is the number of feature vectors included in v j , and ∑ k=1 L m(k)=n; any two eigenvectors in V are different.
[0111] In v j A preset number pre of feature vectors are randomly selected as target feature vectors; m(j)≥pre.
[0112] Optional, pre=ceil(w2*m min ); where w2 is the second weight coefficient, 0.001≤w2≤0.2; m min is the minimum number, m min =min(m(1),m(2),...,m(j),...,m(L)).
[0113] Optionally, determining whether the reference quantity ceil(w1*n / (L*acy)) is less than L; if so, determining q=ceil(w1*n / (L*acy)), including:
[0114] Determine whether the reference quantity ceil(w1*n / (L*acy)) is less than or equal to L; if so, determine q=ceil(w1*n / (L*acy)); otherwise, determine q=L.
[0115] Optionally, V is obtained by clustering the eigenvectors in the eigenvector group A according to L, A=(a1, a2, ..., a i ,...,a n ), i=1,2,...,n; where, a i is the preset feature vector of the i-th target object data, and any two feature vectors in A are different.
[0116] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the real-time warning method provided by the above embodiment.
[0117] An embodiment of the present invention further provides an electronic device including a processor and the aforementioned non-transitory computer-readable storage medium.
[0118] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.
[0119] While certain specific embodiments of the application have been described in detail herein for the purposes of exemplification, numerous other variations and modifications will be apparent to persons skilled in the art. Alterations and modifications of detail can be made by those skilled in the art, having the benefit of the above description, without departing from the spirit and scope of the application. It is intended that all such alterations and modifications be included within the scope of the application whose limits are to be determined only by the appended claims.
Claims
1. A real-time early warning method based on deep learning for feature recognition, characterized in that, The real-time early warning method comprises the following steps: S100, acquiring a matching degree group C=(c1, c2,...,c j ,...,c L ), j=1, 2,..., L corresponding to a to-be-detected feature vector; wherein the to-be-detected feature vector is a feature vector corresponding to to-be-detected data; c j is a matching degree of the to-be-detected feature vector and a cluster center vector corresponding to the jth cluster, each of the cluster clusters includes a plurality of feature vectors of target object data, any two feature vectors in all the cluster clusters are different, c1≥c2≥...≥c j ≥...≥c L ; and L is a preset number of cluster clusters. S200, detection and c1, c2, ..., c q Whether there is a feature vector in the corresponding cluster whose matching degree with the feature vector to be detected is greater than a preset threshold; if so, an early warning is issued; q is the target number; The determination method of q comprises the following steps: S210, taking at least part of the feature vectors in all the clustering clusters as target feature vectors; S220, obtaining a preset feature vector set T=(t1, t2,...,t r ,...,t s ), r=1, 2,..., s; wherein t r is a preset feature vector with a matching degree greater than the preset threshold to the rth target feature vector, and s is the number of target feature vectors. S230, obtaining a matching degree list D=(d1, d2,..., d r ,...,d s ), d r =(d r1 ,d r2 ,...,d rj ,...,d rL ); wherein d r is a matching degree group corresponding to t r , d rj is a matching degree of a cluster center vector corresponding to the jth cluster. r S240, the matching degrees in d r are sorted in ascending order to obtain d r r 1 , to obtain a sorted matching degree list D 1 = (d1 1 , d2 1 ,..., d r 1 ,..., d s 1 ), d r 1 = (d r1 1 , d r2 1 ,..., d rj 1 ,..., d rL 1 ); wherein d r1 1 ≥ d r2 1 ≥...≥ d rj 1 ≥...≥ d rL 1 ; S250, according to D 1 , a sequence number NUM=(num1, num2,..., num r ,...,num s ) is obtained; wherein num r is the sequence number of the matching degree corresponding to the cluster where the target feature vector t r corresponds to in d r 1 S260, determining the reference quantity whether it is less than L; if yes, it is determined that ; wherein ceil() is a preset rounding-up function, w1 is a first weight coefficient, 0 < w1 < 1; n is a total quantity of feature vectors in all the clustering clusters, acy is an influence coefficient, acy = ber / s, ber is a quantity of ordinal numbers in NUM which are less than or equal to a reference ordinal number num ave ave r=1 s r 2. The real-time alerting method of claim 1, wherein, The S210 comprises the following steps: S211, obtain a clustering cluster group V=(v1, v2,..., v j ,...,v L ); wherein, v j is the jth clustering cluster, v j =(v j 1 ,v j 2 ,...,v j k ,...,v j m(j) ), k=1,2,...,m(j); v j k is the kth feature vector included in v j ; m(j) is the number of feature vectors included in v j ; ∑ k=1 L m(k)=n; any two feature vectors in V are different; S212, in v j a preset number pre of feature vectors are randomly selected as target feature vectors; m(j) ≥ pre.
3. The real-time alerting method of claim 2, wherein, ; wherein w2 is a second weight coefficient, 0.001≤w2≤0.2; m min is a minimum number, m min = min(m(1), m(2),..., m(j),..., m(L)).
4. The real-time alerting method of claim 1, wherein, The step S260 comprises the following steps: S261, determining the reference quantity whether it is less than or equal to L; if so, it is determined that ; otherwise, it is determined that q = L.
5. The real-time alerting method of claim 2, wherein, V is obtained by clustering eigenvectors in the eigenvector set A according to L, A=(a1, a2,...,a i ,...,a n ), i=1, 2,..., n; wherein a i is a preset eigenvector of the ith target object data, and any two eigenvectors in A are different.
6. A real-time early warning system for feature recognition based on deep learning, characterized in that, The real-time early warning system comprises a first device and a plurality of second devices connected with the first device, the real-time early warning method in any one of claims 1-5 is applied to the first device, each clustering cluster is stored in any one of the second devices, and at least two clustering clusters in the L clustering clusters are stored in different second devices. The step S200 comprises the following steps: S201, send the feature vector to be detected to c1, c2,..., c q the second device where the corresponding cluster is located; Each second device is used to perform the following steps: S310, in response to receiving the feature vector to be detected, taking c1, c2,..., c q each cluster of the corresponding cluster cluster existing in the second device as a cluster cluster to be detected; S320, determining whether there is a feature vector with a matching degree greater than a preset threshold in all the to-be-detected clustering clusters and the to-be-detected feature vector; if yes, an early warning instruction is returned to the first device; After the step S201, the step S200 further comprises the following steps: S202, if the early warning instruction is received, early warning is performed.
7. The real-time alert system of claim 6, wherein, After the step S201, the step S200 further comprises the following steps: S203, if the early warning instruction is not received after a preset time period, an identifier indicating detection is displayed.
8. A real-time early warning device based on deep learning for feature recognition, characterized in that, The real-time early warning device comprises: The acquisition module is used for acquiring a matching degree group C=(c1, c2,..., c j ,...,c L ), j=1, 2,..., L corresponding to a to-be-detected feature vector; wherein the to-be-detected feature vector is a feature vector corresponding to to-be-detected data; c j is a matching degree of the to-be-detected feature vector and a cluster center vector corresponding to the jth cluster, each of the cluster clusters includes a plurality of feature vectors of target object data, any two feature vectors in all the cluster clusters are different, c1≥c2≥...≥c j ≥...≥c L ; and L is a preset number of cluster clusters. Detection module, used to detect c1, c2, ..., c q Whether there is a feature vector in the corresponding cluster whose matching degree with the feature vector to be detected is greater than a preset threshold; if so, an early warning is issued; q is the target number; The real-time early warning device further comprises a determination module, q is determined through the determination module, and the determination module is used for: taking at least part of the feature vectors in all the clustering clusters as target feature vectors; obtaining a preset feature vector set T = (t1, t2,..., t r ,...,t s ), r = 1, 2,..., s; wherein t r is a preset feature vector whose matching degree with the rth target feature vector is greater than the preset threshold, and s is the number of target feature vectors; obtaining a matching degree list D = (d1, d2,..., d r ,...,d s ), r d r1 =(d r2 ,d rj ,...,d rL ,...,d r ); wherein d r is the matching degree group corresponding to t rj is the matching degree of the cluster center vector corresponding to the jth cluster. r The matching degrees in d r are sorted in ascending order to obtain d r The corresponding sorted matching degree group d r 1 is obtained to obtain a sorted matching degree list D 1 =(d1 1 ,d2 1 ,...,d r 1 ,...,d s 1 ), d r 1 =(d r1 1 ,d r2 1 ,...,d rj 1 ,...,d rL 1 ); wherein d r1 1 ≥d r2 1 ≥...≥d rj 1 ≥...≥d rL 1 ; According to D 1 , the sequence number NUM=(num1, num2,..., num r ,...,num s ) is obtained; wherein num r is the sequence number of the matching degree corresponding to the cluster where the target feature vector t r corresponds to in d r 1 ; Determining the reference quantity whether it is less than L; if so, determining that ; wherein ceil() is a preset rounding-up function, w1 is a first weight coefficient, 0 < w1 < 1; n is a total quantity of feature vectors in all the clustering clusters, acy is an influence coefficient, acy = ber / s, ber is a quantity of ordinal numbers in NUM that are less than or equal to a reference ordinal number num ave . ave r=1 s num r / s. 9.A non-transitory computer-readable storage medium having stored therein at least one instruction or at least one piece of program, characterized in that, The at least one instruction or the at least one program is loaded and executed by the processor to realize the real-time early warning method in any one of claims 1-5.
10. An electronic device, comprising: The non-transitory computer readable storage medium in claim 9 comprises a processor.
Citation Information
Patent Citations
Text recognition method and device, storage medium and electronic equipment
CN112256880A
Feature retrieval method, device and equipment and computer storage medium
CN113255828A