Method for identifying sensitive information in image, related device and computer program product
By extracting images from videos to be reviewed, identifying and splicing text content, the problem of difficulty in identifying sensitive information in videos in the prior art is solved, and more accurate recognition of sensitive information is achieved.
Patent Information
- Application Number
- CN202411537386.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-21
AI Technical Summary
Existing video review technology is difficult to effectively identify and judge whether text information in videos, such as background text, barrage, subtitles, etc., contains sensitive information, such as sensitive speech, advertising promotion or insulting language.
By extracting each frame of the images to be reviewed from the video to be reviewed, identifying each line of text or columns of text, and splicing it according to semantic associations, a more complete text content is obtained, and sensitive information is finally recognized.
It realizes more accurate identification of text information in video, improves the accuracy and comprehensiveness of sensitive information recognition, and expands the coverage from image content to text in the image.
Smart Images

Figure CN119495086A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method and device for identifying sensitive information in an image, an electronic device, a computer-readable medium, and a computer program product. Background Art
[0002] With the explosive growth of Internet content, especially the rise of social media, online forums and various user-generated content platforms, the need to automatically detect video violation information is becoming increasingly urgent.
[0003] Current video review technology mainly focuses on the analysis of video images, that is, using computer vision algorithms to detect whether the image content in the video is illegal. Summary of the invention
[0004] Multiple aspects of the present application provide a method, device, electronic device, computer-readable storage medium and computer program product for identifying sensitive information in an image. When any domain component is called or its state changes, it not only transmits its component usage information to other components in the domain, but also broadcasts the component usage information outside the domain, so that components in non-same domains can obtain the component usage information by receiving the broadcast information, and forward the component usage information to the target current domain component with an associated relationship in the domain, thereby realizing cross-domain communication between components and the linkage change of their own states.
[0005] In one aspect of the present application, a method for identifying sensitive information in an image is provided, comprising: extracting each frame of the image to be reviewed from a video to be reviewed; for each frame of the image to be reviewed, identifying each row or column of text according to the arrangement of text information contained in the image to be reviewed; splicing each row or column of text according to the association between semantics to obtain a spliced sentence; and identifying sensitive information in the spliced sentence to obtain a sensitive information identification result.
[0006] In another aspect of the present application, there is provided an apparatus for identifying sensitive information in an image, comprising: an image extraction unit for review, configured to extract each frame of the image to be reviewed from a video to be reviewed; a text recognition unit, configured to identify each row of text or each column of text for each frame of the image to be reviewed according to the arrangement of text information contained in the image to be reviewed; a semantic splicing unit, configured to splice each row of text or each column of text according to the association between semantics to obtain a spliced sentence; and a sensitive information identification unit, configured to identify sensitive information in the spliced sentence to obtain a sensitive information identification result.
[0007] Another aspect of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for identifying sensitive information in an image as provided above.
[0008] In another aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the method for identifying sensitive information in an image as provided above.
[0009] In another aspect of the present application, a computer program product includes a computer program having computer program instructions stored thereon, and when the computer program is executed by a processor, the method for identifying sensitive information in an image as provided above can be implemented.
[0010] In the scheme provided in the embodiment of the present application, firstly, each frame of the image to be reviewed is extracted from the video to be reviewed, and then for each frame of the image to be reviewed, each line or column of text is accurately identified according to the arrangement of the text information contained therein, and then each line or column of text is spliced according to the association between the semantics to obtain a more complete text content with similar or identical semantics, and finally, sensitive information is identified for the more complete text content in the spliced sentences, thereby obtaining a more accurate sensitive information identification result. That is, by applying the scheme provided in this embodiment, not only the coverage of sensitive information identification is expanded from image content to text in the image (such as bullet screen), but also the semantic association between different texts can be fully considered to more accurately identify potential sensitive information, thereby improving the accuracy and comprehensiveness of sensitive information identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0012] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0013] Figure 1 A schematic diagram of a process for identifying sensitive information in an image provided by an embodiment of the present application;
[0014] Figure 2 A schematic diagram of a process of determining a spliced sentence based on an image to be reviewed provided in an embodiment of the present application;
[0015] Figure 3 A schematic diagram of a process of determining whether a concatenated sentence contains sensitive information and performing corresponding processing provided in an embodiment of the present application;
[0016] Figure 4 A schematic diagram of the structure of a device for identifying sensitive information in an image provided by an embodiment of the present application;
[0017] Figure 5 The present invention is a schematic diagram of the structure of an electronic device suitable for implementing the solution in the embodiment of the present application.
[0018] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0020] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.
[0021] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0022] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0023] As described in the background technology section: Current video review technology mainly focuses on analyzing video images, that is, using computer vision algorithms to detect whether the image content in the video is illegal, such as violence, pornography, or other inappropriate images. In actual applications, the text information in the video, including background text, barrage, subtitles, etc., may contain illegal content, such as sensitive speech, advertising promotion, or insulting language. Traditional video review systems often cannot effectively identify and determine whether these text contents comply with regulations.
[0024] To achieve this goal, an embodiment of the present application provides a method for identifying sensitive information in an image. The method first extracts each frame of the image to be reviewed from the video to be reviewed, and then for each frame of the image to be reviewed, accurately identifies each line of text or each column of text according to the arrangement of the text information contained therein, and then splices each line of text or each column of text according to the relationship between the semantics to obtain a more complete text content with similar or identical semantics, and finally obtains a more accurate sensitive information identification result by identifying the sensitive information of the more complete text content in the spliced sentence.
[0025] From the technical content provided by the above scheme, it can be seen that by applying this scheme, not only the coverage of sensitive information recognition is expanded from image content to text in the image (such as barrage), but also the semantic correlation between different texts can be fully considered to more accurately identify potential sensitive information, thereby improving the recognition accuracy and comprehensiveness of sensitive information.
[0026] In actual scenarios, the execution subject of the method can be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0027] When the execution subject is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here.
[0028] Figure 1 A process 100 for identifying sensitive information in an image provided by an embodiment of the present application is shown. The process 100 includes at least the following processing steps:
[0029] (Step) S101, extracting each frame of the image to be reviewed from the video to be reviewed.
[0030] In an embodiment of the present application, an execution entity (eg, a terminal device or a server with image processing capabilities) extracts each frame of the image to be reviewed from the video to be reviewed.
[0031] Specifically, the process of extracting each frame of the image to be reviewed from the video to be reviewed may involve multiple steps, such as video reading, frame extraction, and preprocessing and storing each extracted image frame. For example, multiple frames of the image to be reviewed may be extracted from the video to be reviewed at a rate of one frame per second, and of course, may also be extracted at other extraction intervals, which are not specifically limited here.
[0032] S102, for each frame of the image to be reviewed, identifying each row of text or each column of text according to the arrangement of text information contained in the image to be reviewed.
[0033] Based on S101, this step aims to have the above-mentioned execution subject identify each row or column of text according to the arrangement of text information contained in each frame of the image to be reviewed, using a text recognition method corresponding to its arrangement.
[0034] Specifically, the arrangement of text information in an image is usually divided into two types: horizontal or vertical. Of course, it does not rule out the possibility of diagonal or other special arrangements in a few scenarios. Taking horizontal text information as an example, for horizontal text information, a horizontal text recognition mechanism corresponding to horizontal text (such as a horizontal text recognition model) can be used to perform text recognition on the text information presented in horizontal format to obtain text in each row; similarly, if it is vertical, a vertical text recognition mechanism can be used to perform text recognition on the vertical text information to obtain text in each column.
[0035] Furthermore, before performing text recognition, it is also possible to first determine which part of the image to be reviewed contains text information. By segmenting the part of the image containing text information, the recognition image area for subsequent text recognition can be reduced, thereby avoiding interference and improving recognition accuracy.
[0036] S103, concatenating the lines or columns of text according to the semantic associations between them to obtain a concatenated sentence.
[0037] Based on S102, this step aims to connect the lines or columns of text by the execution subject according to the semantic relationship to obtain a connected sentence, which can be understood as analyzing different parts of the text and combining them into a meaningful sentence according to the semantic relationship.
[0038] Semantic association refers to the logical and meaningful relationship between words or sentences in a text. Common semantic associations include:
[0039] Synonym relationship: different words express the same or similar meaning;
[0040] Antonym: expressing opposite or opposite concepts;
[0041] Hyponym: one word is a specific instance of another word or a more general category;
[0042] Causation: One event causes another event to occur.
[0043] S104, performing sensitive information identification on the concatenated sentences to obtain a sensitive information identification result.
[0044] Based on S103, this step aims to perform sensitive information identification on the concatenated sentence by the above-mentioned execution subject to obtain a sensitive information identification result. Specifically, a pre-trained or configured sensitive information identification model can be used to determine whether the concatenated sentence contains sensitive words or related content representing sensitive information, and generate the sensitive information identification result based on the determination result.
[0045] Sensitive information can trigger further violation identification and violation handling operations, so that the images or videos to be reviewed containing sensitive information can be processed accordingly to avoid the display or presentation of sensitive information.
[0046] Please refer to Figure 2 , Figure 2 A schematic diagram of a process for determining a spliced sentence based on an image to be reviewed provided in an embodiment of the present application, that is, for Figure 1 S102 and S103 in the process 100 shown provide a specific implementation method, and other steps in the process 100 are not adjusted. The specific implementation method provided in this embodiment can be used to replace S102 and S103 to obtain a new complete embodiment. Figure 2 The illustrated process 200 includes the following steps:
[0047] S201, identifying the area where the text information contained in the image to be reviewed is located, and segmenting it to obtain a text image.
[0048] This step aims to firstly identify which parts of the image to be reviewed contain text features representing words, and segment the area where the text features appear to obtain a text image that is part of the image to be reviewed.
[0049] S202, identifying the arrangement of text information contained in the text image to obtain a target arrangement.
[0050] On the basis of step 201, this step aims to allow the execution subject to identify the arrangement of the text information contained in the text image, such as vertical or horizontal arrangement, and determine the correct arrangement as the target arrangement.
[0051] S203, extracting each row or column of text from the text image according to the target arrangement.
[0052] On the basis of step 202, this step aims to extract each row or column of text from the text image according to the target arrangement by the above-mentioned execution subject, that is, for horizontal text, each row of text is extracted using a recognition method corresponding to the horizontal arrangement; for vertical text, each column of text is extracted using a recognition method corresponding to the vertical arrangement. Specifically, a horizontal text recognition model or a vertical text recognition model pre-trained with training samples of the corresponding arrangement can be used.
[0053] This embodiment provides a method of first identifying the area containing text information through steps 201 to 203, then identifying the arrangement of the text information for the segmented text image containing the text information, and finally identifying the accurate text according to the recognition mechanism corresponding to the arrangement, thereby improving the recognition efficiency and the recognition accuracy.
[0054] S204, respectively identifying the actual semantics of each row or column of text.
[0055] Based on the recognition of each line or column of text, this step aims to have the above-mentioned execution subject recognize the actual semantics of each line or column of text respectively. The recognition of semantics can be completed through a pre-trained semantic recognition model, or with the help of a pre-built knowledge graph to perform entity recognition to help determine the semantics, or with the help of other semantic determination methods, such as sentence analysis, sentiment analysis, keyword matching, etc.
[0056] S205, determining the actual correlation degree between different actual semantics.
[0057] Based on step 204, this step aims to determine the actual degree of association between different actual semantics by the above-mentioned execution subject. Specifically, the actual degree of association can be presented by quantitative indicators, or can be reflected as different levels of association closeness, so as to present different association closeness in an appropriate manner.
[0058] S206, splicing corresponding row characters or column characters having actual correlation degrees exceeding a preset correlation degree to obtain a spliced sentence.
[0059] On the basis of step 205, this step aims at splicing corresponding row texts or column texts having actual correlation degrees exceeding a preset correlation degree by the above-mentioned execution subject to obtain a spliced sentence.
[0060] An implementation method including but not limited to may be:
[0061] First, at least two rows or columns of characters having an actual correlation degree exceeding a preset correlation degree are determined; then, a splicing order is determined according to the correlation points between the actual semantics of the at least two rows or columns of characters; finally, the at least two rows or columns of characters are spliced according to the splicing order to obtain a spliced sentence.
[0062] Specifically, the texts can be spliced according to semantic associations, usually by following the steps below:
[0063] 1) Semantic analysis
[0064] Analyze text data to identify keywords, phrases, and their semantic relationships in the text. This can be achieved through natural language processing (NLP) techniques such as part-of-speech tagging and named entity recognition.
[0065] 2) Constructing a semantic relationship graph
[0066] A semantic relationship graph is constructed based on the analysis results. This graph can help us understand the connections between rows and columns. For example, nodes and edges in graph theory can be used to represent words and their relationships.
[0067] 3) Choose a splicing strategy
[0068] Select appropriate splicing strategies based on semantic relationships. Splicing strategies may include:
[0069] Linear splicing: simply connect the contents of each row or column together;
[0070] Conditional splicing: splicing based on specific conditions (such as keyword matching);
[0071] Semantic Reorganization: Reorganize text according to semantic relationships to form more fluent sentences.
[0072] 4) Generate concatenated sentences
[0073] Generate the final concatenated sentence according to the concatenation strategy. This may involve adjusting the sentence structure and correcting the grammar.
[0074] That is, steps 204 to 206 provide an implementation scheme for first determining the semantics of text in each row or column, then determining the degree of correlation between the semantics, and finally concatenating the text with a higher degree of correlation to obtain a semantically complete sentence, so as to more comprehensively and accurately identify the comprehensive meaning expressed by the text in the image and facilitate the detection of sensitive information.
[0075] Please refer to Figure 3 , Figure 3 A schematic diagram of a process for determining whether a concatenated sentence contains sensitive information and performing corresponding processing provided in an embodiment of the present application, that is, for Figure 1 S104 in the process 100 shown provides a specific implementation method, and other steps in the process 100 are not adjusted. The specific implementation method provided in this embodiment can be used to replace S104 to obtain a new complete embodiment. Figure 3 The illustrated process 300 includes the following steps:
[0076] S301, using a preset sensitive word recognition model to perform sensitive word matching on the concatenated sentences to obtain a sensitive word matching result.
[0077] The solution provided in this step involves natural language processing (NLP) technology, and its main purpose is to identify whether the text contains certain predefined sensitive words and obtain matching results. It may include the following key technologies or key operations:
[0078] 1) Preset sensitive word list
[0079] Defining sensitive words: First, there needs to be a pre-defined list of sensitive words. These sensitive words may be related to specific topics, culture, laws, or social norms.
[0080] Dictionary construction: Sensitive words can be organized by category to form a dictionary. This dictionary can be a simple string list or structured data, such as a tree structure, for more efficient search.
[0081] 2) Preparation for sentence splicing
[0082] Text splicing: Splice multiple sentences or text paragraphs into a complete sentence or text block. When splicing, you need to ensure the coherence and grammatical correctness of the text to facilitate subsequent matching processing.
[0083] Text preprocessing: After concatenation, the text is preprocessed, including removing redundant spaces, standardizing punctuation, and converting to a unified character encoding (such as UTF-8).
[0084] 3) Sensitive word matching model
[0085] Building a model: You can use a variety of algorithms to match sensitive words, such as:
[0086] Dictionary-based matching: The simplest and most direct method is word-by-word matching, comparing the concatenated sentence with the sensitive word list;
[0087] Automata algorithm: Using efficient string matching algorithms such as AC (Aho-Corasick) algorithm, multiple sensitive words can be quickly found in large texts;
[0088] Regular expressions: Regular expressions can be used to match complex sensitive word patterns more flexibly;
[0089] Model training (optional): If necessary, you can use machine learning or deep learning technology to train the model to enable it to have better context understanding capabilities and improve the recognition rate of sensitive words.
[0090] 4) Matching process
[0091] Input text: Input the concatenated sentence into the sensitive word recognition model for processing.
[0092] Perform matching: The model will search for sensitive words in the text and record the matching results. The matching sensitive words and their locations can be returned.
[0093] Multiple matches: If the sentence is long or complex, you may need to match it in segments to ensure that all sensitive words are fully covered.
[0094] 5) Output matching results
[0095] Result display: Output a list of matching sensitive words and their positions or contexts in the text.
[0096] Subsequent processing: Based on the matching results, subsequent processing can be performed, such as content filtering, warning prompts, report generation, etc.
[0097] Through the above steps, the process of matching sensitive words in spliced sentences using the preset sensitive word recognition model is fully realized. The key to this technology is to build an efficient sensitive word library and select a suitable matching algorithm to achieve efficient and accurate matching results.
[0098] S302, judging whether a sensitive word is matched according to the sensitive word matching result, if matched, executing S303, otherwise executing S304.
[0099] This step aims to determine whether the concatenated sentence hits certain sensitive words based on the content of the sensitive word matching results, and execute different processing branches according to the judgment results.
[0100] S303, determining that there is a suspected violation in the spliced sentence.
[0101] This step is based on the judgment result of S302 that a sensitive word is hit, so it is determined that there is a suspected violation of the spliced sentence. The reason for the suspected violation is that it is not yet certain whether the sensitive word is caused by an error in the splicing operation or exists originally.
[0102] S304, determining that there is no violation in the concatenated sentence.
[0103] This step is based on the judgment result of S302 that no sensitive words are hit, so it is determined that there is no violation in the spliced sentence.
[0104] S305, using the word segmentation discrimination model to determine whether the suspected illegal concatenated sentence can be segmented, if it can be segmented, execute S309, otherwise execute S306.
[0105] On the basis of S303, this step aims to use the preset word segmentation discrimination model to determine whether the concatenated sentence can be segmented by the above-mentioned execution subject, and execute different processing branches according to the discrimination result. Among them, the word segmentation discrimination model is used to determine whether the input information can be further segmented into different word segments, and can be trained using corresponding sample inputs and training samples marked with labels indicating whether the words can be further segmented.
[0106] S306, correct the suspected violation to a confirmed violation.
[0107] This step is based on the judgment result of S305 that the concatenated sentence is a confirmed violation. This is because the word segmentation discrimination model determines that the concatenated sentence cannot be segmented, which means that the reason for hitting the sensitive word is not due to sentence splicing, but it is originally included. Therefore, it can be determined at this time that it is in a confirmed violation because it contains sensitive words.
[0108] S307, determining the violation level of the spliced sentence that has determined violation.
[0109] Based on S306, this step aims to determine the violation level of the spliced sentence with a determined violation by the above-mentioned execution subject. The correspondence between the sensitive words contained in the sentence and different violation levels can be pre-defined according to the number, field and sensitivity of the sensitive words, so that the actual violation level of the actual spliced sentence can be determined later according to the correspondence.
[0110] S308, performing corresponding processing on the images to be reviewed and the videos to be reviewed according to the violation levels.
[0111] Based on S307, this step aims to allow the above-mentioned execution entity to perform corresponding processing on the images and videos to be reviewed according to the violation level, such as requiring the removal of the frame of image containing sensitive information or the removal of sensitive information in the frame of image, or requiring the adjustment or deletion of the video content to avoid the presence of sensitive information.
[0112] S309, segmenting the concatenated sentence using a preset sensitive word segmentation model to obtain a segmentation result.
[0113] This step is based on the judgment result of S305 that the concatenated sentence can be segmented. Therefore, this step aims to segment the concatenated sentence by the above-mentioned execution subject using the preset sensitive word segmentation model to obtain the segmentation result, that is, each segmentation word.
[0114] S310, using a preset text classification model to determine the category to which each word in the segmentation result belongs, and determining the violation risk level of the spliced sentence according to the category.
[0115] Based on S309, this step aims to enable the above-mentioned execution subject to use a preset text classification model to determine the category (such as economy, emotion, etc.) to which each word in the segmentation result belongs, and further determine the overall violation risk level of the spliced sentence based on the determined category.
[0116] Similarly, the correspondence between different word segments contained in the sentence and different violation risk levels can be predefined according to the number, category and sensitivity of the different word segments contained in the sentence, so that the actual violation risk level of the actual spliced sentence can be determined later according to the correspondence.
[0117] S311, process the images to be reviewed and the videos to be reviewed accordingly according to the violation risk level.
[0118] Based on S310, this step aims to allow the above-mentioned execution subject to process the images and videos to be reviewed accordingly according to the violation risk level. For example, it may require the removal of the frame containing sensitive information or the removal of sensitive information in the frame, or it may require the adjustment or deletion of the video content to avoid the presence of sensitive information.
[0119] This embodiment first provides a two-stage judgment scheme for whether a concatenated sentence is indeed in violation of the rules by first determining whether a sensitive word is hit and then using a word segmentation judgment model to determine whether the word segmentation can be performed through S301-S306. On this basis, a violation handling scheme for concatenated sentences that are determined to be in violation is provided through S307-S308, and a risk judgment and handling scheme for concatenated sentences that can be segmented is provided through S309-S311.
[0120] It should be noted that the above three parts can form different embodiments respectively, and this embodiment only exists as a preferred embodiment that includes the above three parts at the same time.
[0121] In order to further deepen the understanding of the specific implementation process of this solution, this embodiment also provides a complete solution in combination with the application scenario:
[0122] Considering that the prominent feature of video content is its numerous frame slices, and the large number of videos to be reviewed on the platform, this leads to the rapid processing of a large number of frames in a limited time, which puts extremely high demands on computing resources. In order to meet this challenge, the entire processing flow needs to be shortened as much as possible. In the optical character recognition (OCR) link, the traditional detection and recognition method is used to directly input the image into a very lightweight text detection model and a very lightweight recognition model. This model only needs to slightly judge whether it is vertical, and then it can output the OCR result. However, due to the lightweight design of the OCR model, its misjudgment rate is relatively high, and there is a lack of error correction mechanism. Therefore, the need for the subsequent text processing link design is more complicated.
[0123] Specifically, video texts usually appear in the form of paragraphs, and there is a lack of semantic connection between the paragraphs, so these paragraphs need to be semantically spliced. After the splicing is completed, the text will be filtered for sensitive words. Through this process, potential risky sentences can be identified. In addition, the text will be further analyzed by the word segmentation model to determine whether the sensitive words can be reasonably segmented. For example, if a sensitive word is preceded and followed by other words, such as "AXXB", the words before and after "XX" can reasonably separate it, indicating that it does not really express the meaning of "XX", in which case no further review is required. On the contrary, if the sensitive word cannot be segmented, the text will be sent to a more complex text model for evaluation to determine whether it actually violates the relevant regulations before it will be reviewed.
[0124] Video recognition process:
[0125] 1) Extracting video frames from the video at a preset frame rate (e.g., 1 frame / second), and using the extracted video frames as images to be reviewed;
[0126] 2) Calling the text detection model to perform text detection on the image to be reviewed, and cropping the image to be reviewed based on the detected text to obtain a text image;
[0127] 3) Call the vertical text detection model to detect whether the text image contains vertical text. If so, jump to step 4-2); if not, jump to step 4-1);
[0128] 4) Calling a text recognition model to perform text recognition on the text image to obtain a text recognition result; wherein different solutions are adopted for different situations:
[0129] 4-1): For the non-vertical text image detected in 3), call the general text recognition model for recognition.
[0130] 4-2): For the vertical text image detected in 3), call the vertical text recognition model for recognition;
[0131] 5) Output the text recognition results corresponding to each text image;
[0132] 6) All text recognition results of the same frame are concatenated according to semantics to obtain a text string;
[0133] Since OCR recognition is performed on a line-by-line basis rather than a paragraph-by-paragraph basis, semantically related texts need to be pieced together to better allow the text model to understand whether a sentence is illegal.
[0134] 7) Based on the sensitive word platform, the sensitive word matching model is called to match the text string with sensitive words. If a sensitive word is matched, it is determined that the text string contains illegal information and output to 8);
[0135] 8) Call the word segmentation model to determine whether the text string can be segmented. If it cannot be segmented, it means that the text string expresses the original meaning of sensitive words and needs to be submitted for review;
[0136] If it can be segmented, it means that the expression may not be the original meaning of the sensitive word and needs further processing and output to 9);
[0137] 9) Call the sensitive word segmentation model to segment the text string, and input the segmentation results into the text classification model to determine its violation risk level information;
[0138] 10) The video is processed according to the violation information corresponding to each frame in the video, including release, submission for review, etc. For submission for review, the frame number corresponding to each violation risk level can be output to facilitate the reviewer to conduct targeted review to improve review efficiency.
[0139] The present application also provides a device for identifying sensitive information in an image. The structure of the device is as follows: Figure 4The device 400 shown. The device 400 includes: an image extraction unit 410 to be reviewed, configured to extract each frame of the image to be reviewed from the video to be reviewed; a text recognition unit 420, configured to identify each line of text or each column of text for each frame of the image to be reviewed according to the arrangement of the text information contained in the image to be reviewed; a semantic splicing unit 430, configured to splice each line of text or each column of text according to the association between semantics to obtain a spliced sentence; a sensitive information identification unit 440, configured to perform sensitive information identification on the spliced sentence to obtain a sensitive information identification result.
[0140] In some embodiments, the text recognition unit 420 can be further configured to: identify the area where the text information contained in the image to be reviewed is located, and segment it to obtain a text image; identify the arrangement of the text information contained in the text image to obtain a target arrangement; wherein the arrangement includes: horizontal or vertical; extract each row of text or each column of text from the text image according to the target arrangement.
[0141] In some embodiments, the semantic splicing unit 430 may include: an actual semantics recognition subunit, configured to respectively recognize the actual semantics of each row of text or each column of text; a correlation degree determination subunit, configured to determine the actual correlation degree between different actual semantics; and a splicing subunit, configured to splice corresponding rows of text or columns of text having an actual correlation degree exceeding a preset correlation degree to obtain a spliced sentence.
[0142] In some embodiments, the splicing subunit can be further configured to: determine at least two rows of characters or columns of characters that have an actual degree of association exceeding a preset degree of association; determine a splicing order based on the association points between the actual semantics of the at least two rows of characters or columns of characters; and splice the at least two rows of characters or columns of characters according to the splicing order to obtain a spliced sentence.
[0143] In some embodiments, the sensitive information identification unit 440 can be further configured to: use a preset sensitive word recognition model to match the concatenated sentences with sensitive words to obtain a sensitive word matching result; in response to the sensitive word matching result being a hit on the sensitive word, determine that the concatenated sentences have suspected violations; use a preset word segmentation judgment model to determine whether the concatenated sentences with suspected violations can be segmented to obtain a segmentation judgment result; in response to the segmentation judgment result being that the segmentation cannot be segmented, correct the suspected violation to a confirmed violation.
[0144] In some embodiments, the device 400 also includes: a violation level determination unit, configured to determine the violation level of the spliced sentences with determined violations; and a violation processing unit, configured to perform corresponding processing on the images to be reviewed and the videos to be reviewed according to the violation level.
[0145] In some embodiments, the device 400 also includes: a segmentation unit, configured to segment the concatenated sentence using a preset sensitive word segmentation model in response to the segmentation judgment result being able to be segmented, to obtain a segmentation result; a category determination and violation risk level determination unit, configured to determine the category to which each word in the segmentation result belongs using a preset text classification model, and determine the violation risk level of the concatenated sentence based on the category; a violation risk level processing unit, configured to perform corresponding processing on the images to be reviewed and the videos to be reviewed according to the violation risk level.
[0146] The embodiment of the present device corresponds to the embodiment of the method as shown in the above figures. First, each frame of the image to be reviewed is extracted from the video to be reviewed. Then, for each frame of the image to be reviewed, each line or column of text is accurately identified according to the arrangement of the text information contained therein. Then, each line or column of text is spliced according to the association between semantics to obtain a more complete text content with similar or identical semantics. Finally, sensitive information is identified for the more complete text content in the spliced sentences, thereby obtaining a more accurate sensitive information identification result. That is, by applying the solution provided by this embodiment, not only the coverage of sensitive information identification is expanded from image content to text in the image (such as barrage), but also the semantic association between different texts can be fully considered to more accurately identify potential sensitive information, thereby improving the accuracy and comprehensiveness of sensitive information identification.
[0147] Based on the same inventive concept, an electronic device, a readable storage medium and a computer program product are also provided in an embodiment of the present application. The method corresponding to the electronic device may be the method for identifying sensitive information in an image in the aforementioned embodiment, and its principle of solving the problem is similar to that of the method. The electronic device provided in an embodiment of the present application includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.
[0148] The electronic device may be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0149] Figure 5 The structure of an electronic device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown, and the electronic device 500 includes a central processing unit (CPU, Central Processing Unit) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 502 or the program loaded from the storage part 508 to the random access memory (RAM, Random Access Memory) 503. In RAM 503, various programs and data required for system operation are also stored. CPU 501, ROM 502 and RAM 503 are connected to each other through bus 505. Input / output (I / O, Input / Output) interface 504 is also connected to bus 505.
[0150] The following components are connected to the I / O interface 504: an input section 506 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; a storage section 508 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet.
[0151] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 501, the above functions defined in the method of the present application are executed.
[0152] Another embodiment of the present application further provides a computer-readable storage medium and a computer program product, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application.
[0153] Specifically, the present embodiment can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, systems, devices or devices including but not limited to electricity, magnetism, light, electromagnetic, infrared, or semiconductors, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media 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.
[0154] 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.
[0155] 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.
[0156] Computer program code for performing the operations of the present application 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).
[0157] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0158] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0159] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules and units is only a logical function division. There may be other division methods in actual implementation. For example, with units as an example, multiple units or page components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0160] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0161] In addition, each functional module or unit in each embodiment of the present application may be integrated into one processing module or unit, or each module or unit may exist physically separately, or two or more units may be integrated into one module or unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules or units.
[0162] The above-mentioned integrated modules and units implemented in the form of software function modules and units can be stored in a computer-readable storage medium. The above-mentioned software function modules and units are stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
[0164] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A method for identifying sensitive information in an image, characterized in that: include: Extracting each frame of images to be reviewed from the video to be reviewed; For each frame of the image to be reviewed, each row or column of text is identified according to the arrangement of text information contained in the image to be reviewed; splicing the lines of text or the columns of text according to the semantic associations between them to obtain a spliced sentence; Sensitive information is identified on the concatenated sentences to obtain a sensitive information identification result.
2. The method according to claim 1, characterized in that According to the arrangement of the text information contained in the image to be reviewed, each row of text or each column of text is identified, including: Identify the area where the text information contained in the image to be reviewed is located, and segment it to obtain a text image; Identify the arrangement of text information contained in the text image to obtain a target arrangement; wherein the arrangement includes: horizontal or vertical arrangement; Each row of text or each column of text is extracted from the text image according to the target arrangement.
3. The method according to claim 1, characterized in that The step of splicing the lines of text or the columns of text according to the semantic associations to obtain a spliced sentence includes: Respectively identifying the actual semantics of each row of text or each column of text; Determine the actual degree of association between different actual semantics; The corresponding row characters or column characters having actual correlation degrees exceeding a preset correlation degree are spliced to obtain the spliced sentence.
4. The method according to claim 3, characterized in that The step of splicing corresponding row characters or column characters having actual correlation degrees exceeding a preset correlation degree to obtain the spliced sentence includes: determining at least two row characters or column characters having an actual correlation degree exceeding the preset correlation degree; Determining a splicing order according to a correlation point between actual semantics of the at least two row characters or column characters; The at least two row characters or column characters are spliced in the splicing order to obtain the spliced sentence.
5. The method according to any one of claims 1 to 4, characterized in that: The step of performing sensitive information identification on the concatenated sentences to obtain a sensitive information identification result includes: Using a preset sensitive word recognition model to perform sensitive word matching on the concatenated sentence to obtain a sensitive word matching result; In response to the sensitive word matching result being a hit sensitive word, determining that the concatenated sentence has a suspected violation; Using a preset word segmentation discrimination model to judge whether the concatenated sentence with the suspected violation can be segmented, and obtaining a segmentation discrimination result; In response to the segmentation determination result being that segmentation is impossible, the suspected violation is corrected to a confirmed violation.
6. The method according to claim 5, characterized in that Also includes: determining the violation level of the spliced sentence containing the determined violation; The images to be reviewed and the videos to be reviewed are processed accordingly according to the violation levels.
7. The method according to claim 5, characterized in that Also includes: In response to the segmentation judgment result being that the sentence can be segmented, segmenting the concatenated sentence using a preset sensitive word segmentation model to obtain a segmentation result; Using a preset text classification model to determine the category to which each word in the segmentation result belongs, and determining the violation risk level of the spliced sentence according to the category; The images to be reviewed and the videos to be reviewed are processed accordingly according to the violation risk level.
8. A device for identifying sensitive information in an image, characterized in that: include: The to-be-reviewed image extraction unit is configured to extract each frame of to-be-reviewed image from the to-be-reviewed video; A text recognition unit is configured to recognize each row or column of text for each frame of the image to be reviewed according to the arrangement of text information contained in the image to be reviewed; A semantic splicing unit is configured to splice the lines of text or the columns of text according to the semantic associations between them to obtain a spliced sentence; The sensitive information identification unit is configured to perform sensitive information identification on the concatenated sentences to obtain a sensitive information identification result.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A computer-readable medium, characterized in that Computer program instructions are stored thereon, and the computer program instructions can be executed by a processor to implement the method as claimed in any one of claims 1 to 7.
11. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Document sequence identification method and device, storage medium and electronic equipment
CN110399601A
Text auditing method and device, electronic equipment and computer readable medium
CN113420757A
Text recognition and question and answer method and device, equipment and medium
CN114155530A
Sensitive word recognition method and apparatus based on artificial intelligence, and computer device
WO2021151333A1