Content security auditing method, system and equipment based on multi-modal large model and medium

Through the content security audit method based on multimodal large model, the information fusion problems and user standards diversity in multimodal content audit are solved, and the content audit effect with high accuracy and flexibility is achieved.

CN119831528AActive Publication Date: 2025-04-15GUANGDONG ESHORE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411888207.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-15
Estimated Expiration
2044-12-20

AI Technical Summary

Technical Problem

The prior art is difficult to effectively integrate image and text information in multimodal content review, resulting in low accuracy; at the same time, in the face of content review in different scenarios, the challenges of user standards diversity and dynamic content, the existing technology has insufficient generalization capabilities.

Method used

The content security audit method based on multimodal large models is adopted, and the review data to be encoded through the image encoding module and the text encoding module, combined with user-defined audit standards, the pre-built large model module is used for audit inference and output prediction results.

Benefits of technology

It improves the accuracy and flexibility of content review, can adapt to user standards in different scenarios, and improves the accuracy, speed and flexibility of audit results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831528A_ABST
    Figure CN119831528A_ABST
Patent Text Reader

Abstract

The invention provides a multi-modal large model-based content security auditing method, system and device and a medium, and the method comprises the steps: obtaining to-be-audited data which is an image and / or a text; performing image coding and / or text coding on the to-be-audited data based on an image coding module and / or a text coding module to obtain a first target feature; obtaining a user-defined auditing standard, and performing text coding on the auditing standard based on the text coding module to obtain a second target feature; and performing auditing reasoning on the first target feature and the second target feature based on a pre-constructed large model module, and outputting a prediction result through an output layer module. According to the method, the user can customize the auditing standard, the challenge of diversity and dynamic content of the auditing standard is solved, and the auditing reasoning result has higher accuracy, speed and flexibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a content security review method, system, device and medium based on a multimodal large model. Background Art

[0002] Security content review is usually applied to various fields that need to maintain a healthy network environment and protect users from inappropriate information. The application scenarios include social media platforms, finance, e-commerce, and public utilities. At present, security content review mainly adopts regularization rule strategies, computer vision, natural speech processing and other methods. These conventional methods solve some content review problems, but in the face of multimodal content review, it is difficult for conventional technologies to use information from each modality for integration and end-to-end learning, and the accuracy is not high; and in the face of content review in different scenarios, users have different standards. Compliance in specific scenarios may be considered violations in other situations. Conventional technologies cannot adapt to content review in different scenarios, which poses a great challenge to the generalization ability of existing technologies. Summary of the invention

[0003] The embodiment of the present invention provides a content security review method, system, device and medium based on a multimodal large model to solve the problems existing in the related technologies. The technical solution is as follows:

[0004] In a first aspect, an embodiment of the present invention provides a content security review method based on a multimodal large model, comprising:

[0005] Acquire the data to be reviewed, where the data to be reviewed is an image and / or a text; perform image coding and / or text coding on the data to be reviewed based on an image coding module and / or a text coding module to obtain a first target feature;

[0006] Obtain the user-defined audit standard, and perform text encoding on the audit standard based on the text encoding module to obtain the second target feature;

[0007] Based on the pre-built large model module, the first target feature and the second target feature are audited and inferred, and then the prediction results for content security audit are output through the output layer module.

[0008] In one embodiment, it further includes:

[0009] Obtain a data set, which includes a pre-training data set, a fine-tuning training data set, and a test data set; wherein the pre-training data set includes data pairs of images and texts; the fine-tuning training data set is a combination of multiple types of data in images, texts, and user-defined audit standard labels; and the test data set is a combination of multiple types of data in images, texts, and user-defined audit standard labels;

[0010] The multimodal big model is trained based on the data set to obtain the optimal multimodal big model. The optimal multimodal big model is used to perform audit reasoning on the audit data and audit standards, and output the prediction results. The multimodal big model includes an image encoding module, a text encoding module, a big model module and an output layer module.

[0011] In one embodiment, image encoding and / or text encoding are performed on the data to be audited based on the image encoding module and / or the text encoding module to obtain the first target feature, including:

