Data Archiving Method, Apparatus, Electronic Device, and Storage Medium
By using text similarity and image similarity calculation methods during the item security inspection, the confidence of objects to be determined and archived is solved, and the problem of suspicious items in item security inspection data management is not accurately archived and inaccurate classification is improved, and data utilization and classification accuracy are improved.
Patent Information
- Application Number
- CN202510480439.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-04-17
AI Technical Summary
In the existing item security data management system, the suspicious items detected by the algorithm and their tags, the items after manual review, and the judgment results lack refined classification and correlation archives, resulting in low data utilization and low confidence data not being effectively utilized, limiting the deep learning model optimization and algorithm iterative upgrade of the security system.
By obtaining the data to be archived during the item security inspection process, including initial tag data and image data, using text similarity and image similarity calculation methods, the confidence of the object to be determined in the category is determined, and archived into the corresponding category sample library based on the confidence, realizing the processing and archiving of multimodal data.
It improves the accuracy and efficiency of the archiving processing of data to be archived during item security inspection, enhances the accuracy of classification of objects to be determined in categories, and solves the problem of inaccurate archives and inaccurate classification of suspicious items.
Smart Images

Figure CN119988318B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a data archiving method, apparatus, electronic device, and storage medium. Background Art
[0002] In the field of item security inspection, especially in the inspection of express parcels and luggage, security inspection equipment (such as X-ray machines) combined with object detection algorithms can intelligently identify items passing through the security inspection area, detect possible contraband or suspicious items therein, and automatically mark suspicious labels. When the confidence level of a suspicious item detected by the algorithm exceeds a set threshold, manual review is required to confirm whether it is contraband. If confirmed correctly, the express parcel or luggage is detained and manually labeled; if it is determined to be a false detection, it is marked as non-contraband.
[0003] However, the current security inspection data management system still has many problems: First, the suspicious items detected by the algorithm and their labels lack refined classification and associated archiving with the items and determination results after manual review, resulting in low data utilization. Second, data with a confidence level of suspicious items detected by the algorithm lower than the set threshold is usually directly discarded without being stored or reused. Over time, a large amount of potentially valuable data has not been effectively utilized, limiting the improvement space of the security inspection system in terms of deep learning model optimization, algorithm iteration and upgrade, and risk judgment. Summary of the Invention
[0004] Embodiments of the present invention provide a data archiving method, apparatus, electronic device, and storage medium to solve the problems of unarchived processing of suspicious items and inaccurate classification of suspicious items during the item security inspection process.
[0005] According to an aspect of the embodiments of the present invention, a data archiving method is provided, including:
[0006] Obtaining the data to be archived of an object with undetermined category during the item security inspection, where the data to be archived includes the initial label data and image data of the object with undetermined category; and obtaining at least one category sample library, where the category sample library includes at least one sample label data and the sample image data corresponding to the sample label data;
[0007] Determining the text similarity between the initial label data and each sample label data, and determining the image similarity between the image data and the sample image data corresponding to each sample label data;
[0008] Determining the confidence level of the object with undetermined category relative to each sample label data based on the text similarity and the image similarity;
[0009] Determine the category sample library to which the object with undetermined category belongs based on the confidence of the object with undetermined category relative to each sample label data, and archive the data to be archived based on the category sample library to which the object with undetermined category belongs.
[0010] Optionally, obtain the data to be archived for the object with undetermined category during the item security inspection, including: obtaining the first suspicious category detection result of each object to be detected during the item security inspection, where the first suspicious category detection result includes the suspicious category confidence and the image data; for each object to be detected, if the suspicious category confidence of the object to be detected is greater than or equal to the first confidence threshold, then determine the object to be detected as an object with undetermined category, and obtain the initial label data of the object to be detected, and determine the image data and the initial label data corresponding to the object to be detected as the data to be archived.
[0011] Optionally, the method further includes: if the suspicious category confidence of the object to be detected is less than the first confidence threshold, then obtain the original image frame of the object to be detected; obtain the preset category prompt information, and re-perform object detection on the original image frame of the object to be detected through the pre-trained open vocabulary object detection model based on the preset category prompt information to obtain the second suspicious category detection result of the object to be detected, and determine the data to be archived based on the second suspicious category detection result.
[0012] Optionally, determine the text similarity between the initial label data and each sample label data, and determine the image similarity between the image data and the sample image data corresponding to each sample label data, including: determining the text feature vector of the initial label data and the sample text feature vector of each sample label data, determining the first similarity data between the text feature vector and the sample text feature vector of each sample label data, and determining the first similarity data as the text similarity; and determining the image feature vector of the image data and the sample image feature vector of the sample image data corresponding to each sample label data, determining the second similarity data between the image feature vector and the sample image feature vector of the sample image data corresponding to each sample label data, and determining the second similarity data as the image similarity.
[0013] Optionally, determine the confidence of the object with undetermined category relative to each sample label data based on the text similarity and the image similarity, including: obtaining the weight data corresponding to the text similarity and the image similarity respectively; performing weighted summation processing on the text similarity and the image similarity based on the weight data to determine the confidence of the object with undetermined category relative to each sample label data.
[0014] Optionally, determining the category sample library to which the object to be categorized belongs based on the confidence of the object to be categorized relative to each sample label data, including: determining the highest confidence among the confidences of the object to be categorized relative to each sample label data; if the highest confidence is greater than the second confidence threshold, determining the category sample library to which the sample label data corresponding to the highest confidence belongs as the category sample library to which the object to be categorized belongs; if the highest confidence is less than the third confidence threshold, obtaining a preset recycling category sample library or creating a new category sample library, and determining the preset recycling category sample library or the new category sample library as the category sample library to which the object to be categorized belongs, where the third confidence threshold is less than the second confidence threshold.
[0015] Optionally, archiving the data to be archived based on the category sample library to which the object to be categorized belongs, including: if the category sample library to which the sample label data corresponding to the highest confidence belongs is determined as the category sample library to which the object to be categorized belongs, updating the initial label data in the data to be archived based on the sample label data corresponding to the highest confidence, and storing the updated data to be archived in the category sample library to which the object to be categorized belongs; if the preset recycling category sample library or the new category sample library is determined as the category sample library to which the object to be categorized belongs, storing the data to be archived of the object to be categorized in the category sample library to which the object to be categorized belongs.
[0016] According to another aspect of the embodiments of the present invention, there is provided a data archiving device, including:
[0017] A data acquisition module, configured to acquire the data to be archived of the object to be categorized during the security inspection of an item, where the data to be archived includes the initial label data and image data of the object to be categorized; and acquire at least one category sample library, where the category sample library includes at least one sample label data and the sample image data corresponding to the sample label data;
[0018] A similarity determination module, configured to determine the text similarity between the initial label data and each sample label data, and determine the image similarity between the image data and the sample image data corresponding to each sample label data;
[0019] A confidence determination module, configured to determine the confidence of the object to be categorized relative to each sample label data based on the text similarity and the image similarity;
[0020] An archiving processing module, configured to determine the category sample library to which the object to be categorized belongs based on the confidence of the object to be categorized relative to each sample label data, and archive the data to be archived based on the category sample library to which the object to be categorized belongs.
[0021] According to another aspect of the embodiments of the present invention, there is provided an electronic device, where the electronic device includes:
[0022] at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the data archiving method according to any embodiment of the present invention.
[0023] According to another aspect of the embodiments of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the data archiving method according to any embodiment of the present invention when executed.
[0024] The technical solution of the embodiments of the present invention includes obtaining to-be-archived data of an object with undetermined category during item security inspection, where the to-be-archived data includes initial tag data and image data of the object with undetermined category; obtaining at least one category sample library, where the category sample library includes at least one sample tag data and sample image data corresponding to the sample tag data; determining the text similarity between the initial tag data and each sample tag data, and determining the image similarity between the image data and the sample image data corresponding to each sample tag data; determining the confidence level of the object with undetermined category relative to each sample tag data based on the text similarity and the image similarity; determining the category sample library to which the object with undetermined category belongs based on the confidence level of the object with undetermined category relative to each sample tag data, and performing archiving processing on the to-be-archived data based on the category sample library to which the object with undetermined category belongs. This solution calculates the similarity between the to-be-archived data of the object with undetermined category during item security inspection and the data in multiple category sample libraries, thereby obtaining the text similarity and the image similarity, and then determining the category sample library to which the object with undetermined category belongs based on the obtained multi-dimensional similarity data, realizing the processing of multi-modal data corresponding to the to-be-archived data of the object with undetermined category during item security inspection to obtain the category sample library corresponding to the to-be-archived data, and thus performing archiving processing on the to-be-archived data, solving the problems of inaccurate archiving processing of suspicious items during item security inspection and inaccurate classification of suspicious items, improving the accuracy and efficiency of archiving processing of the to-be-archived data during item security inspection, and improving the accuracy of determining the category sample library to which the object with undetermined category belongs, that is, improving the accuracy of classifying the object with undetermined category.
[0025] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0027] Figure 1 It is a flowchart of a data archiving method provided in Embodiment 1 of the present invention;
[0028] Figure 2 It is a flowchart of a data archiving method provided in Embodiment 2 of the present invention;
[0029] Figure 3 It is a schematic structural diagram of a data archiving device provided in Embodiment 3 of the present invention;
[0030] Figure 4 It is a schematic structural diagram of an electronic device for implementing the data archiving method of the embodiments of the present invention. Detailed implementation manners
[0031] In order to enable those skilled in the art to better understand the solutions of the present invention, the following clearly and completely describes the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above accompanying drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those 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 comprising a series of steps or units does not necessarily have to be limited to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0033] Embodiment 1
[0034] Figure 1The figure is a flow chart of a data archiving method provided in the first embodiment of the present invention. This embodiment is applicable to the situation of archiving data. The method can be executed by a data archiving device, which can be implemented in the form of hardware and / or software, and can be configured in electronic devices such as computers and servers. As Figure 1 shown, the method includes:
[0035] S110. Obtain the data to be archived of the object with undetermined category during the security inspection of the item. The data to be archived includes the initial label data and image data of the object with undetermined category; and obtain at least one category sample library, which includes at least one sample label data and the sample image data corresponding to the sample label data.
[0036] Among them, the object of undetermined category can be specifically understood as representing suspicious items detected during the security inspection of items. The suspicious items can be dangerous items recorded in relevant documents issued by the transportation industry. Exemplarily, the suspicious items include but are not limited to different types of controlled knives and other items with potential safety hazards. The data to be archived of the object of undetermined category can be specifically understood as the detection data obtained after image acquisition and object detection processing of the items passing through the security inspection area by a preset target detection algorithm during the security inspection of items. The data to be archived includes but is not limited to the initial label data and image data of the object of undetermined category. The initial label specifically represents the label data marked for the object of undetermined category during the security inspection of items, indicating the category information corresponding to the items passing through the security inspection area. The label data can be string data. Exemplarily, the label data can be strings such as fruit knife, glass bottle, or portable knife. The image data specifically refers to the image obtained by segmenting the object of undetermined category from the original image. When labeling the label data for the object of undetermined category, the object of undetermined category can be segmented from the original image, and the image segmented from the original image and the label data are used as the data to be archived. The category sample library can be specifically understood as at least one category sample library constructed according to the item categories and corresponding image examples recorded in relevant documents issued by the transportation industry. The data in the category sample library can also be modified according to the actual situation of security inspection and the latest relevant documents issued by the transportation industry. The category sample library includes but is not limited to at least one sample label data and the sample image data corresponding to the sample label data. The sample label data represents the standardized category names of different types of items. The image examples include but are not limited to one or more X-ray images. Exemplarily, the item categories can be roughly divided into two major categories: suspicious item category and non-suspicious item category, and can also be further subdivided according to actual needs. Exemplarily, the suspicious item category can be further divided into controlled knife category, compressed gas category, and flammable liquid category. In addition, it also includes other dangerous item categories, which are not listed one by one here. It can be understood that the suspicious item category can be refined into more hierarchical classification results according to the classification accuracy and can be set according to actual classification needs, which will not be elaborated here.
[0037] Specifically, the initial label data and the corresponding image data of the object of undetermined category detected during the security inspection of items can be obtained in real time, or the initial label data and the corresponding image data of the object of undetermined category during the security inspection of items can be obtained through a scheduled task, that is, the data to be archived of the object of undetermined category is obtained, and at least one pre-constructed category sample library is obtained from a preset storage space or server. The category sample library includes but is not limited to at least one sample label data and the sample image data corresponding to the sample label data. Among them, the sample label data is set according to the types of dangerous items recorded in relevant documents issued by the transportation industry and is a type of standardized category label data.
[0038] Optionally, obtain the data to be archived for objects of undetermined category during the item security inspection, including: obtaining the first suspicious category detection results for each object to be detected during the item security inspection, where the first suspicious category detection results include the suspicious category confidence level and image data; for each object to be detected, if the suspicious category confidence level of the object to be detected is greater than or equal to the first confidence threshold, then determine the object to be detected as an object of undetermined category, and obtain the initial label data of the object to be detected, and determine the image data and the initial label data corresponding to the object to be detected as the data to be archived.
[0039] It should be noted that it is not necessary to archive all items passing through the security inspection area during the item security inspection. The target detection algorithm deployed in advance can be used to detect each object to be detected during the item security inspection, and detect suspicious items, that is, detect items with potential security hazards. Among them, the first suspicious category detection result specifically refers to the detection result obtained by performing preliminary target detection processing on the object to be detected through the target detection algorithm at the security inspection end. The first suspicious category detection result includes, but is not limited to, the suspicious category confidence level and image data. The first confidence threshold can be understood as the threshold data set for identifying objects of undetermined category from the objects to be detected, and is specifically set according to the confidence level range of suspicious items.
[0040] Specifically, for each object to be detected passing through the item security inspection area, obtain the first suspicious category detection results of the object to be detected in real time, extract the suspicious category confidence level and image data in the first suspicious category detection results, obtain the first confidence threshold from the configuration information, compare the suspicious category confidence level in the first suspicious category detection results with the first confidence threshold, and obtain the comparison result. If the comparison result is that the suspicious category confidence level of the object to be detected is greater than or equal to the first confidence threshold, it indicates that the object to be detected may belong to a suspicious item. Therefore, the object to be detected can be determined as an object of undetermined category, and the corresponding category information is marked for the object to be detected, and the marked category information is determined as the initial label data of the object to be detected, and the image data and the initial label data corresponding to the object to be detected are jointly determined as the data to be archived for the object of undetermined category.
[0041] Optionally, the method further includes: if the suspicious category confidence level of the object to be detected is less than the first confidence threshold, then obtain the original image frame of the object to be detected; obtain the preset category prompt information, and perform target detection on the original image frame of the object to be detected again through the pre-trained open vocabulary target detection model based on the preset category prompt information, obtain the second suspicious category detection results of the object to be detected, and determine the data to be archived based on the second suspicious category detection results.
[0042] It should be noted that considering factors such as computing resources and costs, the detection accuracy and precision of the detection algorithms or models set at the security inspection end are often not high. There are problems with the detection accuracy and precision of the detection results of the first suspicious category detected, and there may also be suspicious objects among the items with low confidence detected. To avoid missing suspicious items, it is necessary to perform secondary filtering on the items with low confidence to obtain the detection results of the second suspicious category of the object to be detected. The preset category prompt information specifically refers to the sample label data and the corresponding sample image data obtained from various category sample libraries, which are used as prompt words for the pre-trained open-vocabulary object detection model. The pre-trained open-vocabulary object detection model is a model with high detection accuracy and precision, capable of identifying and locating objects of any semantic category in the image, including categories not learned during training. Exemplarily, the pre-trained open-vocabulary object detection model can be the GroundingDino detection model. For the training of the GroundingDino detection model, the open-vocabulary object detection model can be trained based on at least one category sample library, the open-source X-ray dataset HiXray, and the natural scene object detection dataset coco.
[0043] Specifically, if the confidence of the suspicious category of the object to be detected is less than the first confidence threshold, then perform secondary filtering on the object to be detected, obtain the original image frame of the object to be detected, call the pre-trained open-vocabulary object detection model, obtain the sample label data and the corresponding sample image data from various category sample libraries, and use the obtained sample label data and sample image data as the prompt words for the pre-trained open-vocabulary object detection model to re-perform object detection on the original image frame of the object to be detected, determine the suspicious object target with more accurate confidence, so as to obtain the detection results of the second suspicious category of the object to be detected. Re-determine the data to be archived according to the detection results of the second suspicious category. Specifically, compare the confidence of the suspicious category in the detection results of the second suspicious category with the first confidence threshold to obtain a comparison result. If the comparison result is that the confidence of the suspicious category of the object to be detected is greater than or equal to the first confidence threshold, then determine the object to be detected as an object with undetermined category, label the corresponding category information for the object to be detected, determine the labeled category information as the initial label data of the object to be detected, and jointly determine the image data and the initial label data corresponding to the object to be detected as the data to be archived of the object with undetermined category.
[0044] In this embodiment, obtain the data to be archived of the object with undetermined category during the item security inspection process, and obtain at least one category sample library, which provides a reliable data basis for subsequent determination of various similarity data of the object with undetermined category.
[0045] S120. Determine the text similarity between the initial label data and each sample label data, and determine the image similarity between the image data and the sample image data corresponding to each sample label data.
[0046] Specifically, call the similarity calculation method to calculate the text similarity between the initial label data and each sample label data, obtaining multiple text similarities corresponding to the object with undetermined category, and calculate the image similarity between the image data and the sample image data corresponding to each sample label data, obtaining multiple image similarities corresponding to the object with undetermined category. Among them, the similarity calculation method includes but is not limited to the cosine similarity algorithm and the Euclidean distance algorithm.
[0047] In this embodiment, by determining multiple text similarities corresponding to the object with undetermined category and multiple image similarities corresponding to the object with undetermined category, a cross-modal similarity algorithm is implemented, obtaining the text similarity and the image similarity, providing a reliable data basis for determining the confidence level in the subsequent multi-modal fusion strategy.
[0048] S130. Determine the confidence level of the object with undetermined category relative to each sample label data based on the text similarity and the image similarity.
[0049] Specifically, the confidence algorithm can be called to process the text similarity and the image similarity, and the obtained confidence level is determined as the confidence level of the object with undetermined category relative to each sample label data. Alternatively, at least two confidence algorithms can be called to process the text similarity and the image similarity, obtaining corresponding multiple confidence levels, and the confidence level of the object with undetermined category relative to each sample label data is determined according to the multiple confidence levels. Among them, at least two confidence algorithms include but are not limited to the weighted summation algorithm, the two-stream weighted fusion algorithm, and the neural network fusion algorithm. Among them, the calculation formula of the two-stream weighted fusion method is: , where , , represents the adjustment coefficient, represents the text similarity, represents the image similarity. For determining the confidence level of the object with undetermined category relative to each sample label data according to the multiple confidence levels, the average value of the multiple confidence levels can be calculated, and the obtained average value is determined as the confidence level corresponding to the object with undetermined category. Alternatively, the probability value of each confidence level among the multiple confidence levels can be calculated, and the confidence level with the highest probability value is determined as the confidence level corresponding to the object with undetermined category, which can be set according to actual needs and is not limited here.
[0050] Optionally, determine the confidence of the object to be classified with respect to each sample label data based on text similarity and image similarity, including: obtaining the weight data corresponding to the text similarity and the image similarity respectively; performing a weighted summation process on the text similarity and the image similarity based on the weight data to determine the confidence of the object to be classified with respect to each sample label data.
[0051] It should be noted that in different application scenarios, the influence degree and reliability of different modality data on the detection result are different, that is, the weight data corresponding to different modality data are different. In this embodiment, the weight data corresponding to the text similarity and the image similarity in different application scenarios can be set according to different application scenarios.
[0052] Specifically, match from the configuration information according to the current application scenario to obtain the weight data matching the current application scenario, so as to obtain the weight data corresponding to the text similarity and the image similarity respectively. Calculate the comprehensive score of the image similarity and the text similarity according to the weight data. The calculation formula is as follows:
[0053] ;
[0054] where is the weight coefficient, which can be dynamically adjusted according to the importance of the actual data. For example, if the text label is more reliable, the weight data of the corresponding text similarity is set to: if the image data is more reliable, the weight data of the corresponding image similarity is set to: Preferably, it is set to 0.3. represents the text similarity, represents the image similarity. Calculate the comprehensive score of the image similarity and the text similarity according to the above formula, and determine the obtained comprehensive score as the confidence of the object to be classified with respect to each sample label data.
[0055] In this embodiment, by determining the confidence of the object to be classified with respect to each sample label data through the text similarity and the image similarity corresponding to the object to be classified, the confidence of the object to be classified with respect to each sample label data is determined through a multi-modal fusion processing method, providing a reliable data basis for determining the category sample library to which the object to be classified belongs, and helping to improve the accuracy of classifying the object to be classified.
[0056] S140. Determine the category sample library to which the object to be classified belongs based on the confidence of the object to be classified with respect to each sample label data, and perform archiving processing on the data to be archived based on the category sample library to which the object to be classified belongs.
[0057] Specifically, traverse the confidence levels of the objects with undetermined categories relative to each sample label data, select the category sample library to which the sample label data corresponding to the highest confidence level belongs, determine the category sample library to which the object with the undetermined category belongs as the selected category sample library, and store the data to be archived in the category sample library to which the object with the undetermined category belongs, thus completing the archiving process of the data to be archived.
[0058] Optionally, determining the category sample library to which the object with the undetermined category belongs based on the confidence levels of the object with the undetermined category relative to each sample label data includes: determining the highest confidence level among the confidence levels of the object with the undetermined category relative to each sample label data; if the highest confidence level is greater than the second confidence threshold, then determine the category sample library to which the sample label data corresponding to the highest confidence level belongs as the category sample library to which the object with the undetermined category belongs; if the highest confidence level is less than the third confidence threshold, then obtain a preset recycling category sample library or create a new category sample library, and determine the preset recycling category sample library or the new category sample library as the category sample library to which the object with the undetermined category belongs, where the third confidence threshold is less than the second confidence threshold.
[0059] In this embodiment, in order to archive the useful archived data of the undetermined categories, remove the archived data with low utilization value, and accurately determine the category sample library to which the object with the undetermined category belongs, it is necessary to further determine the confidence levels corresponding to the objects with the undetermined categories. By setting the second confidence threshold and the third confidence threshold, the confidence levels of the objects with the undetermined categories are further determined, where the third confidence threshold is less than the second confidence threshold. Specifically, select the highest confidence level among the confidence levels of the object with the undetermined category relative to each sample label data for determination processing, compare the highest confidence level with the second confidence threshold. If the highest confidence level is greater than the second confidence threshold, it indicates that the category sample library to which the determined object with the undetermined category belongs meets the accuracy requirements, and the category sample library to which the sample label data corresponding to the highest confidence level belongs can be determined as the category sample library to which the object with the undetermined category belongs; if the highest confidence level is less than the third confidence threshold, it indicates that the category sample library to which the determined object with the undetermined category belongs does not meet the accuracy requirements, and the category sample library to which the object with the undetermined category belongs cannot be determined. In this case, obtain the preset recycling category sample library and determine the preset recycling category sample library as the category sample library to which the object with the undetermined category belongs, where the preset recycling category sample library is used to store the data that does not belong to any of the at least one pre-constructed category sample libraries. Alternatively, a new category sample library can be created and determined as the category sample library to which the object with the undetermined category belongs.
[0060] Optionally, archive the data to be archived based on the category sample library to which the object to be determined by category belongs, including: if the category sample library to which the sample label data corresponding to the highest confidence level belongs is determined as the category sample library to which the object to be determined by category belongs, then update the initial label data in the data to be archived based on the sample label data corresponding to the highest confidence level, and store the updated data to be archived in the category sample library to which the object to be determined by category belongs; if the preset recycling category sample library or the new category sample library is determined as the category sample library to which the object to be determined by category belongs, then store the data to be archived of the object to be determined by category in the category sample library to which the object to be determined by category belongs.
[0061] Specifically, if the category sample library to which the sample label data corresponding to the highest confidence level belongs is determined as the category sample library to which the object to be determined by category belongs, it indicates that there is sample label data in the category sample library to which the object to be determined by category belongs that has category consistency with the initial label data in the archived data of the object to be determined by category. In order to be able to archive the archived data in a standardized manner, update the initial label data in the data to be archived according to the sample label data corresponding to the highest confidence level, and store the updated data to be archived in the category sample library to which the object to be determined by category belongs, that is, store the updated initial label data and the corresponding image data in the category sample library to which the object to be determined by category belongs. It can be to add a record to store the data to be archived, or to add the image data in the data to be archived to the storage location of the image data of the corresponding sample label data, which is not limited here. If the preset recycling category sample library or the new category sample library is determined as the category sample library to which the object to be determined by category belongs, then the data to be archived of the object to be determined by category can be directly stored in the category sample library to which the object to be determined by category belongs.
[0062] The technical solution of this embodiment is to obtain the data to be archived of the object with undetermined category during the item security inspection. The data to be archived includes the initial tag data and image data of the object with undetermined category; and obtain at least one category sample library, which includes at least one sample tag data and the sample image data corresponding to the sample tag data; determine the text similarity between the initial tag data and each sample tag data, and determine the image similarity between the image data and the sample image data corresponding to each sample tag data; determine the confidence level of the object with undetermined category relative to each sample tag data based on the text similarity and image similarity; determine the category sample library to which the object with undetermined category belongs based on the confidence level of the object with undetermined category relative to each sample tag data, and perform archiving processing on the data to be archived based on the category sample library to which the object with undetermined category belongs. This solution calculates the similarity between the data to be archived of the object with undetermined category during the item security inspection and the data in multiple category sample libraries, so as to obtain the text similarity and image similarity, and then determine the category sample library to which the object with undetermined category belongs according to the obtained multi-dimensional similarity data, realizing the processing of the multi-modal data corresponding to the data to be archived of the object with undetermined category during the item security inspection, so as to obtain the category sample library corresponding to the data to be archived, and then perform archiving processing on the data to be archived, solving the problems of inaccurate archiving processing of suspicious items during the item security inspection and inaccurate classification of suspicious items, improving the accuracy and efficiency of archiving processing of the data to be archived during the item security inspection, and improving the accuracy of determining the category sample library to which the object with undetermined category belongs, that is, improving the accuracy of classifying the object with undetermined category.
[0063] Embodiment 2
[0064] Figure 2 It is a flowchart of a data archiving method provided by Embodiment 2 of the present invention. The method of this embodiment is a further optimization of the method of the above embodiment. Optionally, determine the text feature vector of the initial tag data and the sample text feature vector of each sample tag data, determine the first similarity data between the text feature vector and the sample text feature vector of each sample tag data, and determine the first similarity data as the text similarity; determine the image feature vector of the image data and the sample image feature vector of the sample image data corresponding to each sample tag data, determine the second similarity data between the image feature vector and the sample image feature vector of the sample image data corresponding to each sample tag data, and determine the second similarity data as the image similarity. As Figure 2 shown, the method includes:
[0065] S210. Obtain the data to be archived for the object with undetermined category during the security inspection of the item. The data to be archived includes the initial label data and image data of the object with undetermined category; and obtain at least one category sample library, which includes at least one sample label data and the sample image data corresponding to the sample label data.
[0066] S220. Determine the text feature vector of the initial label data and the sample text feature vectors of each sample label data, determine the first similarity data between the text feature vector and the sample text feature vectors of each sample label data, and determine the first similarity data as the text similarity.
[0067] It should be noted that the initial label data is the data manually annotated by the annotation tool. Different security inspectors may have different levels of detail and emphasis in describing the same or similar items. The initial label data includes key information and unnecessary characters. In order to determine the accurate text feature vector, after obtaining the initial label data, data cleaning is performed on the initial label data to remove meaningless characters and irrelevant words, and only the key information is retained. Then, the text feature vector of the initial label data after data cleaning is determined. Among them, the first similarity data represents the text similarity data.
[0068] Specifically, use the pre-trained text feature vector extraction model to extract features from the initial label data in the archived data and each sample label data in each category sample library, and obtain the text feature vectors corresponding to the initial label data and each sample label data respectively. The text feature vector extraction model can be constructed using the BERT model. Preferably, the text feature vector extraction model uses the bert-base-uncased model to perform text feature extraction on the initial label data and each sample label data respectively, and generate corresponding 256-dimensional semantic vectors, that is, obtain the text feature vectors corresponding to the initial label data and each sample label data respectively. Calculate the similarity between the initial label data and each sample label data through the cosine similarity algorithm. The text similarity calculation formula is as follows:
[0069] ;
[0070] Among them, represents the similarity between the initial label data and the i-th sample label data, represents the text feature vector of the initial label data, represents the text feature vector of the i-th sample label data.
[0071] S230. Determine the image feature vector of the image data and the sample image feature vectors of the sample image data corresponding to each sample label data. Determine the second similarity data between the image feature vector and the sample image feature vectors of the sample image data corresponding to each sample label data, and determine the second similarity data as the image similarity.
[0072] Among them, the second similarity data represents the image similarity data.
[0073] Specifically, use the pre-trained image feature vector extraction model to perform image feature extraction on the image data corresponding to the initial label data in the archived data and the image data corresponding to each sample label data in each category sample library, respectively, to obtain the image feature vectors corresponding to the image data corresponding to the initial label data and the image data corresponding to each sample label data. The image feature vector extraction model can be to use the backbone network of the pre-trained ResNet50 model to perform image feature extraction on the image data corresponding to the initial label data and the image data corresponding to each sample label data, respectively, to determine the image feature vectors corresponding to the image data corresponding to the initial label data and the image data corresponding to each sample label data. Calculate the image similarity between the image data corresponding to the initial label data and the image data corresponding to each sample label data through the cosine similarity algorithm. The image similarity calculation formula is as follows:
[0074] ;
[0075] Among them, represents the similarity between the image data of the initial label data and the image data of the i-th sample label data, represents the image feature vector of the image data of the initial label data, represents the image feature vector of the image data of the i-th sample label data.
[0076] S240. Determine the confidence of the object with undetermined category relative to each sample label data based on the text similarity and the image similarity.
[0077] S250. Determine the category sample library to which the object with undetermined category belongs based on the confidence of the object with undetermined category relative to each sample label data, and perform archiving processing on the data to be archived based on the category sample library to which the object with undetermined category belongs.
[0078] The technical solution of this embodiment is to obtain the data to be archived of the object with undetermined category during the article security inspection. The data to be archived includes the initial tag data and image data of the object with undetermined category; and obtain at least one category sample library, which includes at least one sample tag data and the sample image data corresponding to the sample tag data; determine the text feature vector of the initial tag data and the sample text feature vector of each sample tag data, determine the first similarity data between the text feature vector and the sample text feature vector of each sample tag data, and determine the text similarity as the first similarity data; determine the image feature vector of the image data and the sample image feature vector of the sample image data corresponding to each sample tag data, determine the second similarity data between the image feature vector and the sample image feature vector of the sample image data corresponding to each sample tag data, and determine the image similarity as the second similarity data; determine the confidence of the object with undetermined category relative to each sample tag data based on the text similarity and the image similarity; determine the category sample library to which the object with undetermined category belongs based on the confidence of the object with undetermined category relative to each sample tag data, and perform archiving processing on the data to be archived based on the category sample library to which the object with undetermined category belongs. This solution realizes the processing of the data to be archived of the object with undetermined category and at least one category sample library during the article security inspection, obtains the text similarity and the image similarity, and then determines the confidence, and determines the category sample library corresponding to the data to be archived according to the confidence, so as to perform archiving processing on the data to be archived, improving the accuracy and efficiency of archiving the data to be archived during the article security inspection, and improving the accuracy of determining the category sample library to which the object with undetermined category belongs, that is, improving the accuracy of classifying the object with undetermined category.
[0079] Embodiment III
[0080] Figure 3 It is a schematic structural diagram of a data archiving device provided in Embodiment III of the present invention. As Figure 3 shown, the device includes:
[0081] A data acquisition module 310, configured to obtain the data to be archived of the object with undetermined category during the article security inspection. The data to be archived includes the initial tag data and image data of the object with undetermined category; and obtain at least one category sample library, which includes at least one sample tag data and the sample image data corresponding to the sample tag data;
[0082] A similarity determination module 320, configured to determine the text similarity between the initial tag data and each sample tag data, and determine the image similarity between the image data and the sample image data corresponding to each sample tag data;
[0083] A confidence determination module 330 is configured to determine the confidence of an object with undetermined category relative to each sample label data based on text similarity and image similarity;
[0084] An archiving processing module 340 is configured to determine the category sample library to which the object with undetermined category belongs based on the confidence of the object with undetermined category relative to each sample label data, and perform archiving processing on the data to be archived based on the category sample library to which the object with undetermined category belongs.
[0085] In the technical solution of this embodiment, the data acquisition module acquires the data to be archived of the object with undetermined category during the item security inspection, and the data to be archived includes the initial label data and image data of the object with undetermined category; and acquires at least one category sample library, where the category sample library includes at least one sample label data and the sample image data corresponding to the sample label data; the similarity determination module determines the text similarity between the initial label data and each sample label data, and determines the image similarity between the image data and the sample image data corresponding to each sample label data; the confidence determination module determines the confidence of the object with undetermined category relative to each sample label data based on the text similarity and the image similarity; the archiving processing module determines the category sample library to which the object with undetermined category belongs based on the confidence of the object with undetermined category relative to each sample label data, and performs archiving processing on the data to be archived based on the category sample library to which the object with undetermined category belongs. This solution realizes the processing of the data to be archived of the object with undetermined category and at least one category sample library during the item security inspection, obtains the text similarity and the image similarity, and then determines the confidence, and determines the category sample library corresponding to the data to be archived according to the confidence, so as to perform archiving processing on the data to be archived, improving the accuracy and efficiency of archiving the data to be archived during the item security inspection, and improving the accuracy of determining the category sample library to which the object with undetermined category belongs, that is, improving the accuracy of classifying the object with undetermined category.
[0086] Based on the above embodiment, optionally, the data acquisition module 310 is specifically configured to acquire the first suspicious category detection result of each object to be detected during the item security inspection, where the first suspicious category detection result includes the suspicious category confidence and the image data; for each object to be detected, if the suspicious category confidence of the object to be detected is greater than or equal to the first confidence threshold, the object to be detected is determined as an object with undetermined category, and the initial label data of the object to be detected is acquired, and the image data and the initial label data corresponding to the object to be detected are determined as the data to be archived.
[0087] Optionally, the data acquisition module 310 is further specifically configured to: if the suspicious class confidence of the object to be detected is less than the first confidence threshold, acquire the original image frame of the object to be detected; acquire the preset class prompt information, and re-perform object detection on the original image frame of the object to be detected based on the preset class prompt information through a pre-trained open-vocabulary object detection model, obtain the second suspicious class detection result of the object to be detected, and determine the data to be archived based on the second suspicious class detection result.
[0088] Optionally, the similarity determination module 320 is specifically configured to determine the text feature vector of the initial label data and the sample text feature vector of each sample label data, determine the first similarity data between the text feature vector and the sample text feature vector of each sample label data, and determine the first similarity data as the text similarity; and determine the image feature vector of the image data and the sample image feature vector of the sample image data corresponding to each sample label data, determine the second similarity data between the image feature vector and the sample image feature vector of the sample image data corresponding to each sample label data, and determine the second similarity data as the image similarity.
[0089] Optionally, the confidence determination module 330 is specifically configured to acquire the weight data corresponding to the text similarity and the image similarity respectively; perform weighted summation processing on the text similarity and the image similarity based on the weight data, and determine the confidence of the object with undetermined class relative to each sample label data.
[0090] Optionally, the archiving processing module 340 includes a confidence determination unit, a first class sample library determination unit, and a second class sample library determination unit. The confidence determination unit is configured to determine the highest confidence among the confidences of the object with undetermined class relative to each sample label data; the first class sample library determination unit is configured to, if the highest confidence is greater than the second confidence threshold, determine the class sample library to which the sample label data corresponding to the highest confidence belongs as the class sample library to which the object with undetermined class belongs; the second class sample library determination unit is configured to, if the highest confidence is less than the third confidence threshold, acquire the preset recycling class sample library or create a new class sample library, and determine the preset recycling class sample library or the new class sample library as the class sample library to which the object with undetermined class belongs, where the third confidence threshold is less than the second confidence threshold.
[0091] Optionally, the archiving processing module 340 is specifically configured to, if the category sample library to which the sample label data corresponding to the highest confidence belongs is determined as the category sample library to which the category pending object belongs, update the initial label data in the data to be archived based on the sample label data corresponding to the highest confidence, and store the updated data to be archived in the category sample library to which the category pending object belongs; if the preset recovery category sample library or the new category sample library is determined as the category sample library to which the category pending object belongs, store the data to be archived of the category pending object in the category sample library to which the category pending object belongs.
[0092] The data archiving device provided by the embodiments of the present invention can execute the data archiving method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0093] Embodiment 4
[0094] Figure 4 FIG. 10 is a schematic structural diagram of an electronic device provided by Embodiment 4 of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device (such as a helmet, glasses, a watch, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described herein and / or claimed.
[0095] As Figure 4 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can execute various appropriate actions and processes according to the computer program stored in the read only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0096] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0097] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the data archiving method.
[0098] In some embodiments, the data archiving method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the data archiving method described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the data archiving method by any other suitable means (e.g., by means of firmware).
[0099] The various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip systems (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, the programmable processor can be a special or general-purpose programmable processor, can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0100] The computer program for implementing the data archiving method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processors of general-purpose computers, special-purpose computers, or other programmable data processing devices, such that when the computer programs are executed by the processors, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, executed partially on the machine and partially on a remote machine as an independent software package, or executed entirely on a remote machine or server.
[0101] Embodiment 5
[0102] Embodiment 5 of the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores computer instructions for causing a processor to execute a data archiving method, and the method includes:
[0103] Obtaining the data to be archived of the object with undetermined category during the security inspection of the item, where the data to be archived includes the initial label data and image data of the object with undetermined category; and obtaining at least one category sample library, where the category sample library includes at least one sample label data and the sample image data corresponding to the sample label data;
[0104] Determining the text similarity between the initial label data and each sample label data, and determining the image similarity between the image data and the sample image data corresponding to each sample label data;
[0105] Determining the confidence level of the object with undetermined category relative to each sample label data based on the text similarity and the image similarity;
[0106] Determining the category sample library to which the object with undetermined category belongs based on the confidence level of the object with undetermined category relative to each sample label data, and performing archiving processing on the data to be archived based on the category sample library to which the object with undetermined category belongs.
[0107] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0108] To provide for interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0109] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0110] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0111] It should be understood that various forms of the processes shown above can be used, steps can be reordered, added or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0112] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A data archiving method, characterized in that, Including: Obtaining the data to be archived of an object with undetermined category during the security inspection of the item, where the data to be archived includes the initial label data and image data of the object with undetermined category; And obtaining at least one category sample library, where the category sample library includes at least one sample label data and the sample image data corresponding to the sample label data; wherein, the object with undetermined category is a suspicious item detected during the security inspection of the item; Determining the text similarity between the initial label data and each of the sample label data, and determining the image similarity between the image data and the sample image data corresponding to each of the sample label data; Determining the confidence level of the object with undetermined category relative to each of the sample label data based on the text similarity and the image similarity; Determining the category sample library to which the object with undetermined category belongs based on the confidence level of the object with undetermined category relative to each of the sample label data, and archiving the data to be archived based on the category sample library to which the object with undetermined category belongs, where the category sample library to which the object with undetermined category belongs includes one of the category sample libraries in the at least one category sample library, a preset recycling category sample library, and a newly created category sample library; Wherein, the determining the category sample library to which the object with undetermined category belongs based on the confidence level of the object with undetermined category relative to each of the sample label data includes: Determining the highest confidence level among the confidence levels of the object with undetermined category relative to each of the sample label data; If the highest confidence level is greater than the second confidence threshold, then determining the category sample library to which the sample label data corresponding to the highest confidence level belongs as the category sample library to which the object with undetermined category belongs; If the highest confidence level is less than the third confidence threshold, then obtaining a preset recycling category sample library or creating a new category sample library, and determining the preset recycling category sample library or the new category sample library as the category sample library to which the object with undetermined category belongs, where the third confidence threshold is less than the second confidence threshold; The archiving the data to be archived based on the category sample library to which the object with undetermined category belongs includes: If the category sample library to which the sample label data corresponding to the highest confidence level belongs is determined as the category sample library to which the object with undetermined category belongs, then updating the initial label data in the data to be archived based on the sample label data corresponding to the highest confidence level, and storing the updated data to be archived in the category sample library to which the object with undetermined category belongs; If the preset recycling category sample library or the new category sample library is determined as the category sample library to which the object with undetermined category belongs, then storing the data to be archived of the object with undetermined category in the category sample library to which the object with undetermined category belongs.
2. The method according to claim 1, wherein The obtaining the data to be archived of an object with undetermined category during the security inspection of the item includes: Obtaining the first suspicious category detection result of each object to be detected during the security inspection of the item, where the first suspicious category detection result includes a suspicious category confidence level and image data; For each of the objects to be detected, if the confidence of the suspicious category of the object to be detected is greater than or equal to the first confidence threshold, the object to be detected is determined as the object with undetermined category, and the initial label data of the object to be detected is obtained, and the image data and the initial label data corresponding to the object to be detected are determined as the data to be archived.
3. The method according to claim 2, wherein The method further includes: If the confidence of the suspicious category of the object to be detected is less than the first confidence threshold, the original image frame of the object to be detected is obtained; The preset category prompt information is obtained, and based on the preset category prompt information, the original image frame of the object to be detected is re-detected by a pre-trained open vocabulary object detection model to obtain the second suspicious category detection result of the object to be detected, and the data to be archived is determined based on the second suspicious category detection result.
4. The method according to claim 1, wherein The determination of the text similarity between the initial label data and each of the sample label data, and the determination of the image similarity between the image data and the sample image data corresponding to each of the sample label data include: Determine the text feature vector of the initial label data and the sample text feature vector of each of the sample label data, determine the first similarity data between the text feature vector and the sample text feature vector of each of the sample label data, and determine the first similarity data as the text similarity; and, Determine the image feature vector of the image data and the sample image feature vector of the sample image data corresponding to each of the sample label data, determine the second similarity data between the image feature vector and the sample image feature vector of the sample image data corresponding to each of the sample label data, and determine the second similarity data as the image similarity.
5. The method according to claim 1, wherein The determination of the confidence of the object with undetermined category relative to each of the sample label data based on the text similarity and the image similarity includes: Obtain the weight data corresponding to the text similarity and the image similarity respectively; Based on the weight data, perform a weighted summation process on the text similarity and the image similarity to determine the confidence of the object with undetermined category relative to each of the sample label data.
6. A data archiving device, characterized in that, It includes: A data acquisition module, configured to acquire the data to be archived of the object with undetermined category during the item security inspection, where the data to be archived includes the initial label data and the image data of the object with undetermined category; and acquire at least one category sample library, where the category sample library includes at least one sample label data and the sample image data corresponding to the sample label data; wherein, the object with undetermined category is a suspicious item detected during the item security inspection; A similarity determination module, configured to determine the text similarity between the initial label data and each of the sample label data, and determine the image similarity between the image data and the sample image data corresponding to each of the sample label data; A confidence determination module, configured to determine the confidence of the object with undetermined category relative to each of the sample label data based on the text similarity and the image similarity; An archiving processing module, configured to determine the category sample library to which the object with undetermined category belongs based on the confidence of the object with undetermined category relative to each piece of the sample label data, and perform archiving processing on the data to be archived based on the category sample library to which the object with undetermined category belongs, where the category sample library to which the object with undetermined category belongs includes one of the category sample libraries in the at least one category sample library, a preset recycling category sample library, and a newly created category sample library; Wherein, the archiving processing module includes a confidence determination unit, a first category sample library determination unit, and a second category sample library determination unit; the confidence determination unit is configured to determine the highest confidence among the confidences of the object with undetermined category relative to each piece of the sample label data; the first category sample library determination unit is configured to, if the highest confidence is greater than a second confidence threshold, determine the category sample library to which the sample label data corresponding to the highest confidence belongs as the category sample library to which the object with undetermined category belongs; the second category sample library determination unit is configured to, if the highest confidence is less than a third confidence threshold, obtain a preset recycling category sample library or create a new category sample library, and determine the preset recycling category sample library or the new category sample library as the category sample library to which the object with undetermined category belongs, where the third confidence threshold is less than the second confidence threshold; The archiving processing module is specifically configured to, if the category sample library to which the sample label data corresponding to the highest confidence belongs is determined as the category sample library to which the object with undetermined category belongs, update the initial label data in the data to be archived based on the sample label data corresponding to the highest confidence, and store the updated data to be archived in the category sample library to which the object with undetermined category belongs; if the preset recycling category sample library or the new category sample library is determined as the category sample library to which the object with undetermined category belongs, store the data to be archived of the object with undetermined category in the category sample library to which the object with undetermined category belongs.
7. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data archiving method according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the data archiving method according to any one of claims 1-5 when executed by a processor.
Citation Information
Patent Citations
Image pre-classification method of airport security inspection contraband automatic identification system
CN111860578A
Image recognition method and device, equipment and storage medium
CN116977684A