Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a graphical display method of search engine search results, which constructs a graphical knowledge graph through a graphical database, extracts advanced features by utilizing deep learning pre-training images, enables a user to initiate a search request through a search engine by using keywords or image samples, enables a system to carry out semantic analysis and image recognition on query results by using NLP and deep learning technology, realizes real-time matching with the graphical knowledge graph, enables the search results to be displayed through a carousel graph, provides multi-dimensional information viewing, and also has an intelligent color screening function, combines shape and texture features to carry out graphical display, enables the system to collect user feedback, optimizes a search result ordering algorithm through machine learning, builds a graphical community, realizes sharing, commenting and intelligent recommendation of resources, and improves the searching accuracy.
In order to achieve the above purpose, the present invention provides the following technical solutions:
A graphical display method of search engine search results comprises the following steps:
Step S1, a graphic database is established, a graphic knowledge graph is established according to the graphic database, the images, labels and metadata information in the graphic database are organized into a graph structure, the images in the graphic database are pre-trained through a deep learning method, advanced features of the images are extracted, intelligent indexes are established, a user inputs query keywords or uploads image samples through a search engine, and a search request is initiated;
Step S2, a search engine receives a user request, performs semantic analysis on query keywords by using an NLP method, recognizes uploaded images by using deep learning, performs real-time matching with the images in the graph knowledge graph, and determines the sequence of search results according to the matching results and a ranking algorithm;
step S3, carrying out result display by using a carousel graph according to the type of the search result, displaying multi-dimensional information of an image while displaying the search result and allowing a user to view and switch different dimensional information through interactive operation, wherein the multi-dimensional information of the image comprises sources, click quantity and comment quantity of the image;
Step S4, providing an intelligent color selector on the search interface, allowing a user to select or input colors on the search interface for screening, screening images by the search engine according to the color feature vectors, and combining the shape and texture features of the graphics for graphical display;
s5, collecting feedback and suggestions of a user, carrying out emotion analysis on feedback data by using a machine learning algorithm, and carrying out iteration and optimization on a graph knowledge graph and a search result ordering algorithm according to the feedback of the user;
And S6, constructing a graphic community, allowing users to share, comment and praise graphic resources, introducing a social graph analysis method, obtaining the relevance among the users, and performing intelligent recommendation according to the relevance.
Specifically, the specific steps of the step S2 include:
S2.1, a search engine receives a query keyword input by a user or an uploaded image sample;
s2.2, for the query keywords, encoding the query keywords by using an NLP method to generate word vectors, and calculating the similarity between the word vectors and labels or metadata in the graphic knowledge graph by using an improved semantic similarity algorithm, wherein the formula is as follows:
Wherein, Representing the similarity of word vector a and word vector B, w represents the same weight vector as the a and B dimensions,The sparsity factor is represented by a factor of sparsity,Indicating the sensitivity adjustment parameter(s),Representing a 2-norm.
Specifically, the specific steps of the step S2 further include:
s2.3, extracting features of the uploaded image sample by using a deep learning model, generating feature vectors of the image, matching the extracted feature vectors of the image with pre-trained image features in a graph knowledge graph by using a graph searching strategy, and finding similar images;
And S2.4, sorting the search results by using a weighted sorting algorithm according to the relevance of the matching results, and returning the sorted search results to the user.
Specifically, the specific steps of the graph searching strategy in S2.3 include:
s2.31, receiving an image sample uploaded by a user and preprocessing the image sample;
s2.32, extracting features of the preprocessed image by using a pre-trained ResNet deep learning model, and performing pooling operation on the extracted feature images to convert the extracted feature images into feature vectors with the length of h;
S2.33, loading the pre-trained image feature vector from the graph knowledge graph, and calculating the similarity between the feature vector C of the uploaded image and each pre-trained feature vector D in the graph knowledge graph according to the similarity algorithm calculation formula in S2.2 。
Specifically, the specific steps of the graph searching strategy in S2.3 further include:
S2.34 defining a graph search strategy according to Searching an image most similar to the uploaded image in the graph knowledge graph;
S2.35, setting the similarity threshold as H according to Sorting the search results;
If it is Discarding the mixture;
If it is And outputting the corresponding image as a query result.
Specifically, the formula of the graph search strategy in S2.34 is:
Wherein r represents the similarity coefficient of the uploaded image and the image in the graphic knowledge graph, d represents the color channel of the uploaded image, Representing different color channels d and different spatial positions in an uploaded imageThe weight parameter of the pixel is used to determine,Representing the non-linear transformation function of the color channel d,Representing the position of a template image in a graphic knowledge graph in a color channel dIs used for the display of the display panel,Representing the pixel mean value of the template image in the color channel d in the graph knowledge graph,Representing the uploaded image in color channel d and positionIs used for the display of the display panel,Representing the pixel mean of the uploaded image at color channel d,Representing the offset parameter of the template image in the color channel d in the graph knowledge graph,An offset parameter representing the uploaded image in color channel d.
The electronic equipment comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of a graphical display method of search engine search results when executing the computer program.
Specifically, a computer readable storage medium having stored thereon computer instructions which when executed perform the steps of a method for graphically displaying search results of a search engine.
Compared with the prior art, the invention has the beneficial effects that:
1. the invention provides a graphical display method of search engine search results, which is characterized in that images, labels and metadata are organized through a graph structure, a search engine can be rapidly positioned to related image resources, the combination of NLP and deep learning enables the search of keywords and image samples to be more intelligent, the search accuracy is improved, the multi-dimensional information display mode of a carousel graph is used, detailed information of the search results, such as the labels and the metadata of the images, can be intuitively known, meanwhile, an intelligent color selector allows a user to select according to color characteristics, and the search results are more in accordance with the personalized requirements of the user by combining the shape and texture characteristics of the images.
2. The invention provides a graphical display method of search engine retrieval results, which optimizes a search result ordering algorithm and a graphical knowledge graph by collecting feedback and suggestions of users and carrying out emotion analysis by using a machine learning algorithm, wherein the construction of a graphical community allows users to share, comment and praise graphical resources, promotes communication and interaction among the users, and simultaneously, the social graph analysis method is introduced, so that the system can obtain the relevance among the users and carry out intelligent recommendation according to the relevance.
Detailed Description
Example 1
Referring to fig. 1-2, an embodiment of the present invention provides a graphical display method for search results of a search engine, including the following steps:
step S1, a graphic database is established, a graphic knowledge graph is established according to the graphic database, images, labels and metadata information in the graphic database are organized into a graph structure, the images in the graphic database are pre-trained through a deep learning method, advanced features of the images are extracted, intelligent indexes are constructed, a user inputs query keywords or uploads image samples through a search engine, and a search request is initiated, wherein the pre-training of the images through the deep learning method is the prior art content in the field, and the deep learning method is not an inventive scheme of the application and is not repeated herein;
The specific steps for establishing the graphic database comprise:
(1) Extracting key features of the image, such as color, texture, and shape, from the internet or local resources by using image processing and computer vision technologies, such as SURF algorithm, which is the prior art in the field and is not an inventive scheme of the present application, and is not described herein;
(2) These feature information are stored with the metadata of the image, such as title, description, tags, into a graphic database, which uses Neo4j, to form a structured image data repository.
The specific steps of constructing the graphic knowledge graph comprise:
(1) Determining the target and the range of the knowledge graph;
(2) Firstly, designing an ontology construction layer, which comprises defining entities, relations, attributes and types thereof, and then extracting knowledge from a structured data source based on the designs;
(3) Identifying named entities from the text by using a rule-based information extraction method, and extracting association relations among the entities from the text to form a netlike knowledge structure;
(4) Carrying out knowledge fusion on the extracted information, and storing the knowledge graph in a graph form by using a graph database;
(5) The knowledge graph is updated and expanded periodically as new data sources and knowledge are added.
Step S2, a search engine receives a user request, performs semantic analysis on query keywords by using an NLP method, recognizes uploaded images by using deep learning, performs real-time matching with the images in the graph knowledge graph, and determines the sequence of search results according to the matching results and a ranking algorithm;
Step S3, performing result display by using a carousel graph according to the type of the search result, displaying multi-dimensional information of an image while displaying the search result, and allowing a user to view and switch different dimensional information through interactive operation, wherein the multi-dimensional information comprises a source, a click amount and a comment number, and the interactive operation comprises clicking and sliding to view picture details, save pictures and share operation;
Step S4, providing an intelligent color selector on the search interface, allowing a user to select or input colors on the search interface for screening, screening images by the search engine according to the color feature vectors, and combining the shape and texture features of the graphics for graphical display;
Step S5, collecting feedback and suggestions of a user, carrying out emotion analysis on feedback data by using a machine learning algorithm, iterating and optimizing a graph knowledge graph and a search result ordering algorithm according to the feedback of the user, wherein in carrying out emotion analysis on the feedback data by using the machine learning algorithm, the machine learning algorithm uses a naive Bayesian algorithm which is the prior art content in the field, and is not an inventive scheme of the application and is not repeated herein;
further, the specific steps of iterating and optimizing the graph knowledge graph and the search result ordering algorithm include:
(1) Carrying out statistics and analysis on the emotion analysis result, and knowing the satisfaction degree and opinion of the user on the graph knowledge graph and the search result;
(2) Determining an optimization direction of a graph knowledge graph and a search result ordering algorithm according to user feedback;
(3) The method for extracting the entity relationship of the knowledge graph is used for iterating and optimizing a construction algorithm and a search result ordering algorithm of the graph knowledge graph, so that the accuracy and the integrity of the knowledge graph are improved, wherein the method for extracting the entity relationship of the knowledge graph is the prior art content in the field and is not an inventive scheme of the application, and details are not repeated here;
(4) Optimizing a search result ordering algorithm by using a feature selection algorithm, so as to improve the accuracy of the search result, wherein the feature selection algorithm is the prior art in the field and is not an inventive scheme of the application, and is not repeated here;
(5) Testing and evaluating the optimized graph knowledge graph and search result ordering algorithm by using user feedback as an evaluation index;
(6) And continuously iterating and optimizing the graph knowledge graph and search result ordering algorithm according to the user feedback and the test result.
And S6, constructing a graphic community, allowing users to share, comment and praise graphic resources, introducing a social graph analysis method, obtaining the relevance among the users, and performing intelligent recommendation according to the relevance.
Further, the specific steps of constructing the graphic community include:
The method comprises the steps of (1) determining main purposes of communities, such as sharing graphic design resources and exchanging knowledge graph construction experience, defining core functions, (2) designing community structures and interfaces, (3) developing community platforms, (4) collecting user behavior data including browsing records, praise and comments of users, (5) constructing social networks among users based on the user behavior data, (6) storing user social network data by using a graphic database, designing query and analysis methods, (7) integrating social graph analysis results into collaborative filtering recommendation algorithms according to community characteristics and user requirements, and continuously optimizing and improving the collaborative filtering recommendation algorithms according to user feedback and data analysis results, (8) comprehensively testing the functions of the community platforms, and collecting user feedback through questionnaires and user interviews.
Example 2
Referring to fig. 3-4, the specific steps of step S2 in the present embodiment include:
S2.1, a search engine receives a query keyword input by a user or an uploaded image sample;
s2.2, for the query keywords, encoding the query keywords by using an NLP method to generate word vectors, and calculating the similarity between the word vectors and labels or metadata in the graphic knowledge graph by using an improved semantic similarity algorithm, wherein the formula is as follows:
Wherein, Representing the similarity of word vector a and word vector B, w represents the same weight vector as the a and B dimensions, for adjusting the importance of the different dimensions,The sparsity factor is expressed and used for processing the situation of vector sparsity, when the vector is very sparse, namely contains a plurality of zero elements, the denominator becomes very small, the similarity value is abnormally high, and a non-zero element is addedThe value, which can be avoided,Representing sensitivity adjustment parameters for controlling sensitivity of the degree of similarity whenWhen larger, the similarity value is more sensitive to changes in the vector length whenAt smaller times, the similarity value is insensitive to changes in vector length,Represents 2 norms and、The manner of arrangement of (c) is determined by a person skilled in the art through a number of experiments.
Further, the NLP preprocessing is mainly to divide the text into single words or phrases by using a word segmentation method based on dictionary matching, and label the words according to the context or form of the words by using a predefined part-of-speech labeling rule, wherein the word segmentation method and the part-of-speech labeling rule based on dictionary matching are prior art contents in the field and are not inventive schemes of the application and are not repeated herein.
The specific steps of step S2 further include:
s2.3, extracting features of the uploaded image sample by using a deep learning model, generating feature vectors of the image, matching the extracted feature vectors of the image with pre-trained image features in a graph knowledge graph by using a graph searching strategy, and finding similar images;
And S2.4, sorting the search results by using a weighted sorting algorithm according to the relevance of the matching results, and returning the sorted search results to the user.
The specific formula of the weighted sorting algorithm is:
Wherein, Representing the kth correlation metric,Representation ofThe corresponding weights can be adjusted according to actual conditions to reflect the importance of different metrics on the final sorting result.
The specific steps of the graph searching strategy in S2.3 comprise:
s2.31, receiving an image sample uploaded by a user and preprocessing the image sample;
s2.32, extracting features of the preprocessed image by using a pre-trained ResNet deep learning model, and performing pooling operation on the extracted feature images to convert the extracted feature images into feature vectors with the length of h;
S2.33, loading the pre-trained image feature vector from the graph knowledge graph, and calculating the similarity between the feature vector C of the uploaded image and each pre-trained feature vector D in the graph knowledge graph according to the similarity algorithm calculation formula in S2.2 。
The specific steps of the graph searching strategy in S2.3 further comprise:
S2.34 defining a graph search strategy according to Searching an image most similar to the uploaded image in the graph knowledge graph;
S2.35, setting the similarity threshold as H according to Sorting the search results;
If it is Discarding the mixture;
If it is And outputting the corresponding image as a query result.
The formula of the graph search strategy in S2.34 is:
Wherein r represents the similarity coefficient of the uploaded image and the image in the graphic knowledge graph, d represents the color channel of the uploaded image, Representing different color channels d and different spatial positions in an uploaded imageThe weight parameter of the pixel is used to determine,Representing the non-linear transformation function of the color channel d,Representing the position of a template image in a graphic knowledge graph in a color channel dIs used for the display of the display panel,Representing the pixel mean value of the template image in the color channel d in the graph knowledge graph,Representing the uploaded image in color channel d and positionIs used for the display of the display panel,Representing the pixel mean of the uploaded image at color channel d,Representing the offset parameter of the template image in the color channel d in the graph knowledge graph,An offset parameter representing the uploaded image in color channel d.
Example 3
An electronic device comprising a memory storing a computer program and a processor implementing the steps of a method for graphically displaying search results of a search engine when the computer program is executed.
A computer readable storage medium having stored thereon computer instructions which when executed perform the steps of a method of graphically displaying search engine search results.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and variations, modifications, substitutions and alterations can be made to the above-described embodiments by those having ordinary skill in the art without departing from the spirit and scope of the present invention, and these are all within the protection of the present invention.