[0012] When the data to be reviewed is an image, the image is processed based on the convolutional downsampling model to output the first feature layer of 64*64*256;

[0013] The first feature layer is outputted through the convolutional position-aware transformer module as the second feature layer of 64*64*256. The convolutional position-aware transformer module is composed of 12 convolutional position-aware transformer blocks connected in series.

[0014] The second feature layer is processed by the information compression convolution module to output the third feature layer of 16*16*1024;

[0015] The third feature layer is converted into a 256*1024 feature layer and then input into the image channel alignment model, and a 256*768 feature layer is output to obtain the first target feature corresponding to the image.

[0016] In one embodiment, image encoding and / or text encoding are performed on the data to be audited based on the image encoding module and / or the text encoding module to obtain the first target feature, including:

[0017] When the data to be reviewed is text, the text is segmented to obtain multiple sub-words, and the multiple sub-words are mapped into multiple unique codes based on a pre-built vocabulary;

[0018] Based on the text embedding model and the position embedding module, multiple unique codes are mapped into multiple high-dimensional space vectors with a dimension of 1024 to obtain a high-dimensional vector of n*1024;

[0019] Input the n*1024 high-dimensional vector into the transformer block module and output the n*1024 feature layer;

[0020] The n*1024 feature layer is outputted into an n*768 feature layer through the text channel alignment module to obtain the first target feature corresponding to the text.

[0021] In one embodiment, auditing and reasoning the first target feature and the second target feature based on the pre-built large model module, and then outputting the prediction result for content security audit through the output layer module includes:

[0022] The first target feature and the second target feature are imported into the security expert module to merge the feature layers, and the output is a (256+n)*768 feature layer;

[0023] Input the (256+n)*768 feature layer into the self-attention network to obtain the attention output matrix;

[0024] Based on the feedforward network module, the attention output matrix is ​​nonlinearly transformed, and the (256+n)*768 feature layer is output to obtain the feedforward network output matrix;

[0025] The output layer module performs linear layer mapping on the output matrix of the feedforward network, outputs the logits matrix, and outputs the prediction results for content security review based on the logits matrix.

[0026] In one embodiment, the security expert module includes 24 security expert transformer blocks, each of which includes a self-attention network, a content-safe image expert, and a content-safe text expert; wherein the self-attention network is serially connected to the content-safe image expert, the self-attention network is serially connected to the content-safe text expert, and the content-safe image expert and the content-safe text expert are connected in parallel.

[0027] In one embodiment, the content security image expert is composed of a first fully connected layer and a second fully connected layer connected in series, the input feature number of the first fully connected layer is 768, the output feature number is 1536, the input feature number of the second fully connected layer is 1536, and the output feature number is 768; the content security text expert and the content security image expert have the same structure.

[0028] In a second aspect, an embodiment of the present invention provides a content security review system based on a multimodal big model, which executes the content security review method based on the multimodal big model as described above.

[0029] In a third aspect, an embodiment of the present invention provides an electronic device, the device comprising: a memory and a processor. The memory and the processor communicate with each other through an internal connection path, the memory is used to store instructions, the processor is used to execute the instructions stored in the memory, and when the processor executes the instructions stored in the memory, the processor executes the method in any one of the above-mentioned embodiments.

[0030] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer, the method in any one of the above-mentioned embodiments is executed.

[0031] The advantages or beneficial effects of the above technical solution include at least:

[0032] The present invention introduces a multimodal large model into content security auditing, realizing the automation and intelligence of the auditing; the data to be audited is subjected to image encoding and / or text encoding to realize a fine-grained understanding of the image and / or text, paving the way for user-defined audit standards in the subsequent reasoning stage, greatly improving the accuracy and flexibility of the algorithm; at the same time, user-defined audit standard labels are added, and the data to be audited and the audit standard labels are imported into a multimodal large model network exclusive to content security for audit reasoning, so that users can customize the audit standards in the reasoning stage, solving the challenges of audit standard diversity and dynamic content, and making the audit reasoning results have higher accuracy, speed and flexibility.

