Public opinion image information identification method based on deep learning
Through deep learning technology, the convolutional neural network and long short-term memory network model are constructed to solve the problems of insufficient data and over-fitting in image recognition, improve the recognition accuracy and efficiency, and are suitable for negative public opinion monitoring in the short video industry, meeting the needs of Identification needs under massive content.
Patent Information
- Application Number
- CN202410682791.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-05-29
AI Technical Summary
Existing technologies face problems of insufficient data and over-fitting in image recognition. In particular, obtaining high-quality annotated data is costly and time-consuming, and the recognition accuracy of complex scenes and blurry images is not high, and there are security and privacy issues. Problems, especially in the field of face recognition, are that it is difficult to meet the demand for negative public opinion monitoring in the short video industry due to the massive amount of content.
Adopt the public opinion image information recognition method based on deep learning, collect and preprocess images, build convolutional neural network and long short-term memory network models, perform cropping and feature extraction, build training sets and conduct model training to achieve the recognition of public opinion images. Identify.
It improves the accuracy and efficiency of image recognition, can more accurately identify public opinion information, is suitable for negative public opinion monitoring of massive content, and enhances computing power and recognition accuracy.
Smart Images

Figure CN118609016A
Abstract
Description
Technical Field
[0001] The present invention relates to a method for identifying public opinion image information based on deep learning, and belongs to the technical field of image recognition. Background Art
[0002] Image recognition has been widely used in many fields, including autonomous driving, medical image analysis, security monitoring, object detection and recognition, face recognition, etc. These applications have brought many conveniences to society and accelerated the digital transformation and intelligent development of many industries. However, despite significant progress, AI image recognition still faces some challenges. One of them is the problem of insufficient data. Deep learning models usually require a large amount of labeled data for training, but in some fields and tasks, obtaining high-quality labeled data can be very expensive and time-consuming. In addition, overfitting is also an important challenge, that is, the model performs well on the training data, but has poor generalization ability on new unseen data;
[0003] In addition, for some complex scenes and blurred images, the existing image recognition technology may still have the problem of low recognition accuracy. At the same time, security and privacy issues also need to be paid attention to, especially in the field of face recognition;
[0004] At the same time, the short video industry is in a wild growth stage, and its information release threshold is low, which leads to the explosive growth of massive content on the platform. Therefore, in order to monitor the required negative public opinion information from the massive information sea, it is necessary to adopt modern technical means, that is, professional public opinion monitoring and control systems. How to quickly and accurately identify positive and negative information based on the video also requires the system platform to have powerful computing power.
[0005] Prior art, such as the invention patent with patent number "CN110837581A", provides a method, device and storage medium for video public opinion analysis, and the specific steps are: obtaining a video to be detected; extracting key frames, video voice and a first text information used to describe the video to be detected in the video to be detected; performing public opinion analysis on the second text information, and determining a first public opinion analysis result of the video to be detected, wherein the second text information includes the first text information and text information extracted from the key frames and the video voice; performing public opinion analysis on the image in the key, and determining a second public opinion analysis result of the video to be detected; and determining a third public opinion analysis result of the video to be detected based on the first public opinion analysis result and the second public opinion analysis result.
[0006] Although the above patent provides a method for analyzing video public opinion, the solution does not describe the specific machine learning model used, and it is impossible to judge the recognition efficiency and accuracy of the patent. Summary of the invention
[0007] In order to solve the above problems existing in the prior art, the present invention proposes a public opinion image information recognition method based on deep learning.
[0008] The technical solution of the present invention is as follows:
[0009] On the one hand, the present invention provides a method for identifying public opinion image information based on deep learning, comprising the following steps:
[0010] Collecting public opinion images and videos and preprocessing the public opinion images and videos to obtain preprocessed images;
[0011] The preprocessed image is cropped to obtain sub-images, and the category label of each sub-image is set. Then, the geometric elements contained in each sub-image are extracted, and each type of geometric element is named. Then, the corresponding sentence information is constructed based on the names of all geometric elements in each sub-image. Finally, the sentence information and the category label of the corresponding sub-image are constructed as a training set.
[0012] Construct a public opinion image information recognition model, and train the model through a training set to obtain a trained public opinion image information recognition model;
[0013] The public opinion image information is identified through the trained public opinion image information recognition model.
[0014] As a preferred implementation mode of the present invention, the public opinion video is frame-collected to obtain each frame image of the public opinion video, and each frame image is extracted as a public opinion image.
[0015] As a preferred embodiment of the present invention, the preprocessing steps of the public opinion image are:
[0016] A filter template of preset size is set based on the convolutional neural network. For each pixel of the public opinion image, the filter template is convolved with the pixel and its neighborhood pixels to generate a new pixel value. The filter is used to perform convolution operations on all pixels of the public opinion image, and then the public opinion image is blurred, sharpened, and edge detected to obtain a clear public opinion image.
[0017] As a preferred embodiment of the present invention, the public opinion image information recognition model is constructed based on a long short-term memory network;
[0018] Assume that the input feature information of the long short-term memory network at time t is x t The output is m t , then the input gate, forget gate, output gate and unit state of the long short-term memory network at time t are as follows:
[0019] i t =σ(W i x t +Wi m t-1 +W i c t-1 +b i )
[0020] f t =σ(W f x t +W f m t-1 +W f c t-1 +b f )
[0021] c t =f t ×c t-1 +i t ×g(W c x t +W f m t-1 +b c )
[0022] o t =σ(W o x t +W o m t-1 +W o c t-1 +b o )
[0023] m t =o t ×h(c t )
[0024] Where: i t represents the input gate at time t; W i represents the weight matrix of the input gate; b i represents the bias of the input gate; f t represents the forget gate at time t; W f represents the weight matrix of the forget gate; b f represents the bias of the forget gate; c t represents the unit state at time t; W c represents the weight matrix of the unit state; g(·) represents the activation function; o t represents the output gate; W o represents the weight matrix of the output gate; b o Represents the bias of the output gate; σ represents the Sigmoid function; m t-1 Represents the output result at time t-1.
[0025] On the other hand, the present invention also provides a public opinion image information recognition system based on deep learning, including a data acquisition module, a training set construction module, a model training module and a public opinion image information recognition module;
[0026] The data acquisition module is used to collect public opinion images and videos and pre-process the public opinion images and videos to obtain pre-processed images;
[0027] The training set construction module is used to obtain sub-images after cutting the pre-processed image, and set the category label of each sub-image, then extract the geometric elements contained in each sub-image, name each type of geometric elements, and then construct corresponding sentence information based on the names of all geometric elements in each sub-image, and finally construct the sentence information and the category label of the corresponding sub-image into a training set;
[0028] The model training module is used to construct a public opinion image information recognition model, and train the model through a training set to obtain a trained public opinion image information recognition model;
[0029] The public opinion image information recognition module is used to recognize public opinion image information through a trained public opinion image information recognition model.
[0030] As a preferred implementation mode of the present invention, the public opinion video is frame-collected to obtain each frame image of the public opinion video, and each frame image is extracted as a public opinion image.
[0031] As a preferred embodiment of the present invention, the preprocessing steps of the public opinion image are:
[0032] A filter template of preset size is set based on the convolutional neural network. For each pixel of the public opinion image, the filter template is convolved with the pixel and its neighborhood pixels to generate a new pixel value. The filter is used to perform convolution operations on all pixels of the public opinion image, and then the public opinion image is blurred, sharpened, and edge detected to obtain a clear public opinion image.
[0033] As a preferred embodiment of the present invention, the public opinion image information recognition model is constructed based on a long short-term memory network;
[0034] Assume that the input feature information of the long short-term memory network at time t is x t The output is m t , then the input gate, forget gate, output gate and unit state of the long short-term memory network at time t are as follows:
[0035] i t =σ(W i x t +W i m t-1 +Wi c t-1 +b i )
[0036] f t =σ(W f x t +W f m t-1 +W f c t-1 +b f )
[0037] c t =f t ×c t-1 +i t ×g(W c x t +W f m t-1 +b c )
[0038] o t =σ(W o x t +W o m t-1 +W o c t-1 +b o )
[0039] m t =o t ×h(c t )
[0040] Where: i t represents the input gate at time t; W i represents the weight matrix of the input gate; b i represents the bias of the input gate; f t represents the forget gate at time t; W f represents the weight matrix of the forget gate; b f represents the bias of the forget gate; c t represents the unit state at time t; W c represents the weight matrix of the unit state; g(·) represents the activation function; o t represents the output gate; W o represents the weight matrix of the output gate; b o Represents the bias of the output gate; σ represents the Sigmoid function; m t-1 Represents the output result at time t-1.
[0041] On the other hand, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any embodiment of the present invention when executing the program.
[0042] In yet another aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of the present invention.
[0043] The present invention has the following beneficial effects:
[0044] 1. The present invention combines convolutional neural networks and long short-term memory networks to identify public opinion image information. First, the convolutional neural network is used to remove image defects, and then the feature-extracted data is input into the long short-term memory network for training, thereby improving the accuracy and recognition efficiency of image output. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.
[0048] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0049] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0050] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.
[0051] Embodiment 1:
[0052] See also Figure 1 , a method for identifying public opinion image information based on deep learning, comprising the following steps:
[0053] Collecting public opinion images and videos and preprocessing the public opinion images and videos to obtain preprocessed images;
[0054] According to the relationship between the image recognition target and the overall scene size, the preprocessed image is cropped to obtain M*N sub-images, and the category label of each sub-image is set. Then, the geometric elements contained in each sub-image are extracted, and each type of geometric element is named. Then, the corresponding sentence information is constructed based on the names of all geometric elements in each sub-image. Finally, the sentence information and the category label of the corresponding sub-image are constructed as a training set.
[0055] Construct a public opinion image information recognition model, and train the model through a training set to obtain a trained public opinion image information recognition model;
[0056] The public opinion image information is identified through the trained public opinion image information recognition model.
[0057] As a preferred implementation of this embodiment, the public opinion video is frame-by-frame collected to obtain each frame image of the public opinion video, and each frame image is extracted as a public opinion image.
[0058] As a preferred implementation of this embodiment, the preprocessing steps of the public opinion image are:
[0059] A filter template of preset size is set based on the convolutional neural network. For each pixel of the public opinion image, the filter template is convolved with the pixel and its neighborhood pixels to generate a new pixel value. The filter is used to perform convolution operations on all pixels of the public opinion image, and then the public opinion image is blurred, sharpened, and edge detected to obtain a clear public opinion image. The convolutional network is used to remove defect information from the image, and then it is converted back to the original space and differentiated from the original image to obtain an enhanced image.
[0060] As a preferred implementation of this embodiment, the public opinion image information recognition model is constructed based on a long short-term memory network;
[0061] Assume that the input feature information of the long short-term memory network at time t is x t The output is m t , then the input gate, forget gate, output gate and unit state of the long short-term memory network at time t are as follows:
[0062] i t =σ(W i x t +W i m t-1+W i c t-1 +b i )
[0063] f t =σ(W f x t +W f m t-1 +W f c t-1 +b f )
[0064] c t =f t ×c t-1 +i t ×g(W c x t +W f m t-1 +b c )
[0065] o t =σ(W o x t +W o m t-1 +W o c t-1 +b o )
[0066] m t =o t ×h(c t )
[0067] Where: i t represents the input gate at time t; W i represents the weight matrix of the input gate; b i represents the bias of the input gate; f t represents the forget gate at time t; W f represents the weight matrix of the forget gate; b f represents the bias of the forget gate; c t represents the unit state at time t; W c represents the weight matrix of the unit state; g(·) represents the activation function; o t represents the output gate; W o represents the weight matrix of the output gate; b o Represents the bias of the output gate; σ represents the Sigmoid function; m t-1 Represents the output result at time t-1.
[0068] From the simulation results, we can see that as the interference to the collected image decreases, the long short-term memory network has the best recognition accuracy. It is a deep neural network with a very high recognition rate.
[0069] Embodiment 2:
[0070] A public opinion image information recognition system based on deep learning, including a data acquisition module, a training set construction module, a model training module and a public opinion image information recognition module;
[0071] The data acquisition module is used to collect public opinion images and videos and pre-process the public opinion images and videos to obtain pre-processed images;
[0072] The training set construction module is used to obtain sub-images after cutting the pre-processed image, and set the category label of each sub-image, then extract the geometric elements contained in each sub-image, name each type of geometric elements, and then construct corresponding sentence information based on the names of all geometric elements in each sub-image, and finally construct the sentence information and the category label of the corresponding sub-image into a training set;
[0073] The model training module is used to construct a public opinion image information recognition model, and train the model through a training set to obtain a trained public opinion image information recognition model;
[0074] The public opinion image information recognition module is used to recognize public opinion image information through a trained public opinion image information recognition model.
[0075] As a preferred implementation of this embodiment, the public opinion video is frame-by-frame collected to obtain each frame image of the public opinion video, and each frame image is extracted as a public opinion image.
[0076] As a preferred implementation of this embodiment, the preprocessing steps of the public opinion image are:
[0077] A filter template of preset size is set based on the convolutional neural network. For each pixel of the public opinion image, the filter template is convolved with the pixel and its neighborhood pixels to generate a new pixel value. The filter is used to perform convolution operations on all pixels of the public opinion image, and then the public opinion image is blurred, sharpened, and edge detected to obtain a clear public opinion image.
[0078] As a preferred implementation of this embodiment, the public opinion image information recognition model is constructed based on a long short-term memory network;
[0079] Assume that the input feature information of the long short-term memory network at time t is x t The output is m t , then the input gate, forget gate, output gate and unit state of the long short-term memory network at time t are as follows:
[0080] i t =σ(W i xt +W i m t-1 +W i c t-1 +b i )
[0081] f t =σ(W f x t +W f m t-1 +W f c t-1 +b f )
[0082] c t =f t ×c t-1 +i t ×g(W c x t +W f m t-1 +b c )
[0083] o t =σ(W o x t +W o m t-1 +W o c t-1 +b o )
[0084] m t =o t ×h(c t )
[0085] Where: i t represents the input gate at time t; W i represents the weight matrix of the input gate; b i represents the bias of the input gate; f t represents the forget gate at time t; W f represents the weight matrix of the forget gate; b f represents the bias of the forget gate; c t represents the unit state at time t; W c represents the weight matrix of the unit state; g(·) represents the activation function; o t represents the output gate; W o represents the weight matrix of the output gate; b o Represents the bias of the output gate; σ represents the Sigmoid function; m t-1 Represents the output result at time t-1.
[0086] Embodiment three:
[0087] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any embodiment of the present invention when executing the program.
[0088] Embodiment 4:
[0089] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in any embodiment of the present invention is implemented.
[0090] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0091] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0092] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0093] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.
[0094] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for identifying public opinion image information based on deep learning. It is characterized in that The following steps are involved: Collecting public opinion images and videos and preprocessing the public opinion images and videos to obtain preprocessed images; The preprocessed image is cropped to obtain sub-images, and the category label of each sub-image is set. Then, the geometric elements contained in each sub-image are extracted, and each type of geometric element is named. Then, the corresponding sentence information is constructed based on the names of all geometric elements in each sub-image. Finally, the sentence information and the category label of the corresponding sub-image are constructed as a training set. Construct a public opinion image information recognition model, and train the model through a training set to obtain a trained public opinion image information recognition model; The public opinion image information is identified through the trained public opinion image information recognition model.
2. According to the method for identifying public opinion image information based on deep learning according to claim 1, It is characterized in that The public opinion video is frame-collected to obtain each frame image of the public opinion video, and each frame image is extracted as a public opinion image.
3. According to the method for identifying public opinion image information based on deep learning in claim 2, It is characterized in that The preprocessing steps of the public opinion image are: A filter template of preset size is set based on the convolutional neural network. For each pixel of the public opinion image, the filter template is convolved with the pixel and its neighborhood pixels to generate a new pixel value. The filter is used to perform convolution operations on all pixels of the public opinion image, and then the public opinion image is blurred, sharpened, and edge detected to obtain a clear public opinion image.
4. According to the method for identifying public opinion image information based on deep learning in claim 1, It is characterized in that The public opinion image information recognition model is constructed based on a long short-term memory network; Assume that the input feature information of the long short-term memory network at time t is x t The output is m t , then the input gate, forget gate, output gate and unit state of the long short-term memory network at time t are as follows: i t =σ(W i x t +W i m t-1 +W i c t-1 +b i ) f t =σ(W f x t +W f m t-1 +W f c t-m1 +b f ) c t =f t ×c t-1 +i t ×g(W c x t +W f m t-1 +b c ) o t =σ(W o x t +W o m t-1 +W o c t-1 +b o ) m t =o t ×h(c t ) Where: i t represents the input gate at time t; W i represents the weight matrix of the input gate; b i represents the bias of the input gate; f t represents the forget gate at time t; W f represents the weight matrix of the forget gate; b f represents the bias of the forget gate; c t represents the unit state at time t; W c represents the weight matrix of the unit state; g(·) represents the activation function; o t represents the output gate; W o represents the weight matrix of the output gate; b o Represents the bias of the output gate; σ represents the Sigmoid function; m t-1 Represents the output result at time t-1.
5. A public opinion image information recognition system based on deep learning, It is characterized in that It includes data collection module, training set construction module, model training module and public opinion image information recognition module; The data acquisition module is used to collect public opinion images and videos and pre-process the public opinion images and videos to obtain pre-processed images; The training set construction module is used to obtain sub-images after cutting the pre-processed image, and set the category label of each sub-image, then extract the geometric elements contained in each sub-image, name each type of geometric elements, and then construct corresponding sentence information based on the names of all geometric elements in each sub-image, and finally construct the sentence information and the category label of the corresponding sub-image into a training set; The model training module is used to construct a public opinion image information recognition model, and train the model through a training set to obtain a trained public opinion image information recognition model; The public opinion image information recognition module is used to recognize public opinion image information through a trained public opinion image information recognition model.
6. According to the public opinion image information recognition system based on deep learning in claim 5, It is characterized in that The public opinion video is frame-collected to obtain each frame image of the public opinion video, and each frame image is extracted as a public opinion image.
7. According to claim 6, a public opinion image information recognition system based on deep learning, It is characterized in that The preprocessing steps of the public opinion image are: A filter template of preset size is set based on the convolutional neural network. For each pixel of the public opinion image, the filter template is convolved with the pixel and its neighborhood pixels to generate a new pixel value. The filter is used to perform convolution operations on all pixels of the public opinion image, and then the public opinion image is blurred, sharpened, and edge detected to obtain a clear public opinion image.
8. According to the public opinion image information recognition system based on deep learning in claim 5, It is characterized in that The public opinion image information recognition model is constructed based on a long short-term memory network; Assume that the input feature information of the long short-term memory network at time t is x t The output is m t , then the input gate, forget gate, output gate and unit state of the long short-term memory network at time t are as follows: i t =(W i x t + i m t-1 + i c t-1 + i ) f t =(W f x t + f m t-1 + f c t-1 + f ) c t = t ×c t-1 + t ×g(W c x t + f m t-1 + c ) o t =(W o x t + o m t-1 + o c t-1 + o ) m t = t ×h(c t ) Where: i t represents the input gate at time t; W i represents the weight matrix of the input gate; b i represents the bias of the input gate; f t represents the forget gate at time t; W f represents the weight matrix of the forget gate; b f represents the bias of the forget gate; c t represents the unit state at time t; W c represents the weight matrix of the unit state; g(·) represents the activation function; o t represents the output gate; W o represents the weight matrix of the output gate; b o Represents the bias of the output gate; σ represents the Sigmoid function; m t-1 Represents the output result at time t-1.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method according to any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Public opinion monitoring method and device, and computer readable storage medium
CN107330613A
Fault detection method, system and device based on long short-term memory network and medium
CN113609932A
Visual multi-mode character detection recognition and error correction method in network public opinion analysis
CN116229482A
Visual multi-mode character detection and recognition and aspect-level sentiment analysis method in network public opinion analysis
CN117173708A
Intelligent excavation system for sensitive information in public opinion information
WO2021184527A1
