Picture risk judgment method and device, electronic equipment and readable storage medium
By combining multimodal features and a problem chain template library with a multimodal large model, this method solves the problem of insufficient accuracy in image risk assessment in existing technologies, achieves efficient identification and assessment of implicit risks in images, and improves the accuracy and interpretability of the assessment results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2025-12-10
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies, when using multimodal feature fusion models for image risk assessment, cannot identify deep risks generated by cross-modal feature collaboration, and have poor generalization ability, resulting in insufficient accuracy in assessment.
By determining the multimodal features of the image to be judged, the target risk label is obtained, and the target question chain template is obtained from the question chain template library. The multimodal large model is used to obtain the answers to the target questions in sequence, and finally the risk judgment result is obtained based on multiple answers. The accuracy of the judgment is improved by combining knowledge graph and preset rules.
It effectively identifies implicit risks in images, improves the accuracy and interpretability of risk assessment, adapts to the risk assessment needs of multiple languages and regions, and enhances the ability to identify risks in images.
Smart Images

Figure CN121962698A_ABST
Abstract
Description
Image risk assessment methods, devices, electronic equipment, and readable storage media Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to the fields of artificial intelligence, such as computer vision, large-scale models, deep learning, and natural language processing. It provides a method, apparatus, electronic device, and readable storage medium for image risk assessment. Background Technology
[0002] Existing technologies typically employ multimodal feature fusion models or large multimodal models to assess the risk of images. However, when using multimodal feature fusion models or large multimodal models to determine whether an image contains risky content, there are technical problems such as the inability to identify deep risks generated by cross-modal feature collaboration and poor generalization ability, which reduce the accuracy of image risk assessment. Summary of the Invention
[0003] According to a first aspect of this disclosure, an image risk assessment method is provided, comprising: determining a target risk label for the image to be assessed based on multimodal features; obtaining a target question chain template corresponding to the target risk label from a question chain template library, and obtaining a target question chain based on the target question chain template and the multimodal features; using a multimodal large model to sequentially obtain the target answers for each target question in the target question chain; and obtaining a risk assessment result for the image to be assessed based on multiple target answers.
[0004] According to a second aspect of this disclosure, an image risk assessment device is provided, comprising: a determining unit, configured to determine a target risk label for the image to be assessed based on multimodal features of the image; a processing unit, configured to obtain a target question chain template corresponding to the target risk label from a question chain template library, and obtain a target question chain based on the target question chain template and the multimodal features; a question-answering unit, configured to use a multimodal large model to sequentially obtain target answers for each target question in the target question chain; and a judging unit, configured to obtain a risk assessment result for the image to be assessed based on multiple target answers.
[0005] According to a third aspect of this disclosure, an electronic device is provided, 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, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described above.
[0006] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method described above.
[0007] According to a fifth aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method described above.
[0008] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0009] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0010] Figure 1 is a schematic diagram according to a first embodiment of the present disclosure;
[0011] Figure 2 is a schematic diagram according to a second embodiment of the present disclosure;
[0012] Figure 3 is a schematic diagram according to a third embodiment of the present disclosure;
[0013] Figure 4 is a schematic diagram according to the fourth embodiment of the present disclosure;
[0014] Figure 5 is a block diagram of an electronic device used to implement the image risk assessment method of the present disclosure. Detailed Implementation
[0015] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and mechanisms are omitted in the following description.
[0016] Figure 1 is a schematic diagram according to the first embodiment of this disclosure. As shown in Figure 1, the image risk assessment method of this embodiment specifically includes the following steps:
[0017] S101. Determine the target risk label of the image to be judged based on the multimodal features of the image to be judged;
[0018] S102. Obtain the target problem chain template corresponding to the target risk label from the problem chain template library, and obtain the target problem chain based on the target problem chain template and the multimodal features;
[0019] S103. Using a multimodal large model, obtain the target answers for each target question in the target question chain in sequence;
[0020] S104. Based on multiple target answers, obtain the risk assessment result of the image to be judged.
[0021] The image risk assessment method in this embodiment improves the accuracy and flexibility of acquiring the target question chain by obtaining the target risk label determined by the multimodal features of the image to be assessed from the question chain template library. On the other hand, it obtains the risk assessment result based on the target answer of each target question in the corresponding target question chain, enabling risk assessment to be completed by analyzing the "thinking process" of the multimodal large model, thus improving the accuracy of the obtained risk assessment result.
[0022] In addition, this embodiment achieves the purpose of risk assessment based on the multimodal features of images, avoiding the problem that single-modal features cannot capture the deep risks generated by cross-modal collaboration. It can effectively identify implicit risks in images, thereby further enhancing the ability to assess risks in images.
[0023] In this embodiment, when executing S101, the image to be judged is first acquired, then the image to be judged is parsed to obtain the multimodal features of the image to be judged, and finally the target risk label of the image to be judged is determined based on the obtained multimodal features.
[0024] In this embodiment, when executing S101 to obtain the image to be judged, the image input or selected by the input terminal can be obtained as the image to be judged, or the image frame in the video input or selected by the input terminal can be obtained as the image to be judged; this embodiment does not limit the number of images to be judged obtained.
[0025] The multimodal features of the image to be judged obtained by executing S101 in this embodiment may include visual entities (such as faces, specific clothing, etc.) and text content in the image to be judged, and may also include scene understanding information (such as offices, streets, etc.) and semantic understanding information (such as emotions, tendencies, regions, etc.) of the image to be judged.
[0026] In this embodiment, when performing S101 to parse the image to be judged and obtain multimodal features, visual entities in the image to be judged can be detected by an image detection model, text content in the image to be judged can be extracted by optical character recognition technology, and scene understanding information and / or semantic understanding information of the image to be judged can be obtained by a multimodal large model.
[0027] In this embodiment, the multimodal large model is an artificial intelligence model that can process and understand different modal information (such as text, images, audio, video, etc.). Based on deep learning technology, it learns the intrinsic relationships and semantic representations between different modal data by training on a large-scale multimodal dataset, thereby having the ability to comprehensively process, analyze and generate multiple modal information.
[0028] It is understood that after obtaining the visual entities in the image to be judged by executing S101, this embodiment can further combine the preset knowledge graph to obtain knowledge information related to the visual entities, such as the identity information of the person corresponding to the face, and then determine the target risk label of the image to be judged based on the knowledge information and multimodal content, thereby further improving the accuracy of the determined target risk label.
[0029] In this embodiment, after obtaining the multimodal features of the image to be judged in S101, the target risk label of the image to be judged is determined based on the obtained multimodal features; wherein, the number of determined target risk labels can be one or more.
[0030] In this embodiment, when performing S101 to determine the target risk label of the image to be judged based on the multimodal features, the multimodal features can be matched in a preset risk label library, and then at least one risk label in the risk label library that matches the multimodal features is taken as the target risk label. The risk label library in this embodiment includes different risk labels and their corresponding multimodal features. The risk labels can be labels for insulting people, satirical events, malicious teasing, etc.
[0031] In this embodiment, when performing S101 to determine the target risk label of the image to be judged based on the multimodal features, the multimodal features and the first prompt text can also be input into the large model, and then the target risk label of the image to be judged can be determined based on the output of the large model. In this embodiment, the first prompt text is used to prompt the large model to generate the corresponding risk label based on the input multimodal features. The first prompt text may include example multimodal features and their corresponding example risk labels.
[0032] In this embodiment, after executing S101 to determine the target risk label of the image to be judged, S102 is executed to obtain the target problem chain template corresponding to the target risk label from the problem chain template library, and the target problem chain is obtained according to the target problem chain template and the multimodal content; wherein, the target problem chain obtained by executing S102 in this embodiment includes multiple target problems arranged in sequence.
[0033] In this embodiment, the preset problem chain template library includes different risk labels and their corresponding problem chain templates, and each problem chain template includes multiple problem templates arranged in sequence.
[0034] In this embodiment, each question chain template includes multiple question templates, which are, in order, an objective description question template (first question template), a text semantic question template (second question template), a cultural context question template (third question template), a public perception question template (fifth question template), and an intent inference question template (sixth question template).
[0035] For example, if the target risk tag is "insulting a person," the corresponding question chain templates in the question chain template library for the "insulting a person" tag could be: The objective description question template (Q_Describe) could be "Please objectively and comprehensively describe everything you see in this image."; the text semantic question template (Q_TextMeaning) could be "Leaving aside the image, considering only the text '[OCR extracted text content],' what are its common literal, extended, or metaphorical meanings in the Chinese internet environment?"; and the cultural context question template (Q_CulturalContext) could be "In [relevant regions]..." In Chinese culture or internet slang, what meaning or emotional tone is typically conveyed when "[OCR-extracted text content]" is used to describe a person? The public perception question template (Q_PublicPerception) could be: "Combining objective description and text semantics, how would a typical internet user most likely understand the meaning the image creator intended to express when seeing this combined text and image content?" The intent inference question template (Q_IntentInference) could be: "Based on all the above information, objectively analyze what the image creator's possible creative intent or desired effect is?"
[0036] In this embodiment, each question chain template corresponding to different risk labels includes six question templates arranged in sequence. The difference is that each question template in the question chain template corresponding to different risk labels may have different content.
[0037] For example, if the target risk label is the "event satire" label, the cultural context question template in the question chain template corresponding to the "event satire" label could be: "In the culture or internet memes of [relevant region], what meaning or emotional tone is usually conveyed when '[OCR extracted text content]' is used to describe an event?"
[0038] In this embodiment, after executing S102 to obtain the target problem chain template corresponding to the target risk label, the target problem chain can be obtained based on the obtained target problem chain template and the obtained multimodal features.
[0039] Since the target question chain template in this embodiment may be incomplete, that is, the question template has content to be filled in. For example, the text semantic question template and cultural context template in the above example need to be filled with text content extracted from the image. Therefore, when executing S102, this embodiment uses the multimodal features obtained from the image to be judged to fill in the corresponding question template in the target question chain template, and converts the question template with completed content filling into the corresponding target question, thereby obtaining the target question chain based on multiple target questions.
[0040] In other words, this embodiment combines the multimodal features in the image to be judged to convert multiple question templates in the target question chain template into multiple target questions corresponding to the image to be judged. For example, the first question template is converted into the first target question, the second question template is converted into the second target question, etc., which improves the completeness and accuracy of each target question in the target question chain.
[0041] It is understood that if multiple target risk labels are determined by executing S101 in this embodiment, when executing S102, this embodiment can obtain the corresponding target problem chain template from the problem chain template library for each target risk label, thereby obtaining multiple target problem chains.
[0042] In this embodiment, after obtaining the target question chain by executing S102, S103 is executed to use a multimodal large model to obtain the target answers for each target question in the target question chain in sequence.
[0043] Specifically, in this embodiment, when executing S103 using a multimodal large model to sequentially obtain the target answers for each target question in the target question chain, the implementation method can be as follows: For the current target question, according to the order of the current target questions, obtain the target input information corresponding to the current target question. In this embodiment, the target input information is either the image to be judged or the historical target answer; input the current target question and its corresponding target input information into the multimodal large model, and obtain the target answer for the current target question based on the output result of the multimodal large model.
[0044] In other words, this embodiment obtains the target input information corresponding to different target questions according to the order of different target questions, and then uses a multimodal large model to obtain the target answers of different target questions based on different target questions and their corresponding target input information. This achieves the purpose of obtaining the target answers corresponding to different target questions through chain reasoning, thereby improving the accuracy of the obtained target answers.
[0045] For example, if the current target question is the first target question (i.e., the objective description question), the target input information obtained by executing S103 in this embodiment is the image to be judged; if the current target question is not the first target question, such as the second target question (i.e., the text semantic question), the third target question (i.e., the cultural context question), etc., the target input information obtained by executing S103 in this embodiment is the historical target answer. The historical target answer can be all the target answers obtained before, or it can be the target answer corresponding to the previous target question.
[0046] In this embodiment, after executing S103 to obtain the target answers for each target question in the target question chain, S104 is executed to obtain the risk assessment result of the image to be judged based on the multiple target answers.
[0047] The risk assessment result obtained by executing S104 in this embodiment may include the risk level of the image to be assessed (one of low risk, medium risk or high risk), and may also include the target risk label of the image to be assessed.
[0048] In this embodiment, when executing S104 to obtain the risk assessment result of the image to be assessed based on multiple target answers, multiple target answers and the second prompt text can be input into the large model, and then the risk assessment result of the image to be assessed can be obtained based on the output result of the large model. The second prompt text in this embodiment is used to prompt the large model to generate the risk assessment result based on the multiple input target answers. The second prompt text may include example target answers and their corresponding example risk assessment results.
[0049] After obtaining the risk assessment result of the image to be assessed by executing S104, this embodiment may further include the following: in response to determining that the risk level in the risk assessment result meets the preset requirements, a judgment basis for the risk assessment result is generated based on multiple target answers; wherein, the risk level meeting the preset requirements can be a risk level of medium risk and high risk, or a risk level of high risk.
[0050] In other words, in addition to obtaining the risk assessment result of the image to be assessed, this embodiment can also obtain the basis for the risk assessment result based on multiple target answers when the risk assessment result meets the preset requirements, thereby providing a complete logical evidence chain and improving the interpretability when conducting risk assessment.
[0051] In this embodiment, when executing S104 to generate the judgment basis for risk assessment results based on multiple target answers, multiple target answers, risk levels, and third prompt text can be input into the large model. Then, the judgment basis for risk assessment results can be obtained based on the output of the large model. In this embodiment, the third prompt text is used to prompt the large model to generate the judgment basis based on the input multiple target answers and risk levels. The third prompt text may include example target answers and example risk levels, as well as their corresponding example judgment basis.
[0052] In addition, when executing S104 to generate the judgment basis for risk judgment results based on multiple target answers, this embodiment can first obtain the judgment basis template for the corresponding target risk label, and then fill the obtained judgment basis template according to multiple target answers, and use the filling result of the judgment basis template as the judgment basis corresponding to the risk judgment result.
[0053] For example, if the target risk label is "personal insult" and the risk assessment result is high risk, the judgment criteria generated by S104 in this embodiment can be: 1) Identification content: The main subject of the image is person A, covered with the text "donkey"; 2) Textual metaphor: The text "donkey" has negative metaphors such as "stupid" and "stubborn" in the target context; 3) Public understanding: This combination is very likely to lead the public to associate negative animal characteristics with person A; 4) Intent analysis: The creative intent is highly inclined to denigrate person A; 5) Key evidence chain: The second target answer mentions "negative metaphor" and the fourth target answer mentions "public insinuation".
[0054] In other words, the image risk assessment method in this embodiment assesses the risk of the image based on the multimodal features in the image to be assessed. This enhances the ability to identify implicit risks in the image. In addition to obtaining the risk assessment result of the image to be assessed, it can also obtain the basis for the corresponding risk assessment result, thereby improving the interpretability of the risk assessment result.
[0055] Figure 2 is a schematic diagram according to the second embodiment of this disclosure. As shown in Figure 2, when executing S104 "obtaining the risk assessment result of the image to be judged based on multiple target answers", this embodiment can be implemented in the following way:
[0056] S201. Determine the information extraction requirements corresponding to the target risk label;
[0057] S202. Based on the information extraction requirements, extract key answer information from the multiple target answers;
[0058] S203. Obtain the target risk score based on the key information in the answer, and obtain the risk assessment result of the image to be judged based on the target risk score.
[0059] In other words, this embodiment extracts key information of the answers from multiple target answers based on the target risk label, and then obtains the risk judgment result of the image to be judged based on the target risk score obtained from the extracted key information of the answers. This achieves the purpose of converting unstructured text answers into structured risk scores and improves the accuracy of the obtained risk judgment results.
[0060] In this embodiment, when executing S201, the information extraction requirement for the corresponding target risk label can be determined according to the preset correspondence between risk labels and information extraction requirements; alternatively, the target risk type can be determined first according to the target risk label, and then the information extraction requirement corresponding to the target risk type can be used as the information extraction requirement for the corresponding target risk label according to the preset correspondence between risk type and information extraction requirements.
[0061] In this embodiment, one risk type corresponds to at least one risk label. By determining the information extraction requirements based on the risk type corresponding to the risk label, this embodiment can reduce the number of pre-set information extraction requirements.
[0062] For example, if the target risk label is "personal insult", the information extraction requirements for the corresponding "personal insult" label determined in S201 of this embodiment can be as follows: extract an entity list (e.g., middle-aged man, ID photo, word "donkey") from the first target answer (i.e., the answer to the first target question); extract a list of textual symbolic meanings (e.g., "donkey" may be a metaphor for "stupid", "stubborn" or "obstinate") from the second and third target answers; extract a summary of public perception from the fourth target answer (e.g., users will think that this is using the characteristics of "donkey" to allude to the person); and extract intentional keywords (e.g., sarcasm, ridicule, personal attack, expression of dissatisfaction, etc.) from the fifth target answer.
[0063] In this embodiment, when executing S202, specific information can be extracted from multiple target answers as key information of the answer according to the determined information extraction requirements; wherein, in this embodiment, when executing S202, a text classification model or a named entity model can be used to complete the extraction of key information of the answer.
[0064] In this embodiment, when executing S203 to obtain the target risk score based on the extracted key answer information, the implementation method can be as follows: determine the scoring rules for the corresponding target risk label, wherein the determined scoring rules include different key answer information and their corresponding risk scores; and obtain the target risk score based on the determined scoring rules and key answer information.
[0065] For example, if the target risk label is "personal insult", the scoring rules determined by S203 in this embodiment can be: 1) If the entity list includes "specific person" and the text symbolic meaning list includes negative words and the public perception summary includes words such as "insinuation" and "insult", then the risk score is +0.6; 2) If the intent keywords include words such as "personal attack" and "insult", then the risk score is +0.3; 3) If the text in the picture has direct spatial overlap with the person (e.g., written on their face), then the risk score is +0.1.
[0066] In this embodiment, when executing S203 to obtain the risk assessment result of the image to be assessed based on the target risk score, the target risk score can be matched with the score range corresponding to different risk levels, and the risk level corresponding to the matched score range can be used as the risk assessment result of the image to be assessed. The risk level is one of low risk, medium risk, and high risk.
[0067] In addition, when executing S203 in this embodiment, the key information of the answer and the fourth prompt text can also be input into the large model, and the target risk score can be obtained based on the output of the large model. The fourth prompt text in this embodiment is used to prompt the large model to generate the target risk score based on the input key information of the answer, and the third prompt text may include the key information of the example answer and the example risk score.
[0068] It is understandable that if this embodiment uses key answer information extracted from multiple target answers to obtain the risk assessment result of the image to be assessed, then, if the risk level in the risk assessment result meets the preset requirements, the judgment basis for the risk assessment result can be generated based on the key answer information.
[0069] Figure 3 is a schematic diagram according to the third embodiment of this disclosure. As shown in Figure 3, this embodiment illustrates a flowchart of an image risk assessment method: S301, obtain the image to be assessed; S302, parse the image to be assessed to obtain multimodal features; S303, determine the target risk label based on the multimodal features; S304, obtain the target question chain template corresponding to the target risk label from the question chain template library, and obtain the target question chain based on the target question chain template; S305, use a multimodal large model to sequentially obtain the target answers for each target question in the target question chain template; S306, extract key answer information from multiple target answers based on the target risk label; S307, obtain the target risk score of the image to be assessed based on the key answer information; S308, obtain the risk assessment result of the image to be assessed and its corresponding assessment basis based on the target risk score.
[0070] The image risk assessment method of this embodiment can be used in social media platforms (real-time detection of implicitly prohibited images posted by users), news review systems (identification of news images with political metaphors), and advertising supervision systems (screening vulgar metaphorical marketing). By combining chain-like reasoning with the structuring of semantic elements to assess image risk, it can improve the accuracy and interpretability of image risk assessment. Furthermore, by updating the question chain templates in the question chain template library and the corresponding scoring rules, it can adapt to new risks, thereby improving the generalization ability of the image risk assessment method of this embodiment.
[0071] In addition, by adjusting the language used in the knowledge graph and template library, this embodiment can also achieve the goal of quickly supporting multilingual / multi-regional risk assessment.
[0072] Figure 4 is a schematic diagram according to the fourth embodiment of the present disclosure. As shown in Figure 4, the image risk assessment device 400 of this embodiment includes:
[0073] The determining unit 401 is used to determine the target risk label of the image to be determined based on the multimodal features of the image to be determined;
[0074] Processing unit 402 is used to obtain a target problem chain template corresponding to the target risk label from the problem chain template library, and to obtain a target problem chain based on the target problem chain template and the multimodal features;
[0075] Question-answering unit 403 is used to obtain the target answers for each target question in the target question chain sequentially using a multimodal large model;
[0076] The judgment unit 404 is used to obtain the risk judgment result of the image to be judged based on multiple target answers.
[0077] Unit 401 first acquires the image to be judged, then parses the image to be judged to obtain the multimodal features of the image to be judged, and finally determines the target risk label of the image to be judged based on the obtained multimodal features.
[0078] When the determining unit 401 acquires the image to be determined, it may acquire the image input or selected by the input terminal as the image to be determined, or it may acquire the image frame in the video input or selected by the input terminal as the image to be determined; in this embodiment, the number of images to be determined is not limited.
[0079] The multimodal features of the image to be judged obtained by the determining unit 401 may include visual entities (such as faces, specific clothing, etc.) and text content in the image to be judged, as well as scene understanding information (such as offices, streets, etc.) and semantic understanding information (such as emotions, tendencies, regions, etc.) of the image to be judged.
[0080] When determining the image to be judged and obtaining multimodal features, the determining unit 401 can detect visual entities in the image to be judged through an image detection model, extract text content in the image to be judged through optical character recognition technology, and obtain scene understanding information and / or semantic understanding information of the image to be judged through a multimodal large model.
[0081] In this embodiment, the multimodal large model is an artificial intelligence model that can process and understand different modal information (such as text, images, audio, video, etc.). Based on deep learning technology, it learns the intrinsic relationships and semantic representations between different modal data by training on a large-scale multimodal dataset, thereby having the ability to comprehensively process, analyze and generate multiple modal information.
[0082] It is understandable that after determining the visual entities in the image to be judged, the determining unit 401 can further combine the preset knowledge graph to obtain knowledge information related to the visual entities, such as the identity information of the person corresponding to the face, and then determine the target risk label of the image to be judged based on the knowledge information and multimodal content, thereby further improving the accuracy of the determined target risk label.
[0083] After obtaining the multimodal features of the image to be judged, the determining unit 401 determines the target risk label of the image to be judged based on the obtained multimodal features; wherein, the number of determined target risk labels can be one or more.
[0084] When determining the target risk label of the image to be judged based on the multimodal features, the determining unit 401 can match the multimodal features in a preset risk label library, and then take at least one risk label in the risk label library that matches the multimodal features as the target risk label. In this embodiment, the risk label library includes different risk labels and their corresponding multimodal features. The risk labels can be labels for insulting people, satirical events, malicious teasing, etc.
[0085] When determining the target risk label of the image to be judged based on the multimodal features, the determining unit 401 can also input the multimodal features and the first prompt text into the large model, and then determine the target risk label of the image to be judged based on the output of the large model. In this embodiment, the first prompt text is used to prompt the large model to generate the corresponding risk label based on the input multimodal features. The first prompt text may include example multimodal features and their corresponding example risk labels.
[0086] In this embodiment, after the determining unit 401 determines the target risk label of the image to be judged, the processing unit 402 obtains the target question chain template corresponding to the target risk label from the question chain template library, and obtains the target question chain based on the target question chain template and the multimodal content; wherein, the target question chain obtained by the processing unit 402 includes multiple target questions arranged in sequence.
[0087] In this embodiment, the preset problem chain template library includes different risk labels and their corresponding problem chain templates, and each problem chain template includes multiple problem templates arranged in sequence.
[0088] In this embodiment, each question chain template includes multiple question templates, which are, in order, an objective description question template (first question template), a text semantic question template (second question template), a cultural context question template (third question template), a public perception question template (fifth question template), and an intent inference question template (sixth question template).
[0089] In this embodiment, each question chain template corresponding to different risk labels includes six question templates arranged in sequence. The difference is that each question template in the question chain template corresponding to different risk labels may have different content.
[0090] After obtaining the target problem chain template corresponding to the target risk label, the processing unit 402 can obtain the target problem chain based on the obtained target problem chain template and the obtained multimodal features.
[0091] Since the target question chain template in this embodiment may be incomplete, that is, the question template has content to be filled in. For example, the text semantic question template and cultural context template in the above example need to be filled with text content extracted from the image. Therefore, the processing unit 402 uses the multimodal features obtained from the image to be judged to fill in the corresponding question template in the target question chain template, and converts the question template with completed content filling into the corresponding target question, thereby obtaining the target question chain based on multiple target questions.
[0092] In other words, the processing unit 402 combines the multimodal features in the image to be judged to convert multiple question templates in the target question chain template into multiple target questions corresponding to the image to be judged. For example, the first question template is converted into the first target question, the second question template is converted into the second target question, etc., which improves the completeness and accuracy of each target question in the target question chain.
[0093] It is understandable that if the determining unit 401 determines multiple target risk labels, the processing unit 402 can obtain the corresponding target problem chain template from the problem chain template library for each target risk label, thereby obtaining multiple target problem chains.
[0094] In this embodiment, after the processing unit 402 obtains the target question chain, the question-answering unit 403 uses a multimodal large model to sequentially obtain the target answers for each target question in the target question chain.
[0095] Specifically, when the question-answering unit 403 uses a multimodal large model to sequentially obtain the target answers for each target question in the target question chain, the implementation method can be as follows: for the current target question, according to the order of the current target questions, obtain the target input information corresponding to the current target question. In this embodiment, the target input information is either the image to be judged or the historical target answer; input the current target question and its corresponding target input information into the multimodal large model, and obtain the target answer for the current target question based on the output result of the multimodal large model.
[0096] In other words, the question-answering unit 403 obtains the target input information corresponding to different target questions according to the order of different target questions, and then uses a multimodal large model to obtain the target answers for different target questions based on the different target questions and their corresponding target input information. This achieves the purpose of obtaining the target answers corresponding to different target questions through chain reasoning, thereby improving the accuracy of the obtained target answers.
[0097] In this embodiment, after the question-answering unit 403 sequentially obtains the target answers to each target question in the target question chain, the judgment unit 404 obtains the risk judgment result of the image to be judged based on the multiple target answers.
[0098] The risk assessment result obtained by the assessment unit 404 may include the risk level of the image to be assessed (low risk, medium risk, or high risk), and may also include the target risk label of the image to be assessed.
[0099] When the judgment unit 404 obtains the risk judgment result of the image to be judged based on multiple target answers, it can input the multiple target answers and the second prompt text into the large model, and then obtain the risk judgment result of the image to be judged based on the output result of the large model. In this embodiment, the second prompt text is used to prompt the large model to generate the risk judgment result based on the multiple input target answers. The second prompt text may include example target answers and their corresponding example risk judgment results.
[0100] After obtaining the risk assessment result of the image to be assessed, the judgment unit 404 may also include the following: in response to determining that the risk level in the risk assessment result meets the preset requirements, it generates the judgment basis for the risk assessment result based on multiple target answers; wherein, the risk level meeting the preset requirements can be a risk level of medium risk and high risk, or a risk level of high risk.
[0101] In other words, in addition to obtaining the risk assessment result of the image to be assessed, the judgment unit 404 can also obtain the judgment basis of the risk assessment result based on multiple target answers when the risk assessment result meets the preset requirements, thereby providing a complete logical evidence chain and improving the interpretability when making risk assessments.
[0102] When the judgment unit 404 generates the judgment basis for the risk judgment result based on multiple target answers, it can input multiple target answers, risk levels and third prompt text into the large model, and then obtain the judgment basis for the risk judgment result based on the output of the large model. In this embodiment, the third prompt text is used to prompt the large model to generate the judgment basis based on the input multiple target answers and risk levels. The third prompt text may include example target answers and example risk levels, and their corresponding example judgment basis.
[0103] In addition, when the judgment unit 404 generates the judgment basis for the risk judgment result based on multiple target answers, it can first obtain the judgment basis template of the corresponding target risk label, and then fill the obtained judgment basis template according to multiple target answers, and use the filling result of the judgment basis template as the judgment basis corresponding to the risk judgment result.
[0104] In other words, the image risk assessment method in this embodiment assesses the risk of the image based on the multimodal features in the image to be assessed. This enhances the ability to identify implicit risks in the image. In addition to obtaining the risk assessment result of the image to be assessed, it can also obtain the basis for the corresponding risk assessment result, thereby improving the interpretability of the risk assessment result.
[0105] When the judgment unit 404 obtains the risk judgment result of the image to be judged based on multiple target answers, it can also adopt the following implementation method: determine the information extraction requirements of the corresponding target risk label; extract key information of the answer from multiple target answers according to the information extraction requirements;
[0106] The target risk score is obtained based on the key information in the answer, and the risk assessment result of the image to be judged is obtained based on the target risk score.
[0107] In other words, the judgment unit 404 extracts key information of the answer from multiple target answers based on the target risk label, and then obtains the risk judgment result of the image to be judged based on the target risk score obtained from the extracted key information of the answer. This achieves the purpose of converting unstructured text answers into structured risk scores and improves the accuracy of the obtained risk judgment result.
[0108] The determination unit 404 can determine the information extraction requirement of the corresponding target risk label based on the preset correspondence between risk labels and information extraction requirements; or it can first determine the target risk type based on the target risk label, and then, based on the preset correspondence between risk type and information extraction requirements, use the information extraction requirement corresponding to the target risk type as the information extraction requirement of the corresponding target risk label.
[0109] In this embodiment, one risk type corresponds to at least one risk label. By determining the information extraction requirements based on the risk type corresponding to the risk label, this embodiment can reduce the number of pre-set information extraction requirements.
[0110] The decision unit 404 can extract specific information from multiple target answers as key information of the answer according to the determined information extraction requirements; wherein, the decision unit 404 can use a text classification model or a named entity model to complete the extraction of key information of the answer.
[0111] When determining the target risk score based on the extracted key information of the answer, the determination unit 404 may adopt the following implementation method: determine the scoring rules for the corresponding target risk label, wherein the determined scoring rules include different key information of the answer and their corresponding risk scores; and obtain the target risk score based on the determined scoring rules and the key information of the answer.
[0112] When the judgment unit 404 obtains the risk judgment result of the image to be judged based on the target risk score, it can match the target risk score with the score range corresponding to different risk levels, and take the risk level corresponding to the matched score range as the risk judgment result of the image to be judged. The risk level is one of low risk, medium risk and high risk.
[0113] In addition, the determination unit 404 can also input the key information of the answer and the fourth prompt text into the large model, and obtain the target risk score based on the output of the large model; the fourth prompt text in this embodiment is used to prompt the large model to generate the target risk score based on the input key information of the answer, and the third prompt text may include the key information of the example answer and the example risk score.
[0114] It is understandable that if this embodiment uses key answer information extracted from multiple target answers to obtain the risk assessment result of the image to be assessed, then, if the risk level in the risk assessment result meets the preset requirements, the judgment basis for the risk assessment result can be generated based on the key answer information.
[0115] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0116] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0117] Figure 5 is a block diagram of an electronic device for an image risk assessment method according to an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0118] As shown in Figure 5, device 500 includes a computing unit 501, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 502 or a computer program loaded from storage unit 508 into random access memory (RAM) 503. RAM 503 can also store various programs and data required for the operation of device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. Input / output (I / O) interface 505 is also connected to bus 504.
[0119] Multiple components in device 500 are connected to I / O interface 505, including: input unit 506, such as keyboard, mouse, etc.; output unit 507, such as various types of displays, speakers, etc.; storage unit 508, such as disk, optical disk, etc.; and communication unit 509, such as network card, modem, wireless transceiver, etc. Communication unit 509 allows device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0120] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the image risk assessment method. For example, in some embodiments, the image risk assessment method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508.
[0121] In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by computing unit 501, one or more steps of the image risk assessment method described above may be performed. Alternatively, in other embodiments, computing unit 501 may be configured to perform the image risk assessment method by any other suitable means (e.g., by means of firmware).
[0122] Various implementations of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations may include: implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.
[0123] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to the processor or controller of a general-purpose computer, special-purpose computer, or other programmable image risk assessment device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0124] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0125] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for showing information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0126] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0127] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0128] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0129] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for determining image risk, comprising: Based on the multimodal features of the image to be judged, the target risk label of the image to be judged is determined; Obtain the target problem chain template corresponding to the target risk label from the problem chain template library, and obtain the target problem chain based on the target problem chain template and the multimodal features; Using a multimodal large model, the target answers for each target question in the target question chain are obtained sequentially; based on multiple target answers, the risk assessment result for the image to be judged is obtained.
2. The method according to claim 1, wherein, The step of using a multimodal large model to sequentially obtain the target answers for each target question in the target question chain includes: for the current target question, obtaining the target input information corresponding to the current target question according to the order of the current target questions; inputting the current target question and the target input information into the multimodal large model, and obtaining the target answer for the current target question according to the output result of the multimodal large model.
3. The method according to claim 1, wherein, The step of obtaining the risk assessment result of the image to be assessed based on multiple target answers includes: determining the information extraction requirements corresponding to the target risk label; extracting key answer information from the multiple target answers based on the information extraction requirements; obtaining a target risk score based on the key answer information; and obtaining the risk assessment result of the image to be assessed based on the target risk score.
4. The method according to claim 3, wherein, The step of obtaining the target risk score based on the key information of the answer includes: determining the scoring rules corresponding to the target risk label; and obtaining the target risk score based on the scoring rules and the key information of the answer.
5. The method according to claim 1 further includes, after obtaining the risk assessment result of the image to be assessed, in response to determining that the risk level in the risk assessment result meets the preset requirements, generating the judgment basis of the risk assessment result based on the plurality of target answers.
6. The method according to claim 1, wherein, The step of determining the target risk label of the image to be judged includes: obtaining a first prompt text; inputting the multimodal features and the first prompt text into a large model, and determining the target risk label of the image to be judged based on the output of the large model.
7. The method according to claim 5, wherein, The criteria for generating the risk assessment result based on the multiple target answers include: obtaining a third prompt text; inputting the multiple target answers, the risk level, and the third prompt text into a large model; and obtaining the criteria for the risk assessment result based on the output of the large model.
8. The method according to claim 5, wherein, The judgment criteria for generating the risk assessment result based on the multiple target answers include: obtaining a judgment criteria template corresponding to the target risk label; filling the judgment criteria template according to the multiple target answers; and using the filling result of the judgment criteria template as the judgment criteria.
9. The method according to claim 3, wherein, The step of determining the information extraction requirements corresponding to the target risk label includes: determining the target risk type based on the target risk label; and, based on the preset correspondence between risk types and information extraction requirements, using the information extraction requirements corresponding to the target risk type as the information extraction requirements corresponding to the target risk label.
10. An image risk assessment device, comprising: The determining unit is used to determine the target risk label of the image to be judged based on the multimodal features of the image to be judged; The processing unit is used to obtain the target question chain template corresponding to the target risk label from the question chain template library, and obtain the target question chain based on the target question chain template and the multimodal features; the question answering unit is used to use a multimodal large model to sequentially obtain the target answer for each target question in the target question chain; The judgment unit is used to obtain the risk judgment result of the image to be judged based on multiple target answers.
11. 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 to enable the at least one processor to perform the method of any one of claims 1-9.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-9.
13. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-9.