[0033] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present invention and should not be regarded as limiting the scope of the present invention.

[0035] Figure 1 It is a flowchart of the content review method based on the multimodal model of the present invention;

[0036] Figure 2 It is a schematic diagram of the structure of the multi-modal large model of the present invention;

[0037] Figure 3 It is a flow chart of the training method of the multimodal large model of the present invention;

[0038] Figure 4 It is a schematic diagram of reasoning of image modality data of the present invention;

[0039] Figure 5 The structure block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.

[0041] Security content review is usually used in various fields that need to maintain the health of the network environment and protect users from inappropriate information. Application scenarios include social media platforms, finance, e-commerce, and utilities.

[0042] Although existing solutions use regularized rule strategies, computer vision, natural speech processing and other technologies to solve some content review problems, they still face some technical bottlenecks and challenges:

[0043] (1) Accuracy: When it comes to multimodal content review, existing technologies have difficulty integrating information from each modality and performing end-to-end learning, resulting in low accuracy.

[0044] (2) Diversity of review standards: When reviewing content in different scenarios, users have different standards. What is compliant in a specific scenario may be considered a violation in other situations. This poses a great challenge to the generalization ability of existing technologies.

[0045] (3) Challenges of dynamic content: The nature of online content is dynamic, and cultural phenomena and trends emerge in an endless stream, which places higher demands on the flexibility and adaptability of technology.

[0046] In order to solve the above bottlenecks and challenges, this embodiment provides a content review method based on a multimodal large model, which realizes the functions of multimodal review and user-defined review standards, greatly improving the accuracy and generalization ability.

[0047] like Figure 1 As shown, a content review method based on a multimodal large model specifically includes the following steps:

[0048] Step S1: Acquire the data to be reviewed, which is an image and / or text; perform image encoding and / or text encoding on the data to be reviewed to obtain a first target feature.

[0049] Combination Figure 2 As shown in FIG, when the data to be reviewed is an image, the image is processed by the image encoding module. The image encoding module includes five small modules: a convolution downsampling module, a convolution position-aware transformer module, an information compression convolution module, and an image channel alignment module.

[0050] Among them, the convolution downsampling module is composed of three convolution kernel networks in series. The first convolution kernel network consists of a convolution kernel with a size of 3*3, 64 kernels, a step size of 2, and a padding of 1, a batch normalization bn, an activation function and a pooling layer with a step size of 2 in series; the second convolution kernel network consists of a convolution kernel with a size of 3*3, 128 kernels, a step size of 2, and a padding of 1, a batch normalization bn, an activation function and a pooling layer with a step size of 2 in series; the third convolution kernel network consists of a convolution kernel with a size of 1*1, 256 kernels, a step size of 1, and a padding of 0.

[0051] When the data to be reviewed is an image of size 1024*1024*3, the image is input into the convolution downsampling module, and the output is the first feature layer of 64*64*256.

[0052] The specific structure of the convolutional position-aware transformer module consists of 12 convolutional position-aware transformer blocks in series. The convolutional position-aware transformer block consists of a multi-head attention, a feedforward network and a position-aware convolutional network. The multi-head attention network has 8 attention heads, and the feedforward network consists of a fully connected layer with an input feature number of 256 and an output feature number of 1024, and a fully connected layer with an input feature number of 1024 and an output feature number of 256 in series; the position-aware convolutional network consists of a convolutional kernel with a size of 3*3, 128 kernels, a stride of 1, and a padding of 1.

[0053] The convolutional downsampling model outputs the first feature layer of 64*64*256, which is output as the second feature layer of 64*64*256 through the convolutional position-aware transformer module.

[0054] The information compression convolution module consists of a convolution kernel with a size of 3*3, a number of cores of 512, a stride of 2, and a padding of 1, and a convolution kernel with a size of 3*3, a number of cores of 1024, a stride of 2, and a padding of 1, connected in series.

[0055] The 64*64*256 second feature layer output by the convolutional position-aware transformer module is input into the information compression convolution module, and the third feature layer of 16*16*1024 is output.

