Sensitive article identification method and device, equipment and storage medium
Through the combination of sensitive image library comparison and multimodal recognition model, the problem of low accuracy of sensitive item recognition in the prior art is solved, and a higher accuracy of sensitive item recall is achieved.
Patent Information
- Application Number
- CN202311047955.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2025-02-21
AI Technical Summary
The existing classification models have low accuracy in the identification of sensitive items, mainly due to the wide variety of sensitive items, complex image content, many details, and many deformation methods.
The sensitive image library comparison method is used for preliminary screening, and the pre-trained multimodal recognition model is used to combine display image and text information to improve the accuracy of sensitive image determination.
Improves the accuracy of identifying sensitive items from initially judged as non-sensitive items, and enhances the accuracy of sensitive item recalls.
Smart Images

Figure CN119495106A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of image processing technology, and in particular to a sensitive object identification method, device, equipment and storage medium. Background Art
[0002] With the development of e-commerce technology, the display effect of item information on e-commerce platforms is getting better and better. For this reason, more and more item owners display their items through e-commerce platforms. This has led to the e-commerce platforms being filled with various item information. In order to purify the item display environment, some illegal and bad item information needs to be removed in real time.
[0003] The existing technology usually detects sensitive items through classification models, wherein the detection logic of the classification model includes skin detection, target detection, etc.
[0004] However, in the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: due to the wide variety of sensitive items, complex image content of sensitive items, many details, and various deformation methods, the accuracy of sensitive item identification results output by existing classification models is low. Summary of the invention
[0005] Embodiments of the present invention provide a sensitive item identification method, apparatus, device and storage medium to solve the problem of low accuracy of sensitive item identification results output by existing classification models.
[0006] In a first aspect, an embodiment of the present invention provides a sensitive item identification method, the method comprising:
[0007] Determining whether at least one display image corresponding to the current item is a non-sensitive image based on a current sensitive image library, wherein the sensitive image library stores information of at least two sensitive images;
[0008] If the at least one display image is a non-sensitive image, inputting the at least one display image and text information of the at least one display image into a pre-trained multimodal recognition model to obtain a target recognition result, wherein the target recognition result is used to characterize the probability that the current item is a sensitive item;
[0009] determining, according to the target recognition result, whether the at least one displayed image includes at least one sensitive image;
[0010] If the at least one displayed image includes at least one sensitive image, the current item is identified as a sensitive item.
[0011] In a second aspect, an embodiment of the present invention further provides a sensitive item identification device, the device comprising:
[0012] A sensitive image library module, used to determine whether at least one display image corresponding to the current item is a non-sensitive image based on a current sensitive image library, wherein the sensitive image library stores information of at least two sensitive images;
[0013] a model recognition module, configured to input the at least one display image and text information of the at least one display image into a pre-trained multimodal recognition model if the at least one display image is a non-sensitive image, to obtain a target recognition result, wherein the target recognition result is used to characterize the probability that the current item is a sensitive item;
[0014] A result processing module, used for determining whether the at least one displayed image includes at least one sensitive image according to the target recognition result;
[0015] An updating module is used to identify the current item as a sensitive item if the at least one displayed image includes at least one sensitive image.
[0016] In a third aspect, an embodiment of the present invention provides a server device, wherein the server device includes:
[0017] one or more processors;
[0018] A memory for storing one or more programs;
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the sensitive item identification method provided by any embodiment of the present invention.
[0020] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a sensitive item identification method as provided in any embodiment of the present invention.
[0021] The embodiments of the above invention have the following advantages or beneficial effects:
[0022] The sensitive image library comparison method is used to find sensitive items that need to be rejected, and the preliminary screening operation of sensitive items is completed; because the pre-trained multimodal recognition model can improve the accuracy of sensitive image determination by combining the display image of the current item and the text information of the display image, and the improvement of the accuracy of sensitive image determination helps to improve the accuracy of identifying sensitive items from those initially determined to be non-sensitive items, that is, to improve the accuracy of sensitive item recall. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a flow chart of a sensitive item identification method provided by an embodiment of the present invention;
[0024] Figure 2 is another flow chart of the sensitive item identification method provided by an embodiment of the present invention;
[0025] Figure 3A is a structural schematic diagram of the Swin model provided by an embodiment of the present invention;
[0026] Figure 3B 1 is a schematic diagram of the structure of an odd-numbered stage encoding module and an even-numbered stage encoding module connected sequentially provided in an embodiment of the present invention;
[0027] Figure 4 is another flow chart of the sensitive item identification method provided by an embodiment of the present invention;
[0028] Figure 5 is another flow chart of the sensitive item identification method provided by an embodiment of the present invention;
[0029] Figure 6 is another flow chart of the sensitive item identification method provided by an embodiment of the present invention;
[0030] Figure 7 is a schematic diagram of the structure of a sensitive item identification device provided by an embodiment of the present invention;
[0031] Figure 8 is another structural schematic diagram of a sensitive item identification device provided by an embodiment of the present invention;
[0032] Fig. 9 It is a structural diagram of a server device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0033] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0034] Figure 1 This is a flow chart of a sensitive item identification method provided in an embodiment of the present invention. This embodiment can be applied to the case where an item is determined to be a sensitive item by determining whether the displayed image of the item includes a sensitive image. The method can be executed by a sensitive item identification device integrated in a server device, and the device can be implemented in software and / or hardware. Figure 1 As shown, the method specifically comprises the following steps:
[0035] S110. Determine whether at least one display image corresponding to the current item is a non-sensitive image based on a current sensitive image library, where the sensitive image library stores information of at least two sensitive images.
[0036] When a sensitive image is added to the sensitive image library, the number of sensitive images included in the sensitive image library will change, and thus its state will change. Therefore, the current sensitive image library in this embodiment refers to the sensitive image library in the current state.
[0037] In one embodiment, the information of the sensitive image is image data of the sensitive image.
[0038] In one embodiment, the information of the sensitive image is the characteristic information of the sensitive image. Different sensitive images have different corresponding characteristic information, the same sensitive images have the same corresponding characteristic information, and similar sensitive images have similar characteristic information. Therefore, the characteristic information of each display image can be determined first, and then it can be determined whether the current sensitive image library has characteristic information of a sensitive image that is the same as the characteristic information of the display image or satisfies similar conditions. If so, the display image is determined to be a sensitive image, and if not, the display image is determined to be a non-sensitive image.
[0039] In one embodiment, for any item, if any of its corresponding at least one display image is a sensitive image, then the item is a sensitive item; if at least one of its corresponding display images is a non-sensitive image, then the item is a non-sensitive item.
[0040] In one embodiment, non-sensitive images include normal images and suspected sensitive images, and correspondingly, non-sensitive items include normal items and suspected sensitive items. The suspected sensitive images are images between normal images and sensitive images, and the suspected sensitive items are items between normal items and sensitive items.
[0041] S120. If the at least one display image is a non-sensitive image, input the at least one display image and the text information of the at least one display image into a pre-trained multimodal recognition model to obtain a target recognition result, where the target recognition result is used to characterize the probability that the current item is a sensitive item.
[0042] If the at least one display image includes one or more sensitive images, the current item is identified as a sensitive item. If the current display item can be directly determined to be a sensitive item based on the current sensitive image library, it means that the current sensitive image library stores information of images that are the same or similar to the display image of the current item, so there is no need to add any display image of the current item to the current sensitive image library.
[0043] If the at least one displayed image is a non-sensitive image, the current item is identified as a non-sensitive item. In order to further confirm whether the current item is identified as a sensitive item, at least one displayed image of the current item is input into a pre-trained multimodal recognition model to obtain a target recognition result.
[0044] In one embodiment, the target recognition result includes a normal mark and a suspected mark, wherein the normal mark is used to indicate that the probability that the current item is a sensitive item is zero; the suspected mark is used to indicate that the probability that the current item is a sensitive item is relatively high.
[0045] In one embodiment, the target recognition result includes a normal mark, an intermediate mark and an illegal mark. The normal mark is used to indicate that the probability of the current item being a sensitive item is zero; the intermediate mark is used to indicate that the probability of the current item being an illegal item is relatively high; and the illegal mark is used to indicate that the probability of the current item being an illegal item is 100%.
[0046] In one embodiment, the multimodal recognition model includes a text encoder, an image encoder, and a cross-modal encoder. The text encoder is used to determine the language features corresponding to the text information; the image encoder is used to determine the image coding features of each displayed image.
[0047] In one embodiment, the image encoder is a pre-trained Swin model. The Swin model is a deep learning model that applies transformers to the image field. The Swin model can construct a hierarchical feature map by introducing a sliding window. On the one hand, it introduces the locality of the convolution operation of CNN (convolutional neural network), and on the other hand, it can save computational complexity and has good feature extraction capabilities for images. By improving the accuracy of the encoded data, similar sensitive items can be recalled in full.
[0048] In one embodiment, the multimodal recognition model is transformed based on the open source X-VLM framework (multi-granularity model). The text encoder in the multimodal recognition model in this embodiment can be used to recognize Chinese characters and / or English characters. Optionally, the text encoder is a Roberta (RoBERTa) text encoder.
[0049] In this embodiment, the cross-modal encoder fuses the image encoding features with the language encoding features through cross attention at each layer to align the learning vision (image) with the language.
[0050] In one embodiment, the text information includes at least one of text information in at least one display image, text information in the detailed information of the current item, and title information corresponding to at least one display image. The text information in the display image can be determined based on an OCR (character recognition) recognition method; the detailed information is detailed introduction information of the display item. It can be understood that the combined use of multiple text information can improve the generalizability of the pre-trained multimodal recognition model.
[0051] After the multimodal recognition model is determined, it is trained for at least two rounds using a set training set to obtain a pre-trained multimodal recognition model. The set training set includes at least one display image of an item in a prohibited throwing category. After the pre-trained multimodal recognition model is determined, it is evaluated using 200,000 labeled samples. The proportion of items labeled as sensitive items that are predicted to be sensitive items is 90%, that is, the recall accuracy of the pre-trained multimodal recognition model for sensitive items reaches 90%.
[0052] S130. Determine whether the at least one displayed image includes at least one sensitive image according to the target recognition result.
[0053] In one embodiment, the target identification result includes at least one first identifier and a second identifier corresponding to each first identifier. The first identifier is a serial number identifier of each display image. The second identifier is an identifier used to indicate whether the display image is a sensitive image. Exemplarily, the target identification result is [(A1, W1), (A2, W0), (A3, W0)]. An is the first identifier, Wn is the second identifier, W1 represents a sensitive image, and W0 represents a non-sensitive image. The target identification result can be interpreted as that the display image identified as A1 is a sensitive image, the display image identified as A2 is a non-sensitive image; and the display image identified as A3 is a non-sensitive image. Therefore, it can be determined based on the target identification result whether the at least one display image includes at least one sensitive image, and which specific display image is a sensitive image.
[0054] S140: If the at least one displayed image includes at least one sensitive image, the current item is identified as a sensitive item.
[0055] If it is determined according to the target recognition result that the at least one displayed image includes at least one sensitive image, it means that the current item is a sensitive item, and thus the current item is identified as a sensitive item.
[0056] Since the current item is not identified as a sensitive item based on the current sensitive image library, but is identified as a non-sensitive item, the current sensitive image library does not include information that can identify the image of the current item. Therefore, in one embodiment, all sensitive images in at least one display image of the current item are added to the current sensitive image library to update the current sensitive image library. The updated current sensitive image library includes information about the image of the current item, and the current item can be identified as a sensitive image based on the updated current sensitive image library. In this way, in the subsequent sensitive item identification process, the current item or the target similar item of the current item can be directly identified as a sensitive item based on the sensitive image library, without the need to identify it through a pre-trained multimodal recognition model. Among them, at least one display image of the target similar item of the current item meets the set similarity condition with the corresponding display image of the current item. By returning the identified sensitive image to the sensitive image library in real time, the real-time update of the sensitive image library is achieved, and the accuracy of sensitive item identification based on the sensitive image library is improved, that is, the rejection accuracy of sensitive items is improved.
[0057] In one embodiment, if it is determined according to the target recognition result that the at least one displayed image does not include a sensitive image, it indicates that the current object is a normal object, and thus the current object is identified as a normal object.
[0058] The technical solution provided by the embodiment of the present invention adopts a sensitive image library comparison method to discover sensitive items that need to be rejected, and completes the preliminary screening operation of sensitive items; because the pre-trained multimodal recognition model can fully combine the display image of the current item and the text information associated with the display image to improve the accuracy of sensitive image determination, and the improvement of the accuracy of sensitive image determination helps to improve the accuracy of identifying sensitive items from items initially determined to be non-sensitive, that is, to improve the accuracy of sensitive item recall.
[0059] Figure 2 Another flow chart of the sensitive item identification method provided by an embodiment of the present invention. Based on the above embodiment, this embodiment further refines the process of determining whether at least one displayed image corresponding to the current item is a non-sensitive image based on the current sensitive image library. Figure 2 As shown, the method includes:
[0060] S2101. Input the at least one display image into a pre-trained encoding model to obtain encoding results for each display image.
[0061] The pre-trained encoding model is used to encode each display image in the at least one display image to obtain an encoding result.
[0062] After at least one display image of the current item is determined, the at least one display image is input into a pre-trained encoding model to obtain encoding results of each display image.
[0063] In one embodiment, the coding model is the existing Swin model. Figure 3A As shown, the Swin model includes a block module and four encoding modules connected in sequence after the block module, wherein the encoding module connected to the block module includes a linear embedding module and an encoder module, and the remaining three encoding modules include a downsampling module and an encoder module. The image is input into the block module for block division, that is, each 4x4 adjacent pixels is an image block, and then flattened in the channel direction. Assuming that the input is an RGB three-channel image, then each image block has 4x4=16 pixels, and then each pixel has three values of R, G, and B, so after flattening, it is 16x3=48, so after passing through the block module, the image shape changes from [H, W, 3] to [H / 4, W / 4, 48]. Then, the linear embedding module is used to perform a linear transformation on the channel data of each pixel, from 48 to C, that is, the image shape changes from [H / 4, W / 4, 48] to [H / 4, W / 4, C]. Then, feature maps of different sizes are constructed through four stages. Except for stage 1, which first passes through a linear embedding module, the remaining three stages all first pass through a downsampling module for downsampling. Then, the encoder modules are stacked repeatedly. The sizes of the blocks output by the other three encoding modules are: [H / 4, W / 4, 2C], [H / 4, W / 4, 4C], and [H / 4, W / 4, 8C].
[0064] The encoder module here actually has two structures, such as Figure 3B As shown in the figure, the difference between the two structures is that one uses the W-MSA (Windows Multi-head Self-Attention) structure and the other uses the SW-MSA (Shifted Windows Multi-Head Self-Attention) structure. The two structures are used in pairs, the W-MSA structure is used first, and the SW-MSA structure is used second. For the encoder module of the odd stage, the input data (z l-1 ) firstly performs layer normalization through LN (Layer Normalization) to obtain the corresponding normalized result, and then inputs the normalized result into W-MSA (Windows Multi-head Self-Attention) to obtain the first result, and then inputs the input data (z l-1 ) is added to the first result to obtain the first addition result The first addition result is input into the next LN for layer normalization to obtain a corresponding normalized result, and the normalized result is input into the MLP (Multi-Layer Perceptron) to obtain a second result; the first addition result and the second result are added to obtain a second addition result (z l ), the second addition result (z l ) inputs the LN of the encoder module of the corresponding even-numbered stage to perform layer normalization to obtain the corresponding normalized result, and inputs the normalized result into SW-MSA (moving window multi-head self-attention) to obtain the third result; calculate the third result and the second addition result (z l ) to obtain the third addition result The third addition result is input into the LN layer for normalization to obtain a corresponding normalized result, the normalized result is input into the MLP (multilayer perceptron) to obtain a fourth result, and the sum of the fourth result and the third addition result is calculated to obtain a fourth addition result (z l+1 ).
[0065] In one embodiment, the sensitive image library stores the encoding data of at least two sensitive images. The encoding data is determined based on a pre-trained encoding model. Exemplarily, 200,000 items of data are extracted in layers from a category where advertising is prohibited, and after business labeling, approximately 76,000 sensitive images are obtained. Each sensitive image is input into the pre-trained Swin model to obtain the encoding data of each sensitive image, and the encoding data of each sensitive image is added to the sensitive image library to obtain an initial sensitive image library.
[0066] 100,000 display images of items were randomly selected, and the encoding results of each display image of each item were determined based on the pre-trained Swin model. It has been verified that the encoding results of each display image of each item determined based on the sensitive image library and the pre-trained Swin model can screen out about 27,000 sensitive items. After business verification, the rejection accuracy rate reached 99.4%. This recall order of magnitude can meet the needs of real-time recall of illegal items and reduce the pressure of subsequent recall of illegal items. Among them, the rejection accuracy rate is the proportion of the number of illegal items in the rejected items to the number of rejected items.
[0067] S2102. If encoding data matching the encoding result of any one of the at least one display image is searched in the current sensitive image library, it is determined that the at least one display image includes at least one sensitive image.
[0068] Since the sensitive image library stores the coded data of sensitive items, if the current sensitive image library contains coded data that matches the coded result of any of the at least one display image, it indicates that the at least one display image includes at least one sensitive image. Since the product corresponding to at least one sensitive image is pre-defined as a sensitive item, the current item is a sensitive item. The technical effect of quickly and accurately determining whether the current item is a sensitive item based on the sensitive image library is achieved.
[0069] S2103: If no coding data matching the coding result of each display image in the at least one display image is found in the current sensitive image library, it is determined that the at least one display image is a non-sensitive item.
[0070] If there is no encoding data matching the encoding result of each display image in the at least one display image in the sensitive image library, it indicates that the at least one display image is not a sensitive image, and therefore the current item is a non-sensitive item. This achieves the technical effect of quickly and accurately determining whether the current item is a non-sensitive item based on the sensitive image library.
[0071] S220: If the at least one display image is a non-sensitive image, input the at least one display image and text information of the at least one display image into a pre-trained multimodal recognition model to obtain a target recognition result.
[0072] S230: Determine whether the at least one displayed image includes at least one sensitive image according to the target recognition result.
[0073] S240: If the at least one displayed image includes at least one sensitive image, the current item is identified as a sensitive item.
[0074] The embodiment of the present invention determines whether the current item is a sensitive item by determining whether there is coding data in the current sensitive image library that matches the coding result of any display image in at least one display image corresponding to the current display image. If the number and types of sensitive images included in the sensitive image library are sufficient, the technical effect of quickly and accurately determining whether the current item is a sensitive item can be achieved.
[0075] Figure 4 This is another flow chart of the sensitive item identification method provided by the embodiment of the present invention. This embodiment adds a process of determining whether the current item is a normal item based on the normal image library on the basis of the previous embodiment. Figure 4 As shown, the method includes:
[0076] S300: Determine whether at least one display image corresponding to the current object is a normal image based on a current normal image library, wherein the normal image library stores information of at least two normal images.
[0077] In one embodiment, the image information is the coded data of the image, and the normal image library stores the coded data of at least two normal images. The following steps are performed to determine whether at least one display image corresponding to the current item is a normal image based on the current normal image library:
[0078] Step a1: input at least one display image of the current item into a pre-trained encoding model to obtain encoding results of each display image.
[0079] Step a2: Determine whether the at least one display image corresponding to the current object is a normal image by determining whether there is coding data in the current normal image library that matches the coding results corresponding to each of the at least one display image.
[0080] In one embodiment, the coding model is the Swin model used in the aforementioned embodiments.
[0081] This embodiment achieves the technical effect of quickly and accurately determining whether at least one display image corresponding to the current object is a normal image based on the current normal image library, thereby determining whether the current object is a normal object.
[0082] If the at least one display image is a normal image, it indicates that the current item is a normal item, so the current item is identified as a normal item, and the platform is allowed to display the at least one display image of the current item.
[0083] S310: If not, determine based on the current sensitive image library whether at least one display image corresponding to the current item is a non-sensitive image.
[0084] If the at least one display image is not all normal images, it means that the at least one display image includes at least one abnormal image, that is, the current item is an abnormal item. At this time, it is necessary to determine whether the at least one display image corresponding to the current item is all non-sensitive images based on the current sensitive image library, that is, whether the current item is a non-sensitive item. This is because the platform does not allow display images of sensitive items.
[0085] In one embodiment, the categories of items may be normal items, sensitive items, and intermediate items. Intermediate items are items between normal items and sensitive items, so abnormal items include intermediate items and sensitive items. Therefore, after determining that the current item is an abnormal item, it is necessary to further determine whether it is a sensitive item.
[0086] S320: Input the at least one display image and the text information of the at least one display image into a pre-trained multimodal recognition model to obtain a target recognition result, where the target recognition result is used to characterize the probability that the current item is a sensitive item.
[0087] S330: Determine whether the at least one displayed image includes at least one sensitive image according to the target recognition result.
[0088] S340: If the at least one displayed image includes at least one sensitive image, the current item is identified as a sensitive item.
[0089] The embodiment of the present invention first determines whether the current item is an abnormal item based on a normal image library. If the current item is an abnormal item, it determines whether the current item is a non-sensitive item based on a sensitive image library. This can reduce the number of items that need to be determined to be non-sensitive items based on the sensitive image library, thereby reducing the number of items that need to be determined to be sensitive items based on a pre-trained multimodal recognition model, and also makes the sensitive item identification process more reasonable.
[0090] Figure 5 Another flow chart of the sensitive item identification method provided by an embodiment of the present invention. This embodiment is used to refine "determine whether the at least one displayed image includes at least one sensitive image according to the target identification result" based on the above embodiment. Figure 5 As shown, the method is as follows:
[0091] S410. Determine whether at least one display image corresponding to the current item is a non-sensitive image based on a current sensitive image library, where the sensitive image library stores information of at least two sensitive images.
[0092] S420: If the at least one display image is a non-sensitive image, input the at least one display image and the text information of the at least one display image into a pre-trained multimodal recognition model to obtain a target recognition result, where the target recognition result is used to characterize the probability that the current item is a sensitive item.
[0093] S4301. If the target recognition result includes a suspected sensitive mark, obtain the review result of the current item. The suspected sensitive mark is used to indicate that the current item is a suspected sensitive item.
[0094] In one embodiment, Figure 6 As shown, the review result is a manual review result. When it is detected that the target recognition result includes a suspected sensitive mark, the at least one display image of the current item and the target recognition result are sent to a set audit account, and the corresponding auditor reviews the at least one display image of the current item and fills in the review result. In response to the auditor's review result submission operation, the review result is obtained.
[0095] In one embodiment, the review result includes a review normal mark used to indicate that the current item is a normal item, or a review sensitive mark used to indicate that the current item is a sensitive item.
[0096] In one embodiment, the review result includes a review sensitivity mark indicating that the current item is a sensitive item, and also includes a display image mark and a classification mark corresponding to the display image mark, wherein the classification mark is a normal image mark or a sensitive image mark.
[0097] S4302: If the review result includes a review sensitivity identifier, determine that at least one displayed image includes at least one sensitive image, and determine a first image identifier of the sensitive image included in the at least one displayed image.
[0098] The review sensitive identifier is used to indicate that at least one displayed image of the current item includes at least one sensitive image.
[0099] Since manual review has high accuracy, by setting up a manual review process after the pre-trained multimodal recognition model, the pre-trained multimodal recognition model can be used as a backup, thereby improving the accuracy of recalling sensitive items that are identified as non-sensitive items. Recall refers to withdrawing the items that were originally intended to be displayed (see the recall process for details). Figure 6 The process part in the dotted box on the right). In this embodiment, the sensitive items identified based on the sensitive image library are directly rejected (withdrawn) items (refer to the rejection process Figure 6 The process part in the dotted box on the left); if the multimodal recognition model and the review process are not set, the sensitive items among the non-sensitive items that have not been identified based on the sensitive image library will be displayed as non-sensitive items; and now the pre-trained multimodal recognition model and the review process will identify the sensitive items that have not been identified based on the sensitive image library, and label them as sensitive items that are prohibited from display, thereby achieving accurate recall of sensitive items.
[0100] In one embodiment, while determining that the at least one display image includes a first image identifier of a sensitive image, a second image identifier of a non-sensitive image included in the at least one display image is also determined; prompt information for prompting to delete the sensitive image corresponding to the first image identifier is output; in response to the deletion operation of the sensitive image, the sensitive image corresponding to the first image identifier is added to the current sensitive image library to update the current sensitive image library; and the normal image corresponding to the second image identifier is used as at least one new display image of the current item to update at least one display image of the current item. The prompt information prompts the user to delete the corresponding sensitive image, so that the display images of the current item are all compliant normal images, thereby improving the guidance effect of item compliance display. It should be noted that the updated at least one display image of the current item can be added to the current normal image library, or it can be not added. The user can set it according to the actual situation. For example, if the user generally supplements the corresponding display image after deleting the sensitive image corresponding to the current item, the updated at least one display image can be not added to the normal image library; otherwise, the updated at least one display image can be added to the normal image library.
[0101] In one embodiment, after obtaining the target recognition result, it also includes: S4300, if the target recognition result includes a normal mark, the current item is identified as a normal item, and the at least one display image corresponding to the current item is added to the normal image library to update the normal image library. In this embodiment, the target recognition result includes a normal mark and a suspected sensitive mark. If the target recognition result includes a normal mark, it means that the current item is a normal item, so the current item is identified as a normal item. Since the normal image library recognition stage in the aforementioned embodiment does not determine the current item as a normal item, it cannot be directly identified as a normal item based on the current normal image library, so at least one display image of the current item is added to the current normal image library to update the current normal image library, so that the current normal image library includes the information of the current item, so that the current item can be directly identified as a normal item based on the current normal image library. In this way, in the subsequent sensitive item timing recognition process, the current item can be identified as a normal item in the normal image library recognition stage without being transferred to the pre-trained multimodal recognition model.
[0102] S440: If the at least one displayed image includes an image identified with the first image identifier, the current item is identified as a sensitive item, and the image corresponding to the first image identifier is added to the current sensitive image library to update the current sensitive image library.
[0103] The image corresponding to the first image identifier is added to the current sensitive image library to update the current sensitive image library, thereby realizing real-time and accurate updating of the sensitive image library. The real-time updating of the sensitive image library can directly reject identical items when performing sensitive item identification checks on all items at regular intervals, thereby helping to reduce the amount of item identification in the recall process for illegal items.
[0104] In one embodiment, if the review result includes a review normal mark, it means that all display images of the current item are normal images, that is, the current item is a normal item. Therefore, it is marked as a normal item, and the at least one display image corresponding to the current item is added to the normal image library to update the normal image library.
[0105] The embodiment of the present invention provides a review process after the pre-trained multimodal recognition model, which can provide a backup for the pre-trained multimodal recognition model and thus ensure the accuracy of the recall of sensitive items.
[0106] The following is an embodiment of a sensitive item identification device provided in an embodiment of the present invention. The device and the item equipment method described in the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the sensitive item identification device, reference can be made to the contents of the above embodiments.
[0107] Figure 7 The structural block diagram of the sensitive object identification device is provided. Figure 7 As shown, the sensitive item identification device includes a sensitive image library module 71, a model identification module 72, a result processing module 73 and an update module 74; the sensitive image library module 71 is used to determine whether at least one display image corresponding to the current item is a non-sensitive image based on the current sensitive image library, and the sensitive image library stores information of at least two sensitive images; the model identification module 72 is used to input the at least one display image and the text information of the at least one display image into a pre-trained multimodal recognition model to obtain a target recognition result if the at least one display image is a non-sensitive image, and the target recognition result is used to characterize the probability that the current item is a sensitive item; the result processing module 73 is used to determine whether the at least one display image includes at least one sensitive image according to the target recognition result; the update module 74 is used to identify the current item as a sensitive item if the at least one display image includes at least one sensitive image.
[0108] In one embodiment, Figure 8 As shown, the device also includes a normal image library module 70, and the normal image library module 70 includes:
[0109] A normal image library unit, used to determine whether at least one display image corresponding to the current item is a normal image based on a current normal image library, wherein the normal image library stores information of at least two normal images;
[0110] The trigger unit, if not, triggers the execution of an operation of determining whether at least one display image corresponding to the current item is a non-sensitive image based on the current sensitive image library.
[0111] In one embodiment, the normal image library unit is specifically used for:
[0112] Inputting at least one display image of the current item into a pre-trained encoding model to obtain encoding results of each display image;
[0113] By determining whether there are coding data in the current normal image library that respectively match the coding results corresponding to each of the at least one display image, it is determined whether the at least one display image corresponding to the current object is a normal image.
[0114] In one embodiment, the sensitive image library module 71 is specifically used for:
[0115] Inputting the at least one display image into a pre-trained encoding model to obtain encoding results of each display image;
[0116] If encoding data matching the encoding result of any one of the at least one display image is searched in the sensitive image library, it is determined that the at least one display image includes at least one sensitive image;
[0117] If no encoding data matching the encoding result of each display image in the at least one display image is searched in the current sensitive image library, it is determined that the at least one display image is a non-sensitive item.
[0118] In one embodiment, the update module 74 is further configured to:
[0119] If the at least one display image does not include at least one sensitive image, the current item is identified as a normal item, and the at least one display image is added to the current normal image library to update the current normal image library.
[0120] In one embodiment, the update module 74 is further configured to:
[0121] The at least one sensitive image is added to the current sensitive image library to update the current sensitive image library.
[0122] In one embodiment, the result processing module 73 is specifically used to:
[0123] If the target recognition result includes a suspected sensitive mark, obtaining a review result of the current item, wherein the suspected sensitive mark is used to indicate that the current item is a suspected sensitive item;
[0124] If the review result includes a review sensitive identifier, determining that the at least one displayed image includes at least one sensitive image, and determining a first image identifier of the sensitive image included in the at least one displayed image;
[0125] The update module 74 is specifically used for:
[0126] The image corresponding to the first image identifier is added to the current sensitive image library to update the current sensitive image library.
[0127] In one embodiment, the result processing module is further used to:
[0128] Determining a second image identifier of a non-sensitive image included in the at least one displayed image;
[0129] Outputting prompt information for prompting to delete the sensitive image corresponding to the first image identifier;
[0130] In response to the deletion operation of the sensitive image, the sensitive image corresponding to the first image identifier is added to the current sensitive image library to update the current sensitive image library; the normal image corresponding to the second image identifier is used as at least one new display image of the current item to update at least one display image of the current item.
[0131] In one embodiment, the update module 74 is further configured to:
[0132] If the target recognition result includes a normal identification, the current object is identified as a normal object, and the at least one display image corresponding to the current object is added to a normal image library to update the normal image library.
[0133] In one embodiment, the encoding model is a Swin model.
[0134] In one embodiment, the multimodal recognition model includes a text encoder, an image encoder, and a cross-modal encoder.
[0135] In one embodiment, the text information includes at least one of text information in the at least one display image, text information in the detailed information of the current item, and title information corresponding to the at least one display image.
[0136] The sensitive item identification device provided in the embodiment of the present invention adopts a sensitive image library comparison method to discover sensitive items that need to be rejected, and completes the preliminary screening operation of sensitive items; because the pre-trained multimodal recognition model can improve the accuracy of sensitive image determination by combining the display image of the current item and the text information of the display image, and the improvement of the accuracy of sensitive image determination helps to improve the accuracy of identifying sensitive items from items initially determined to be non-sensitive, that is, improve the accuracy of sensitive item recall.
[0137] The sensitive item identification device provided in the embodiment of the present invention can execute the sensitive item identification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the sensitive item identification method.
[0138] Fig. 9 A schematic diagram of the structure of a server device provided in an embodiment of the present invention. Fig. 9 A block diagram of an exemplary server 12 suitable for use in implementing embodiments of the present invention is shown. Fig. 9 The server 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0139] like Fig. 9 As shown, the server 12 is in the form of a general purpose computing device. The components of the server 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0140] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0141] The server 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the server 12, including volatile and non-volatile media, removable and non-removable media.
[0142] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The server 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig. 9 not shown, usually called a "hard drive"). Although Fig. 9 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0143] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0144] The server 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the server 12, and / or may communicate with any device that enables the server 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. In addition, the server 12 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the server 12 via a bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the server 12, including, but not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0145] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing the steps of the sensitive item identification method provided in the embodiment of the present invention, the method comprising:
[0146] Determining whether at least one display image corresponding to the current item is a non-sensitive image based on a current sensitive image library, wherein the sensitive image library stores information of at least two sensitive images;
[0147] If the at least one display image is a non-sensitive image, inputting the at least one display image and text information of the at least one display image into a pre-trained multimodal recognition model to obtain a target recognition result, wherein the target recognition result is used to characterize the probability that the current item is a sensitive item;
[0148] determining, according to the target recognition result, whether the at least one displayed image includes at least one sensitive image;
[0149] If the at least one displayed image includes at least one sensitive image, the current item is identified as a sensitive item.
[0150] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the sensitive item identification method provided by any embodiment of the present invention.
[0151] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of a sensitive item identification method provided in the above embodiment of the present invention are implemented. The method includes:
[0152] Determining whether at least one display image corresponding to the current item is a non-sensitive image based on a current sensitive image library, wherein the sensitive image library stores information of at least two sensitive images;
[0153] If the at least one display image is a non-sensitive image, inputting the at least one display image and text information of the at least one display image into a pre-trained multimodal recognition model to obtain a target recognition result, wherein the target recognition result is used to characterize the probability that the current item is a sensitive item;
[0154] determining, according to the target recognition result, whether the at least one displayed image includes at least one sensitive image;
[0155] If the at least one displayed image includes at least one sensitive image, the current item is identified as a sensitive item.
[0156] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0157] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0158] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0159] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0160] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0161] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for identifying sensitive items, characterized in that: The method comprises: Determining whether at least one display image corresponding to the current item is a non-sensitive image based on a current sensitive image library, wherein the sensitive image library stores information of at least two sensitive images; If the at least one display image is a non-sensitive image, inputting the at least one display image and text information of the at least one display image into a pre-trained multimodal recognition model to obtain a target recognition result, wherein the target recognition result is used to characterize the probability that the current item is a sensitive item; determining, according to the target recognition result, whether the at least one displayed image includes at least one sensitive image; If the at least one displayed image includes at least one sensitive image, the current item is identified as a sensitive item.
2. The method according to claim 1, characterized in that The determining, based on the current sensitive image library, whether at least one display image corresponding to the current item is a non-sensitive image includes: Determining whether at least one display image corresponding to the current item is a normal image based on a current normal image library, wherein the normal image library stores information of at least two normal images; If not, then trigger the execution of an operation of determining whether at least one display image corresponding to the current item is a non-sensitive image based on the current sensitive image library.
3. The method according to claim 2, characterized in that The normal image library stores the encoded data of at least two normal images; The determining, based on the current normal image library, whether at least one display image corresponding to the current object is a normal image includes: Inputting at least one display image of the current item into a pre-trained encoding model to obtain encoding results of each display image; By determining whether there are coding data in the current normal image library that respectively match the coding results corresponding to each of the at least one display image, it is determined whether the at least one display image corresponding to the current object is a normal image.
4. The method according to claim 1, characterized in that: The sensitive image library stores the encoded data of at least two sensitive images; The determining, based on the current sensitive image library, whether at least one display image corresponding to the current item is a non-sensitive image includes: Inputting the at least one display image into a pre-trained encoding model to obtain encoding results of each display image; If encoding data matching the encoding result of any one of the at least one display image is searched in the sensitive image library, it is determined that the at least one display image includes at least one sensitive image; If no encoding data matching the encoding result of each display image in the at least one display image is searched in the current sensitive image library, it is determined that the at least one display image is a non-sensitive item.
5. The method according to claim 1, characterized in that Also includes: If the at least one display image does not include at least one sensitive image, the current item is identified as a normal item, and the at least one display image is added to a current normal image library to update the current normal image library.
6. The method according to claim 1, characterized in that Also includes: The at least one sensitive image is added to the current sensitive image library to update the current sensitive image library.
7. The method according to claim 6, characterized in that The determining, according to the target recognition result, whether the at least one displayed image includes at least one sensitive image comprises: If the target recognition result includes a suspected sensitive mark, obtaining a review result of the current item, wherein the suspected sensitive mark is used to indicate that the current item is a suspected sensitive item; If the review result includes a review sensitive identifier, determining that the at least one displayed image includes at least one sensitive image, and determining a first image identifier of the sensitive image included in the at least one displayed image; The adding the at least one sensitive image to the current sensitive image library to update the current sensitive image library comprises: The image corresponding to the first image identifier is added to the current sensitive image library to update the current sensitive image library.
8. The method according to claim 7, characterized in that The step of determining the first image identifier of the sensitive image included in the at least one display image also includes: Determining a second image identifier of a non-sensitive image included in the at least one displayed image; Outputting prompt information for prompting to delete the sensitive image corresponding to the first image identifier; In response to the deletion operation of the sensitive image, the sensitive image corresponding to the first image identifier is added to the current sensitive image library to update the current sensitive image library; the normal image corresponding to the second image identifier is used as at least one new display image of the current item to update at least one display image of the current item.
9. The method according to claim 5, characterized in that After obtaining the target recognition result, it also includes: If the target recognition result includes a normal identification, the current object is identified as a normal object, and the at least one display image corresponding to the current object is added to a normal image library to update the normal image library.
10. The method according to claim 3 or 4, characterized in that: The encoding model is the Swin model.
11. The method according to claim 1, characterized in that: The multimodal recognition model includes a text encoder, an image encoder and a cross-modal encoder.
12. The method according to claim 1, characterized in that The text information includes at least one of text information in the at least one display image, text information in the detailed information of the current item, and title information corresponding to the at least one display image.
13. A sensitive item identification device, characterized in that: include: A sensitive image library module, used to determine whether at least one display image corresponding to the current item is a non-sensitive image based on a current sensitive image library, wherein the sensitive image library stores information of at least two sensitive images; a model recognition module, configured to input the at least one display image and text information of the at least one display image into a pre-trained multimodal recognition model if the at least one display image is a non-sensitive image, to obtain a target recognition result, wherein the target recognition result is used to characterize the probability that the current item is a sensitive item; A result processing module, used for determining whether the at least one displayed image includes at least one sensitive image according to the target recognition result; An updating module is used to identify the current item as a sensitive item if the at least one displayed image includes at least one sensitive image.
14. A server device, characterized in that: The server device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the sensitive item identification method as described in any one of claims 1-12.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the sensitive item identification method as described in any one of claims 1-12 is implemented.