Image-text content quality identification method and device based on artificial intelligence
1. An artificial intelligence-based image-text content quality identification method is characterized by comprising the following steps:
acquiring an article to be identified, and extracting article prior characteristics, text content and image-text sequence characteristics of the article to be identified;
performing feature cross processing on the prior features of the articles to obtain cross prior feature vectors;
generating a document feature vector of the article to be identified according to the text content;
weighting each image-text sequence characteristic to obtain image-text sequence characteristic vectors after weighting;
carrying out full connection processing on the cross prior feature vector, the document feature vector and the image-text sequence feature vector after weighting processing to obtain a comprehensive feature vector of the article to be identified;
and determining the image-text content quality of the article to be identified based on the comprehensive feature vector.
2. The method of claim 1, wherein said cross-feature processing each of said article prior features to obtain a cross-prior feature vector comprises:
respectively constructing a sparse feature embedding layer and a dense feature embedding layer according to the prior features of the articles;
and performing feature cross processing on the prior features of the articles based on the sparse feature embedding layer and the dense feature embedding layer to generate cross prior feature vectors.
3. The method of claim 1, wherein the weighting each of the teletext sequence features to obtain a weighted teletext sequence feature vector comprises:
generating image-text sequence feature vectors corresponding to the image-text sequence features according to the trained two-way memory network model; the image-text sequence characteristics are generated according to the trained typesetting structure model;
and performing weighting processing on each image-text sequence feature vector according to a weighting mechanism to generate image-text sequence feature vectors after weighting processing.
4. The method of claim 1, wherein the generating a document feature vector of the article to be identified from the text content comprises:
determining a hierarchical structure corresponding to the text content according to the trained multilayer attention model;
and generating a document feature vector corresponding to the text content based on the hierarchical structure and the trained language representation model.
5. The method according to any one of claims 1 to 3, wherein the determining the teletext content quality of the article to be identified based on the composite feature vector comprises:
calculating to obtain quality data of the comprehensive characteristic vector according to the trained quality assessment integration model;
and determining the image-text content quality of the article to be identified according to the quality data.
6. The method of claim 4, wherein generating a document feature vector corresponding to the text content based on the hierarchy and a trained language characterization model comprises:
generating a first hidden vector corresponding to each word vector based on the hierarchical structure and the trained language representation model;
determining a first contribution importance weight corresponding to each of the word vectors according to the word vectors and the corresponding first latent vectors;
carrying out weighting processing on the word vector according to the first contribution importance weight to generate a sentence vector corresponding to the article to be recognized;
generating a second hidden vector corresponding to the sentence vector based on the hierarchical structure and the trained language representation model;
determining a second contribution importance weight corresponding to each sentence vector according to the sentence vector and the second hidden vector;
and performing weighting processing on the sentence vector according to the second contribution importance weight to generate a document feature vector corresponding to the article to be identified.
7. The method of claim 5, wherein determining the quality of the teletext content of the article to be identified based on the quality data further comprises:
determining a corresponding weighting processing mode according to the image-text content quality;
and carrying out hierarchical weighting processing on the corresponding image-text contents according to the weighting processing mode.
8. An artificial intelligence-based image-text content quality identification device, characterized in that the device comprises:
the system comprises an article to be identified acquisition module, a text content acquisition module and a text sequence acquisition module, wherein the article to be identified acquisition module is used for acquiring an article to be identified and extracting article prior characteristics, text content and image-text sequence characteristics of the article to be identified;
the cross prior feature vector generation module is used for performing feature cross processing on the prior features of the articles to obtain cross prior feature vectors;
the document feature vector generating module is used for generating a document feature vector of the article to be identified according to the text content;
the image-text sequence feature vector generation module is used for weighting each image-text sequence feature to obtain image-text sequence feature vectors after weighting;
the comprehensive characteristic vector generating module is used for carrying out full connection processing on the cross prior characteristic vector, the document characteristic vector and the image-text sequence characteristic vector after weighting processing to obtain a comprehensive characteristic vector of the article to be identified;
and the image-text content quality determining module is used for determining the image-text content quality of the article to be identified based on the comprehensive characteristic vector.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
Background
With the continuous development of artificial intelligence technology and the wide application of internet technology, the way of acquiring and transmitting image-text information through the internet is becoming popular. Due to the huge information amount, it is often difficult to identify high-quality and appropriate content and push the content to different users, so that convenience of acquiring high-quality information by the users and promoting high-quality business information by enterprises needs to be improved.
Traditionally, supervised or unsupervised image-text high-quality content identification technologies are mostly adopted, wherein the supervised image-text identification technology mainly judges the content quality from the text perspective, and the unsupervised image-text identification technology mainly judges the content quality from the statistical perspectives such as the lexical diversity and the syntactic diversity of an article.
However, the supervised image-text recognition technology, such as the method of using fastText, textcnn, bert and the like to judge the content quality from the text perspective, is relatively single in involved dimension and not comprehensive enough. Meanwhile, when the unsupervised image-text recognition technology judges the content quality from the statistical aspects of the morphology diversity or the syntax diversity of the article and the like, different special language scenes corresponding to different semantic information are not introduced, and judgment errors are easily generated. Therefore, the conventional image-text recognition technology still has low accuracy of obtaining the judgment result by judging the content quality.
Disclosure of Invention
Accordingly, it is necessary to provide an artificial intelligence-based method and an artificial intelligence-based device for identifying the quality of the image-text content, which can improve the accuracy of the image-text content quality determination result.
An artificial intelligence-based image-text content quality identification method comprises the following steps:
acquiring an article to be identified, and extracting article prior characteristics, text content and image-text sequence characteristics of the article to be identified;
performing feature cross processing on the prior features of the articles to obtain cross prior feature vectors;
generating a document feature vector of the article to be identified according to the text content;
weighting each image-text sequence characteristic to obtain image-text sequence characteristic vectors after weighting;
carrying out full connection processing on the cross prior feature vector, the document feature vector and the image-text sequence feature vector after weighting processing to obtain a comprehensive feature vector of the article to be identified;
and determining the image-text content quality of the article to be identified based on the comprehensive feature vector.
An artificial intelligence based graphics context quality identification apparatus, the apparatus comprising:
the system comprises an article to be identified acquisition module, a text content acquisition module and a text sequence acquisition module, wherein the article to be identified acquisition module is used for acquiring an article to be identified and extracting article prior characteristics, text content and image-text sequence characteristics of the article to be identified;
the cross prior feature vector generation module is used for performing feature cross processing on the prior features of the articles to obtain cross prior feature vectors;
the document feature vector generating module is used for generating a document feature vector of the article to be identified according to the text content;
the image-text sequence feature vector generation module is used for weighting each image-text sequence feature to obtain image-text sequence feature vectors after weighting;
the comprehensive characteristic vector generating module is used for carrying out full connection processing on the cross prior characteristic vector, the document characteristic vector and the image-text sequence characteristic vector after weighting processing to obtain a comprehensive characteristic vector of the article to be identified;
and the image-text content quality determining module is used for determining the image-text content quality of the article to be identified based on the comprehensive characteristic vector.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring an article to be identified, and extracting article prior characteristics, text content and image-text sequence characteristics of the article to be identified;
performing feature cross processing on the prior features of the articles to obtain cross prior feature vectors;
generating a document feature vector of the article to be identified according to the text content;
weighting each image-text sequence characteristic to obtain image-text sequence characteristic vectors after weighting;
carrying out full connection processing on the cross prior feature vector, the document feature vector and the image-text sequence feature vector after weighting processing to obtain a comprehensive feature vector of the article to be identified;
and determining the image-text content quality of the article to be identified based on the comprehensive feature vector.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring an article to be identified, and extracting article prior characteristics, text content and image-text sequence characteristics of the article to be identified;
performing feature cross processing on the prior features of the articles to obtain cross prior feature vectors;
generating a document feature vector of the article to be identified according to the text content;
weighting each image-text sequence characteristic to obtain image-text sequence characteristic vectors after weighting;
carrying out full connection processing on the cross prior feature vector, the document feature vector and the image-text sequence feature vector after weighting processing to obtain a comprehensive feature vector of the article to be identified;
and determining the image-text content quality of the article to be identified based on the comprehensive feature vector.
In the image-text content quality identification method and device based on artificial intelligence, the article to be identified is obtained, and the article prior characteristics, the text content and the image-text sequence characteristics of the article to be identified are extracted. And performing feature cross processing on the prior features of the articles to obtain cross prior feature vectors, and generating document feature vectors of the articles to be identified according to the text content. The image-text sequence characteristic vector after weighting processing is obtained by weighting each image-text sequence characteristic, and then the cross prior characteristic vector, the document characteristic vector and the image-text sequence characteristic vector after weighting processing are subjected to full connection processing to obtain a comprehensive characteristic vector of the article to be identified, and the image-text content quality of the article to be identified can be determined based on the comprehensive characteristic vector. Due to the fact that the dimensionalities of the article prior characteristics, the text content, the image-text sequence characteristics and the like of the article to be recognized are combined, the image-text content quality of the article to be recognized is judged and recognized, the one-sided result obtained by a single-dimensionality judging mode is avoided, and the accuracy of the image-text content quality judging result is improved.
Drawings
FIG. 1 is a diagram of an embodiment of an application environment of an artificial intelligence-based method for identifying image-text content quality;
FIG. 2 is a flow chart illustrating an artificial intelligence based method for identifying image-text content quality according to an embodiment;
FIG. 3 is a diagram of a network structure of a language characterization model based on article hierarchy in one embodiment;
FIG. 4 is a diagram illustrating the structure of an article hierarchy-based language characterization model and an article layout structure-based integration model in one embodiment;
FIG. 5 is a schematic diagram of a network structure of a multi-layer attention model in one embodiment; fig. 6 is a schematic flow chart of an artificial intelligence-based text content quality identification method in another embodiment;
fig. 7 is a block diagram of an artificial intelligence based teletext content quality identification arrangement according to an embodiment;
FIG. 8 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
Artificial Intelligence (AI) is a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.
The artificial intelligence technology is a comprehensive subject and relates to the field of extensive technology, namely the technology of a hardware level and the technology of a software level. The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
Natural Language Processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that enable efficient communication between humans and computers using natural language. Natural language processing is a science integrating linguistics, computer science and mathematics. Therefore, the research in this field will involve natural language, i.e. the language that people use everyday, so it is closely related to the research of linguistics. Natural language processing techniques typically include text processing, semantic understanding, machine translation, robotic question and answer, knowledge mapping, and the like.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The image-text content quality identification method based on artificial intelligence can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The server 104 obtains the article to be identified from the terminal 102, extracts the article prior characteristics, the text content and the image-text sequence characteristics of the article to be identified, further performs characteristic cross processing on the article prior characteristics to obtain cross prior characteristic vectors, and generates document characteristic vectors of the article to be identified according to the text content. The image-text sequence characteristic vector after weighting processing is obtained by weighting each image-text sequence characteristic, and then the cross prior characteristic vector, the document characteristic vector and the image-text sequence characteristic vector after weighting processing are subjected to full connection processing to obtain a comprehensive characteristic vector of the article to be identified, and then the image-text content quality of the article to be identified is determined based on the comprehensive characteristic vector. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, and tablet computers, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, an artificial intelligence-based method for identifying image-text content quality is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
step 202, obtaining an article to be identified, and extracting the article prior characteristics, text content and image-text sequence characteristics of the article to be identified.
Specifically, when a quality identification instruction associated with the image-text content quality is detected, responding to the quality identification instruction, and acquiring an article to be identified corresponding to the quality identification instruction.
Further, corresponding article prior characteristics, text content and image-text sequence characteristics are extracted from the obtained articles to be identified. The text content is a text content part of the article to be recognized, and the image-text sequence features are generated according to the trained typesetting structure model and comprise image/text/image/text sequence features of the article.
The article prior characteristics represent objective prior characteristics of the article, and include different characteristics of the article overall morphology diversity, syntax diversity, article length and height, article picture quantity, article picture clarity and attractiveness, article typesetting scores, article account number levels, article title high-quality degree, article title and text matching degree and the like.
And 204, performing feature cross processing on the prior features of the articles to obtain cross prior feature vectors.
Specifically, a sparse feature embedding layer and a dense feature embedding layer are respectively constructed according to prior features of each article, including the integral lexical diversity, the syntactic diversity, the length and height of the article, the number of the article pictures, the clarity and the attractiveness of the article pictures, the article composition score, the article account number level, the high quality degree of the article title, the matching degree of the article title and the text and the like, and then feature cross processing is carried out on the prior features of each article based on the constructed sparse feature embedding layer and the constructed dense feature embedding layer to generate cross prior feature vectors.
When the prior features of the article need to be represented numerically, the receivable input items are in a one-hot coding format, that is, feature vectors of the prior features of the article need to be extracted in a one-hot manner, so that the feature vectors of the one-hot coding format are obtained. The sparse feature embedding layer, namely sparse embedding, does not need to be converted into a unique hot coding format when the prior features of the article are represented numerically, and the feature vectors corresponding to the prior features of the article in the sparse feature embedding layer can be obtained when dimension reduction operation is performed on the feature vectors corresponding to the prior features of the article in the dense feature embedding layer.
And step 206, generating a document feature vector of the article to be identified according to the text content.
Specifically, a hierarchical structure corresponding to the text content is determined according to the trained multilayer attention model, and then a document feature vector corresponding to the text content is generated based on the hierarchical structure and the trained language representation model.
Further, the trained multi-layer Attention model is an han (hierarchical Attention network) model, and since the text content of the article includes a hierarchical structure, for example, a word forms a sentence, and a sentence forms a document, the multi-layer Attention model can be used to determine the hierarchical structure corresponding to the text content.
The trained language representation model is a bert (bidirectional encoder representation from transforms) model, i.e., a bidirectional encoder representation model from a transformer. The speech characterization model, i.e. the BERT model, is obtained by stacking multiple layers of transform Encoders. The Transformer model is a neural network model of an Encoder-Decoder structure formed by self-attention neural network layers, the model is divided into an Encoder Encoder and a Decoder Decoder, the Encoder part is formed by overlapping 6 same encoders, the Decoder part is formed by overlapping 6 same decoders, and the encoders do not share parameters.
In an embodiment, a network structure diagram of a language representation model based on an article hierarchy is shown in fig. 3, and as can be known from fig. 3, based on determining a hierarchy corresponding to text content according to a trained multilayer attention model, a sentence vector corresponding to an input word vector is generated by using the trained language representation model (BERT model), and a document feature vector corresponding to an article to be recognized is generated via a Transformer Encoder (Encoder layer) of the trained language representation model.
And step 208, weighting each image-text sequence characteristic to obtain an image-text sequence characteristic vector after weighting.
Specifically, the image-text sequence feature vector corresponding to each image-text sequence feature is generated by acquiring the image-text sequence feature generated according to the trained typesetting structure model and according to the trained bidirectional memory network model, and the image-text sequence feature vector after weighting processing is generated by performing weighting processing on each image-text sequence feature vector according to a weighting mechanism.
The typesetting structure model can be constructed based on the article to be recognized according to the preset reading habit or the historical reading habit to obtain the image-text sequence characteristics of the article to be recognized. And the image-text sequence feature vector corresponding to each image-text sequence feature is generated by inputting the image-text sequence feature into a well-trained two-way memory network model, namely BiLstm generated by combining forward LSTM and backward LSTM. Wherein, LSTM represents long-short term memory network model, then BiLstm represents bidirectional long-short term memory network model.
Further, an Attention weighting mechanism is adopted to perform weighting processing on the image-text sequence feature vectors corresponding to the image-text sequence features, and the image-text sequence feature vectors after weighting processing are obtained. In the relationship classification, in order to highlight the importance of part of output results to the classification, a weighting mechanism needs to be introduced for weighted summation to obtain the weighted image-text sequence feature vector.
And step 210, performing full-connection processing on the cross prior feature vector, the document feature vector and the image-text sequence feature vector after weighting processing to obtain a comprehensive feature vector of the article to be identified.
Specifically, the cross prior feature vector, the document feature vector and the image-text sequence feature vector after weighting processing are accessed to a full-connection layer for full-connection processing, so that the comprehensive feature vector of the article to be identified can be obtained.
And step 212, determining the image-text content quality of the article to be identified based on the comprehensive characteristic vector.
Specifically, according to the trained quality assessment integration model, the quality data of the comprehensive characteristic vector is obtained through calculation, and then the image-text content quality of the article to be recognized is determined according to the quality data.
Further, as shown in fig. 4, an article hierarchical structure-based language representation model and an article composition structure-based integrated model are provided, and as can be seen from fig. 4, by integrating the language representation model, i.e., the text sub-network, combined with the article hierarchical structure according to the prior features of each article to construct a sparse feature embedding layer and a dense feature embedding layer, which constitute an objective prior feature sub-network, and the article composition structure-based composition sub-network, the article hierarchical structure-based language representation model and the article composition structure-based integrated model can be obtained, and the final quality assessment model can be trained.
The Text sub-network comprises word vectors, sentence vectors and document feature vectors of articles to be recognized, a language representation model BERT model of an article hierarchical structure and a Transformer Encoder layer, the objective prior feature sub-network comprises a sparse feature embedding layer (sparse embedding) and a dense feature embedding layer (dense embedding) which are constructed according to prior features of the articles and an FM cross layer, and the typesetting sub-network comprises a (paragraph embedding layer) Text partial embedding and image embedding layer, a Bilstm bidirectional long and short term memory network model and an Attention weighting mechanism.
In one embodiment, after determining the quality of the teletext content of the article to be identified based on the quality data, the method further comprises:
determining a corresponding weighting processing mode according to the image-text content quality;
and carrying out hierarchical weighting processing on the corresponding image-text contents according to the weighting processing mode.
Specifically, after determining the quality of the image-text content of the article to be identified according to the quality data, that is, after determining whether the image-text content of the article to be identified belongs to high-quality content or low-quality content, a weighting processing mode corresponding to the high-quality content or the low-quality content is acquired.
And further, carrying out hierarchical weighting processing on the corresponding image-text content according to a recommended weighting processing mode corresponding to the high-quality content and a recommended weight reduction processing mode corresponding to the low-quality content.
The high-quality content with high adjustability and excellent experience can be preferentially recommended to the user by recommending and weighting the identified high-quality content, so that the recommendation success rate and the service effect are improved.
In the image-text content quality identification method and device based on artificial intelligence, the article to be identified is obtained, and the article prior characteristics, the text content and the image-text sequence characteristics of the article to be identified are extracted. And performing feature cross processing on the prior features of the articles to obtain cross prior feature vectors, and generating document feature vectors of the articles to be identified according to the text content. And carrying out weighting processing on each image-text sequence feature to obtain an image-text sequence feature vector after weighting processing, further carrying out full connection processing on the cross prior feature vector, the document feature vector and the image-text sequence feature vector after weighting processing to obtain a comprehensive feature vector of the article to be identified, and determining the image-text content quality of the article to be identified based on the comprehensive feature vector. Due to the fact that the dimensionalities of the article prior characteristics, the text content, the image-text sequence characteristics and the like of the article to be recognized are combined, the image-text content quality of the article to be recognized is judged and recognized, the one-sided result obtained by a single-dimensionality judging mode is avoided, and the accuracy of the image-text content quality judging result is improved.
In an embodiment, the step of generating the document feature vector corresponding to the text content, that is, the step of generating the document feature vector corresponding to the text content based on the hierarchical structure and the trained language representation model, specifically includes:
generating a first hidden vector corresponding to each word vector based on the hierarchical structure and the trained language representation model; determining a first contribution importance degree weight corresponding to each word vector according to the word vectors and the corresponding first hidden vectors; carrying out weighting processing on the word vector according to the first contribution importance weight to generate a sentence vector corresponding to the article to be recognized; generating a second hidden vector corresponding to the sentence vector based on the hierarchical structure and the trained language representation model; determining a second contribution importance degree weight corresponding to each sentence vector according to the sentence vector and the second hidden vector; and carrying out weighting processing on the sentence vector according to the second contribution importance weight to generate a document feature vector corresponding to the article to be recognized.
Specifically, as shown in fig. 5, a network structure diagram of a multi-layer attention model is provided, and as can be seen from fig. 5, in the multi-layer attention model structure, a word vector sequence including w is first input21To w2TAnd obtaining a first implicit vector h corresponding to each word through a Bi-directional threshold cycle (Bi-GRU) structure at the word level, wherein the first implicit vector h comprises h21To h2TThen pass through uwObtaining an attribute weight, namely a first contribution importance weight, by the dot product of the vector and each h vector, and further performing weighted summation on the h sequence according to the attribute weight to obtain a sentence summary vector comprising s1To sLAnd each sentence passes through the same bidirectional threshold cycle (Bi-GRU) structure to obtain a second hidden vector h corresponding to the sentence vector, including h1To hLAnd then determining second contribution importance weight corresponding to each sentence vector, performing weighting processing through an attention mechanism to obtain a final output document feature vector v vector, and then obtaining a final text classification result through a post-rank dense layer and a classifier according to the v vector. The network structure of the multi-layer attention model conforms to the subordinate words of people>Sentence->And then to the process of understanding the chapters.
Referring to FIG. 5, where WordEncoder representation is available for processing each sentence in a document separately, for each word in the sentence, the corresponding embedded representation is obtained through an embedding layer, and then the sentence information is encoded through a bidirectional GRU/LSTM, where one word in the sentence is input at each time step. By concatenating the hidden states in both directions, a representation of the sentence can be constructed, while context information can be captured.
Word authorization indicates that the authorization mechanism can obtain the corresponding weight of hidden state in each time step of bidirectional GRU/LSTM, and then the hidden state is weighted and summed to obtain the representation information of the sentence. The same way can get the representation information of all sentences in the document.
The sequence Encoder can also use a bidirectional GRU/LSTM to encode document information after obtaining the representation information of each Sentence in the document, and then splice the hidden states in two directions to form the representation of the document, and can capture the context information.
The sequence Attention shows that the Attention mechanism can be used to obtain the corresponding weight of hidden state at each time step of bidirectional GRU/LSTM, and then the hidden states are weighted and summed to obtain the representation information of the whole document.
Softmax (FC + Softmax) is used to represent presentation information for the resulting document, and multi-classification is performed by one Softmax layer (the output layer uses a Softmax activation function).
The hierarchical structure corresponding to the text content can be determined according to the trained multilayer attention model, wherein the text content of the article contains the hierarchical structure, for example, a word forms a sentence, the sentence forms a document, and the multilayer attention model can be used for determining the hierarchical structure corresponding to the text content. And different "words" contribute differently to "sentences", and different "sentences" contribute differently to the document, the weight of the contribution importance degree of the words or sentences is obtained by using the Attention mechanism (weighting mechanism) in the multi-layer Attention model. Wherein the weight of the contribution importance degree comprises a first contribution importance weight corresponding to the word vector.
Aiming at a hierarchical structure corresponding to a trained multilayer attention model and a trained language representation model, a word vector sequence of an obtained article is input, a first hidden vector corresponding to each input word vector is generated and output through a Bi-directional threshold cycle (Bi-GRU) structure at a word level, and a first contribution importance weight corresponding to each word vector can be generated by calculating a dot product of the first hidden vector and each word vector sequence. And further carrying out weighting processing on the word vector according to the first contribution importance weight, namely obtaining a weighted sum corresponding to the input word vector sequence and the contribution importance weight, and generating a sentence vector corresponding to the article to be recognized.
Further, the weight of the contribution importance degree further includes a second contribution importance degree weight corresponding to the sentence vector, a hierarchical structure corresponding to the trained multilayer attention model, and a trained language representation model, a second hidden vector corresponding to each input sentence vector is generated and output by inputting the sentence vector of the generated article and through a Bi-directional threshold cycle (Bi-GRU) structure at the sentence level, and a second contribution importance degree weight corresponding to each sentence vector can be generated by calculating a dot product of the second hidden vector and each sentence vector. And further carrying out weighting processing on the sentence vectors according to the second contribution importance weight to generate document feature vectors corresponding to the articles to be recognized.
In this embodiment, based on the hierarchical structure and the trained language representation model, first hidden vectors corresponding to the word vectors are generated, first contribution importance weights corresponding to the word vectors are determined according to the word vectors and the corresponding first hidden vectors, and then the word vectors are weighted by the first contribution importance weights to generate sentence vectors corresponding to the article to be recognized. And generating a second hidden vector corresponding to the sentence vector based on the hierarchical structure and the trained language representation model, determining a second contribution importance weight corresponding to each sentence vector according to the sentence vector and the second hidden vector, and performing weighting processing on the sentence vectors according to the second contribution importance weights to generate document feature vectors corresponding to the articles to be recognized. The method and the device have the advantages that the document feature vector of the article to be recognized is obtained through obtaining the hierarchical structure of the article to be recognized from words to sentences and then to chapters and combining with the trained language representation model, the mode that the article content is recognized through a single dimension, such as a few keywords or key sentences, is avoided, and the comprehensiveness of the article content recognition is improved.
In one embodiment, as shown in fig. 6, another artificial intelligence-based method for identifying quality of graphics content is provided, which specifically includes the following steps:
1) the method comprises the steps of obtaining an article to be identified, and extracting prior features and text contents of the article to be identified.
2) And respectively constructing a sparse feature embedding layer and a dense feature embedding layer according to the prior features of each article.
3) And performing feature cross processing on the prior features of each article based on the sparse feature embedding layer and the dense feature embedding layer to generate cross prior feature vectors.
4) And determining a hierarchical structure corresponding to the text content according to the trained multilayer attention model.
5) And generating a first hidden vector corresponding to each word vector based on the hierarchical structure and the trained language representation model.
6) And determining a first contribution importance weight corresponding to each word vector according to the word vector and the corresponding first hidden vector.
7) And carrying out weighting processing on the word vector according to the first contribution importance weight to generate a sentence vector corresponding to the article to be recognized.
8) And generating a second hidden vector corresponding to the sentence vector based on the hierarchical structure and the trained language representation model.
9) And determining a second contribution importance weight corresponding to each sentence vector according to the sentence vector and the second hidden vector.
10) And carrying out weighting processing on the sentence vector according to the second contribution importance weight to generate a document feature vector corresponding to the article to be recognized.
11) And generating image-text sequence characteristics corresponding to the article to be recognized according to the trained typesetting structure model.
12) And generating image-text sequence feature vectors corresponding to the image-text sequence features according to the trained two-way memory network model.
13) And carrying out weighting processing on the image-text sequence feature vectors to generate image-text sequence feature vectors after weighting processing.
14) And performing full-connection processing on the cross prior feature vector, the document feature vector and the image-text sequence feature vector after weighting processing to obtain a comprehensive feature vector of the article to be identified.
15) And calculating to obtain the quality data of the comprehensive characteristic vector according to the trained quality assessment integrated model.
16) And determining the image-text content quality of the article to be identified according to the quality data.
17) And determining a corresponding weighting processing mode according to the image-text content quality, and performing hierarchical weighting processing on the corresponding image-text content according to the weighting processing mode.
In the image-text content quality identification method based on artificial intelligence, because a plurality of dimensions such as article prior characteristics, text contents, image-text sequence characteristics and the like of the article to be identified are combined, the image-text content quality of the article to be identified is judged and identified, the one-sided result obtained by a single-dimension judgment mode is avoided, and the accuracy of the image-text content quality judgment result is improved.
It should be understood that, although the steps in the flowcharts related to the above embodiments are shown in sequence as indicated by the arrows, the steps are not necessarily executed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in each flowchart related to the above embodiments may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
In one embodiment, as shown in fig. 7, there is provided an artificial intelligence-based teletext content quality identification arrangement, which may be part of a computer device using software modules or hardware modules, or a combination of both, the arrangement comprising in particular: an article to be identified obtaining module 702, a cross prior feature vector generating module 704, a document feature vector generating module 706, a text sequence feature vector generating module 708, a comprehensive feature vector generating module 710, and a text content quality determining module 712, wherein:
the article to be recognized obtaining module 702 is configured to obtain an article to be recognized, and extract an article prior feature, text content, and a text sequence feature of the article to be recognized.
And a cross prior feature vector generation module 704, configured to perform feature cross processing on the prior features of each article to obtain a cross prior feature vector.
And the document feature vector generating module 706 is configured to generate a document feature vector of the article to be identified according to the text content.
The image-text sequence feature vector generation module 708 is configured to perform weighting processing on each image-text sequence feature to obtain a weighted image-text sequence feature vector.
And the comprehensive characteristic vector generating module 710 is configured to perform full connection processing on the cross prior characteristic vector, the document characteristic vector, and the image-text sequence characteristic vector after the weighting processing to obtain a comprehensive characteristic vector of the article to be identified.
And the image-text content quality determining module 712 is configured to determine the image-text content quality of the article to be identified based on the comprehensive feature vector.
In the image-text content quality identification device based on artificial intelligence, the article to be identified is obtained, and the article prior characteristics, the text content and the image-text sequence characteristics of the article to be identified are extracted. And performing feature cross processing on the prior features of the articles to obtain cross prior feature vectors, and generating document feature vectors of the articles to be identified according to the text content. The image-text sequence characteristic vector after weighting processing is obtained by weighting each image-text sequence characteristic, and then the cross prior characteristic vector, the document characteristic vector and the image-text sequence characteristic vector after weighting processing are subjected to full connection processing to obtain a comprehensive characteristic vector of the article to be identified, and the image-text content quality of the article to be identified can be determined based on the comprehensive characteristic vector. Due to the fact that the dimensionalities of the article prior characteristics, the text content, the image-text sequence characteristics and the like of the article to be recognized are combined, the image-text content quality of the article to be recognized is judged and recognized, the one-sided result obtained by a single-dimensionality judging mode is avoided, and the accuracy of the image-text content quality judging result is improved.
In one embodiment, the document feature vector generation module is further to:
generating a first hidden vector corresponding to each word vector based on the hierarchical structure and the trained language representation model; determining a first contribution importance degree weight corresponding to each word vector according to the word vectors and the corresponding first hidden vectors; carrying out weighting processing on the word vector according to the first contribution importance weight to generate a sentence vector corresponding to the article to be recognized; generating a second hidden vector corresponding to the sentence vector based on the hierarchical structure and the trained language representation model; determining a second contribution importance degree weight corresponding to each sentence vector according to the sentence vector and the second hidden vector; and carrying out weighting processing on the sentence vector according to the second contribution importance weight to generate a document feature vector corresponding to the article to be recognized.
In this embodiment, based on the hierarchical structure and the trained language representation model, first hidden vectors corresponding to the word vectors are generated, first contribution importance weights corresponding to the word vectors are determined according to the word vectors and the corresponding first hidden vectors, and then the word vectors are weighted by the first contribution importance weights to generate sentence vectors corresponding to the article to be recognized. And generating a second hidden vector corresponding to the sentence vector based on the hierarchical structure and the trained language representation model, determining a second contribution importance weight corresponding to each sentence vector according to the sentence vector and the second hidden vector, and performing weighting processing on the sentence vectors according to the second contribution importance weights to generate document feature vectors corresponding to the articles to be recognized. The method and the device have the advantages that the document feature vector of the article to be recognized is obtained through obtaining the hierarchical structure of the article to be recognized from words to sentences and then to chapters and combining with the trained language representation model, the mode that the article content is recognized through a single dimension, such as a few keywords or key sentences, is avoided, and the comprehensiveness of the article content recognition is improved.
In one embodiment, the cross-prior feature vector generation module is further to:
respectively constructing a sparse feature embedding layer and a dense feature embedding layer according to the prior features of each article; and performing feature cross processing on the prior features of each article based on the sparse feature embedding layer and the dense feature embedding layer to generate cross prior feature vectors.
In one embodiment, the teletext sequence feature vector generation module is further configured to:
generating image-text sequence feature vectors corresponding to the image-text sequence features according to the trained two-way memory network model; generating image-text sequence characteristics according to the trained typesetting structure model; and carrying out weighting processing on the image-text sequence feature vectors to generate image-text sequence feature vectors after weighting processing.
In one embodiment, the document feature vector generation module is further to:
determining a hierarchical structure corresponding to the text content according to the trained multilayer attention model; and generating a document feature vector corresponding to the text content based on the hierarchical structure and the trained language representation model.
In one embodiment, the teletext content quality determination module is further configured to:
calculating to obtain quality data of the comprehensive characteristic vector according to the trained quality assessment integration model; and determining the image-text content quality of the article to be identified according to the quality data.
In one embodiment, an artificial intelligence based teletext content quality identification arrangement is provided, further comprising:
the weighting processing mode determining module is used for determining a corresponding weighting processing mode according to the image-text content quality;
and the hierarchical weighting processing module is used for performing hierarchical weighting processing on the corresponding image-text content according to the weighting processing mode.
For the specific limitation of the image-text content quality identification device based on artificial intelligence, reference may be made to the above limitation of the image-text content quality identification method based on artificial intelligence, and details are not repeated here. The modules in the artificial intelligence-based image-text content quality identification device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing the data of the article prior characteristics, the text content, the image-text sequence characteristics and the like of the article to be identified. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an artificial intelligence based method for identifying the quality of the teletext content.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the steps in the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:语义匹配方法、装置和介质