[0056] The third feature layer of 16*16*1024 output by the information compression convolution module is expanded through the first dimension and the second dimension to obtain a 256*1024 feature layer, and the 256*1024 feature layer is input to the image channel alignment module, and the output is a 256*768 feature layer, thereby obtaining the first target feature corresponding to the image to be reviewed. Among them, the structure of the information compression convolution module is composed of a fully connected layer with an input feature number of 1024 and an output feature number of 768.

[0057] It should be explained that the first dimension refers to the height (or number of rows) of the feature layer, and in this embodiment the first dimension is 16. The second dimension refers to the width (or number of columns) of the feature layer, and in this embodiment the second dimension is also 16. Expanding the third feature layer of 16*16*1024 through the first and second dimensions means converting this three-dimensional feature layer (16 height*16 width*1024 channels) into a two-dimensional feature layer (256*1024), where 256 is 16 (height) multiplied by 16 (width), and 1024 is the number of channels. In this embodiment, the spatial information (height and width) is converted into a single dimension for subsequent processing, such as input to the fully connected layer.

[0058] When the data to be reviewed is text, the text is processed by the text encoding module. The text encoding module includes six modules: WordPiece word segmentation module, text embedding module, position embedding module, embedding module, transformer block module and text channel alignment module. Specifically:

[0059] The WordPiece word segmentation module uses the WordPiece algorithm to build a vocabulary, and segments the input text to be reviewed into n sub-words, and maps the n sub-words into n unique coding IDs based on the vocabulary.

[0060] The text embedding module maps the n IDs output by the WordPiece word segmentation module to n high-dimensional space vectors with a dimension of 1024 through embedding.

[0061] It should be noted that in machine learning and deep learning, embedding is a technique for representing data items (such as words, images, or other types of data) as fixed-length vectors. Embedding is usually learned through a training process. The model adjusts the embedding vector based on patterns and relationships in the data in order to better complete specific tasks.

[0062] The position embedding module is a learnable matrix of size n*1024, where the position encoding is randomly initialized and updated by back propagation during training. The embedding module is obtained by adding the high-dimensional vector output by the text embedding module to the high-dimensional vector of the position embedding module.

[0063] The input of the transformer block module is the n*1024 high-dimensional vector output by the embedding module, and the output is an n*1024 feature layer. The structure of the transformer block module is composed of 12 transformer blocks in series. The transformer block consists of a multi-head attention and a feedforward network. The multi-head attention network has 8 attention heads. The feedforward network consists of a fully connected layer with an input feature number of 1024 and an output feature number of 2048, and a fully connected layer with an input feature number of 2048 and an output feature number of 1024 in series.

[0064] The input of the text channel alignment module is the n*1024 feature layer output by the transformer block module, and the output of the text channel alignment module is the n*768 feature layer, thereby obtaining the first target feature corresponding to the text to be reviewed. The structure of the text channel alignment module is a fully connected layer with an input feature number of 1024 and an output feature number of 768.

[0065] Step S2: Obtain the user-defined audit standard, perform text encoding on the audit standard, and obtain the second target feature.

[0066] Due to different content review scenarios, the user's standards are different. Compliance in a specific scenario may be considered as violation in other scenarios. Therefore, in this embodiment, the user can input customized review standards according to the actual scenario, so that the customized review standards can be combined to conduct review reasoning on the data to be reviewed.

[0067] In this embodiment, the user-defined audit standards are generally input in text form. Therefore, when the user-defined audit standards are received, the audit standards are text-encoded to facilitate importing into the multimodal large model for audit reasoning.

[0068] The text encoding of the audit standards is also processed using the text encoding module, which is the same as the method of text encoding the text to be audited mentioned above, and will not be repeated here.

[0069] Step S3: Based on the pre-built large model module, the first target feature and the second target feature are audited and inferred, and then the prediction results for content security audit are output through the output layer module.

[0070] The large model module of this embodiment specifically includes three small modules: a security expert module, a multi-head attention module, and a feedforward network module.

[0071] The structure of the security expert module consists of 24 security expert transformer blocks, each of which consists of a self-attention network with 8 attention heads, a content-safe image expert, and a content-safe text expert. The self-attention network is serial with the content-safe image expert, the self-attention network is serial with the content-safe text expert, and the content-safe image expert and the content-safe text expert are parallel.

[0072] The content-safe image expert is composed of a fully connected layer with an input feature number of 768 and an output feature number of 1536, and a fully connected layer with an input feature number of 1536 and an output feature number of 768 in series; the content-safe text expert has the same structure as the content-safe image expert.

[0073] The first target feature and the second target feature are input into the security expert module, that is, the 256*768 feature layer output by the image channel alignment module and the n*768 feature layer output by the text channel alignment module are input into the security expert module, and the output is a (256+n)*768 feature layer.

[0074] The structure of the multi-head attention module is a self-attention network with 8 attention heads. The (256+n)*768 feature layer output by the security expert module is input into the multi-head attention module, and the attention output matrix, i.e., the (256+n)*768 feature layer, is output.

[0075] The structure of the feedforward network module is composed of a fully connected layer with an input feature number of 768 and an output feature number of 1536, and a fully connected layer with an input feature number of 1536 and an output feature number of 768. Based on the feedforward network module, the attention output matrix is ​​transformed nonlinearly to obtain the feedforward network output matrix; that is, the input of the feedforward network model is the (256+n)*768 feature layer output by the multi-head attention module, and the output is the (256+n)*768 feature layer.

[0076] Afterwards, the (256+n)*768 feature layer output by the feedforward network module passes through the output layer module to output the logits matrix. The logits matrix output by the output layer module represents the original scores or probabilities of the model for different categories. The logits matrix passes through the Softmax function to obtain the dictionary probability value, and the dictionary category with the highest probability is selected as the final prediction result.

[0077] It should be noted that the multimodal large model mentioned in this embodiment is composed of an image encoding module, a text encoding module, a large model module and an output layer module. After the multimodal large model is trained with a training set, the data to be reviewed and the user-defined review criteria can be input into the trained multimodal large language model in the actual use process to output the corresponding prediction results, and the prediction results can be used for content security review, that is, to determine whether the prediction results are sensitive words, or to review whether there is harmful information in the prediction results, etc. The content security review can be conducted manually or by comparing sensitive words in the database.

[0078] like Figure 3 As shown, in this embodiment, the method for constructing a multimodal large model is:

[0079] a. Obtain massive image and text datasets through crawlers and open source datasets, and create pre-training datasets, fine-tuning training datasets, and test datasets; among which, the pre-training dataset includes data pairs of images and texts, and the text is a description of the image. The fine-tuning training dataset is a combination of multiple types of data including images, texts, and user-defined audit standard labels, that is, the first type of data in the fine-tuning training dataset is images, texts, and user-defined audit standard labels, the second type of data is images and user-defined audit standard labels, and the third type of data is text and user-defined audit standard labels. The test dataset is consistent with the fine-tuning training dataset, both of which are combinations of multiple types of data including images, texts, and user-defined audit standard labels.

[0080] The pre-training dataset, fine-tuning training dataset, and test dataset are all processed by the image encoding module and the text encoding module before being used to train the multimodal large model, so that each dataset can be used for the training of the multimodal large model.

[0081] b. Use the pre-training dataset to pre-train the multimodal large model, which specifically includes the following steps:

[0082] The loss objective function is set to use cross entropy loss to calculate the cross entropy difference between the actual next word and the predicted next word, as follows:

[0083]

[0084] The vocabulary contains V words. For a given input, the probability distribution of the model predicting the next word is P = [p1, p2, ..., pV], where pi is the probability that the model predicts that the i-th word is the next word. The true distribution Q = [q1, q2, ..., qV] is a one-hot encoded vector, where qi is 1, indicating that the next word is the i-th word, and the rest are 0.

[0085] The optimizer setting uses the AdamW optimizer for training. The AdamW optimizer provides a more stable and efficient training method by improving the processing of weight decay.

[0086] c. Fine-tune the multimodal large model using the fine-tuning training data set, and obtain the optimal multimodal large model through the test data, which specifically includes the following steps:

[0087] The setting of the loss objective function includes the image and text model feature space alignment loss and the model prediction cross entropy loss. The image and text model feature space alignment loss uses a generative adversarial network, as follows:

[0088]

[0089] Among them, D is the discriminator, which is composed of MLP network, x is the feature output by S21 text encoding module, z is the input image, G is the image encoding module, p data (x) is the text feature distribution, p z (z) is the image distribution; min G max D V(D,G) represents the adversarial process between the image encoding module and the discriminator (D), where min and max represent the process of minimizing and maximizing the objective function V, respectively. x~pdata(x) Represents the distribution of real text feature data p data The expected value of the text feature sample x is obtained by sampling, which is used to calculate the discriminator's ability to judge the real text feature sample; D(x) is the probability of the discriminator's judgment on the real text feature sample x; E z ~p z (Z) represents the expected value of image z sampled from the prior image distribution pz, which is used by the generator to generate image feature samples. D(G(z)) is the judgment probability of the discriminator on the image feature G(z) generated by the generator.

[0090] The optimizer settings use the AdamW optimizer for training.

[0091] For example, Figure 4 As shown, when the image to be reviewed is an airplane image, the user can enter "car accident, fire, weapon" etc. as custom review criteria, and then import them into the multimodal large model together to output the "military weapon" result.

[0092] This embodiment designs a content security-specific multimodal large model network, so that the network has higher accuracy, speed and flexibility; in the construction of the multimodal large model, a fine-grained image encoding network is constructed to improve the recognition ability of image content information, and in the large model module, a security content image expert and security content text expert module network are designed to improve the accuracy of the review; in the pre-training stage, generative adversarial loss is used to align the embedded vector space of image and text modalities, which well handles the fusion and mutual optimization of different modalities and improves the accuracy of the review; in the fine-tuning training stage, the user's review standards are added and the multimodal large model is fine-tuned together with the fine-tuning data, which solves the challenges of diversity of review standards and dynamic content.

[0093] Another embodiment of the present invention provides a content security audit system based on a multimodal large model, which executes the content security audit method based on a multimodal large model as described above. The functions of each module in the system of the embodiment of the present invention can be referred to the corresponding description in the above method, and will not be repeated here.

[0094] Another embodiment of the present invention provides an electronic device, Figure 5 FIG. 2 shows a structural block diagram of an electronic device according to an embodiment of the present invention. Figure 5 As shown, the electronic device includes: a memory 100 and a processor 200, wherein the memory 100 stores a computer program that can be run on the processor 200. When the processor 200 executes the computer program, the content security audit method based on the multimodal large model in the above embodiment is implemented. The number of the memory 100 and the processor 200 can be one or more.

[0095] The electronic device also includes:

[0096] The communication interface 300 is used to communicate with external devices and perform data exchange transmission.

[0097] If the memory 100, the processor 200 and the communication interface 300 are implemented independently, the memory 100, the processor 200 and the communication interface 300 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0098] Optionally, in a specific implementation, if the memory 100, the processor 200 and the communication interface 300 are integrated on a chip, the memory 100, the processor 200 and the communication interface 300 can communicate with each other through an internal interface.

[0099] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present invention when executed by a processor.

[0100] An embodiment of the present invention further provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present invention.

[0101] An embodiment of the present invention also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided by the embodiment of the invention.

[0102] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.

[0103] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).

[0104] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0105] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0106] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0107] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of various changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A content security audit method based on a multimodal large model, characterized in that: include: Acquire data to be reviewed, wherein the data to be reviewed is an image and / or text; Performing image encoding and / or text encoding on the data to be reviewed based on the image encoding module and / or the text encoding module to obtain a first target feature; Acquire a user-defined audit standard, and perform text encoding on the audit standard based on the text encoding module to obtain a second target feature; The first target feature and the second target feature are audited and inferred based on the pre-built large model module, and then the prediction results for content security audit are output through the output layer module.

2. According to claim 1, the content security audit method based on the multimodal large model is characterized in that: Also includes: Acquire a data set, wherein the data set includes a pre-training data set, a fine-tuning training data set, and a test data set; wherein the pre-training data set includes data pairs of images and texts; The fine-tuning training data set is a combination of multiple types of data including images, texts, and user-defined audit standard labels; the test data set is a combination of multiple types of data including images, texts, and user-defined audit standard labels; The multimodal big model is trained based on the data set to obtain an optimal multimodal big model, and the optimal multimodal big model is used to perform audit reasoning on the data to be audited and the audit standard, and output the prediction result; the multimodal big model includes the image encoding module, the text encoding module, the big model module and the output layer module.

3. According to claim 1, the content security audit method based on the multimodal large model is characterized in that: The image encoding and / or text encoding of the to-be-audited data based on the image encoding module and / or the text encoding module to obtain the first target feature includes: When the data to be reviewed is an image, the image is processed based on a convolutional downsampling model to output a first feature layer of 64*64*256; The first feature layer outputs a second feature layer of 64*64*256 through a convolutional position-aware transformer module, wherein the convolutional position-aware transformer module is composed of 12 convolutional position-aware transformer blocks connected in series; The second feature layer is processed by an information compression convolution module to output a third feature layer of 16*16*1024; The third feature layer is converted into a 256*1024 feature layer and then input into the image channel alignment model, and a 256*768 feature layer is output to obtain the first target feature corresponding to the image.

4. According to claim 1, the content security audit method based on the multimodal large model is characterized in that: The image encoding and / or text encoding of the to-be-audited data based on the image encoding module and / or the text encoding module to obtain the first target feature includes: In the case where the data to be reviewed is text, segmenting the text to obtain multiple subwords, and mapping the multiple subwords into multiple unique codes based on a pre-built vocabulary; Based on the text embedding model and the position embedding module, the multiple unique codes are mapped into multiple high-dimensional space vectors with a dimension of 1024 to obtain a high-dimensional vector of n*1024; Input the n*1024 high-dimensional vector into the transformer block module and output the n*1024 feature layer; The n*1024 feature layer is outputted into an n*768 feature layer through a text channel alignment module to obtain the first target feature corresponding to the text.

5. According to claim 1, the content security audit method based on the multimodal large model is characterized in that: The pre-built large model module performs audit reasoning on the first target feature and the second target feature, and then outputs the prediction result for content security audit through the output layer module, including: Import the first target feature and the second target feature into the security expert module to merge the feature layers, and output a (256+n)*768 feature layer; Input the (256+n)*768 feature layer into the self-attention network to obtain the attention output matrix; Based on the feedforward network module, the attention output matrix is ​​nonlinearly transformed, and a (256+n)*768 feature layer is output to obtain a feedforward network output matrix; The output matrix of the feedforward network is linearly mapped through an output layer module to output a logits matrix, and the prediction result is output according to the logits matrix, and the prediction result is used for content security review.

6. According to claim 5, the content security audit method based on the multimodal large model is characterized in that: The security expert module includes 24 security expert transformer blocks, each of which includes a self-attention network, a content-safe image expert and a content-safe text expert; wherein the self-attention network is serially connected to the content-safe image expert, the self-attention network is serially connected to the content-safe text expert, and the content-safe image expert and the content-safe text expert are parallel.

7. The content security audit method based on a multimodal large model according to claim 6 is characterized in that: The content security image expert is composed of a first fully connected layer and a second fully connected layer in series, the first fully connected layer has an input feature number of 768 and an output feature number of 1536, and the second fully connected layer has an input feature number of 1536 and an output feature number of 768; The content-safe text expert and the content-safe image expert have the same structure.

8. A content security review system based on a multimodal large model, characterized in that: Execute the content security audit method based on the multimodal large model as described in any one of claims 1 to 7.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the content security audit method based on a multimodal large model as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the content security audit method based on a multimodal large model as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Content auditing method, training method of content auditing model and related device

    CN115565038A

  • Combined vision and language learning models for automated medical reports generation

    US20230386646A1