Disclosure of Invention
In view of the above, the present application provides a searching method, apparatus, storage medium and electronic device, and aims to solve the problems of low searching efficiency and insufficient accuracy in the prior art.
In order to solve the above problems, the present application provides a search method, including:
Acquiring a first search statement input by a target user;
Extracting keywords based on the first search statement to obtain target keywords;
Matching at least one automobile term from a preset automobile database based on the target keyword;
obtaining at least one second search statement based on the target keyword and the at least one automobile term, and displaying the at least one second search statement;
And responding to the selection operation of the target user on the at least one second search statement, and obtaining a target search statement so as to obtain a target result based on the target search statement.
Optionally, extracting the keyword based on the first search statement to obtain the target keyword specifically includes:
extracting keywords based on the first search statement to obtain a plurality of initial keywords;
And carrying out validity screening based on each initial keyword to obtain at least one target keyword.
Optionally, before the first search statement input by the target user is obtained, the method further comprises the steps of establishing association relations between each keyword and each automobile term based on a search history, so as to establish the preset automobile database at least based on the association relations;
the matching of at least one automobile term from a preset automobile database based on the target keyword specifically comprises the following steps:
And searching the association relation based on the target keyword, and obtaining at least one automobile term corresponding to the target keyword.
Optionally, the establishing an association relationship between each keyword and each automobile term based on the search history, so as to establish the preset automobile database based on at least the association relationship, specifically includes:
Acquiring at least one search category;
Acquiring a plurality of automobile terms based on the search history;
classifying each automobile term based on the at least one search category to obtain an automobile term set corresponding to each search category;
configuring search attributes for each keyword based on the at least one search category;
And establishing association relations between each keyword and each automobile term set based on the at least one search category so as to establish and obtain the automobile database.
Optionally, the search history comprises search histories of at least one first user with the same user type as the target user;
or the search history includes the search histories of all users.
Optionally, the presenting each second search statement specifically includes:
And displaying the at least one second search statement according to the order of the historical search rate of each second search statement from high to low.
Optionally, the search category includes any one or more of history of the vehicle, vehicle production, vehicle sales, vehicle purchase, vehicle driving, vehicle maintenance, and vehicle trouble shooting.
In order to solve the above problems, the present application provides a search apparatus comprising:
The acquisition module is used for acquiring a first search statement input by a target user;
The extraction module is used for extracting keywords based on the first search statement to obtain target keywords;
the matching module is used for matching at least one automobile term from a preset automobile database based on the target keyword;
The display module is used for obtaining at least one second search statement based on the target keyword and the at least one automobile term and displaying the at least one second search statement;
and the search module is used for responding to the selection operation of the target user on the at least one second search statement, obtaining a target search statement and searching based on the target search statement to obtain a target result.
In order to solve the above problems, the present application provides an electronic device, at least including a memory, and a processor, where the memory stores a computer program, and the processor implements the steps of the search method described in any one of the above when executing the computer program on the memory.
In order to solve the above-mentioned problems, the present application provides a storage medium storing a computer program which, when executed by a processor, implements the steps of the search method of any one of the above.
According to the searching method, the device, the storage medium and the electronic equipment, the target keyword is obtained by extracting the keyword from the first search sentence, and the automobile term is matched with the target keyword, so that the second search sentence is obtained for the subsequent search based on the target keyword and the automobile term, and therefore, the search guidance is accurately provided for the user, and the search efficiency is improved.
The foregoing description is only an overview of the present application, and is intended to be implemented in accordance with the teachings of the present application in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present application more readily apparent.
Detailed Description
Various aspects and features of the present application are described herein with reference to the accompanying drawings.
Embodiments of the present invention are described below with reference to the accompanying drawings.
The embodiment of the application provides a searching method which is particularly applied to searching scenes related to automobile field information through electronic equipment such as terminals and computers. As shown in fig. 1, the method in this embodiment includes:
step S101, acquiring a first search statement input by a target user;
in the implementation process, the text information input by the user aiming at the target position can be received to obtain the first search statement, or the voice information input by the user aiming at the target position can be received, and then the voice information is converted to obtain the first search statement. The specific conversion process may be, for example, that when the input information is voice, a processing procedure may be adopted to obtain the first search statement, where (1) frame processing is performed on the voice inquiry information according to a predetermined voice frame length and a predetermined frame shift length, so as to obtain a plurality of voice frame segments. (2) And converting each voice frame segment to obtain multidimensional vectors corresponding to each voice frame segment. (3) And carrying out normalization processing on each multidimensional vector to obtain a target feature vector corresponding to each multidimensional vector. (4) And obtaining a phoneme sequence corresponding to each target feature vector based on each target feature vector. (5) And obtaining initial texts based on the phoneme sequences, and further obtaining a first search statement.
Step S102, extracting keywords based on the first search statement to obtain target keywords;
In the implementation process of the step, the obtained target keyword can be extracted through the part of speech of each word in the first search statement, for example, word extraction processing of verbs, nouns and adjectives part of speech is used as the target keyword. For example, the user inputs "engine bad", and then the target keyword is "engine".
Step S103, at least one automobile term is matched from a preset automobile database based on the target keyword;
In this embodiment, the preset car database stores association relations between various keywords and various car terms. Wherein, the automotive terms may include "maintenance", "driving", "cleaning agent", "oil change liquid", "four-wheel positioning", "4S shop", "equipment cleaning", "second hand car", "group purchase", "automotive loan", "purchasing", "interior trim", "configuration", and the like. For example, the keyword "engine" may relate to automotive terminology such as "repair", "clean" and "shopping". In the implementation process, an automobile database can be built in advance, wherein the building process is that the association relation between each keyword and each automobile term is built based on the search history, so that the preset automobile database is built at least based on the association relation. Therefore, when the automobile term is matched with the target keyword, the association relation can be searched based on the target keyword, and at least one automobile term corresponding to the target keyword can be obtained. The search history comprises the search history of at least one first user with the same user type as the target user, or the search history comprises the search history of second users with various user types.
Step S104, at least one second search statement is obtained based on the target keyword and the at least one automobile term, and the at least one second search statement is displayed;
In the implementation process, after the automobile term is matched, the automobile term and the keyword can be combined to obtain at least one second search statement. For example, when the target keyword is "engine" and the matched automobile term is "maintenance" or "noise", the second search term is "engine maintenance" or "engine noise" can be obtained.
Step S105, in response to a selection operation of the target user for the at least one second search term, obtaining a target search term to search for obtaining a target result based on the target search term.
In this step, after each second search term is displayed, a response may be made according to a user selection operation, so that the second search term selected by the user is used as a target search term, and a search is performed. The selection operation may specifically be a click operation, a drag operation, or the like.
The target keywords are obtained by extracting keywords from the first search statement input by the user, the second search statement is obtained by automatically matching the target keywords with the automobile terms, more accurate second search statement related to the automobile field is provided for the user, and search guidance is provided for the user, so that the user is helped to improve the search efficiency, and the final search result is more accurate.
Another embodiment of the present application provides a searching method, as shown in fig. 2, including the following steps:
step S201, obtaining at least one search category, obtaining a plurality of automobile terms based on search history, classifying each automobile term based on the at least one search category to obtain an automobile term set corresponding to each search category, configuring search attributes for each keyword based on the at least one search category, and establishing association relations between each keyword and each automobile term set based on the at least one search category to establish and obtain the automobile database.
In the implementation process of the step, a database in the vertical field of the automobile can be specifically built in advance, namely, at least one search category, such as an automobile maintenance category, an automobile purchase category or the like, is obtained, and then corresponding automobile terms are configured for each category according to the search history, namely, the automobile terms are classified according to the search history, so that an automobile term set corresponding to the search category is obtained. And configuring search attributes for the keywords based on the search categories, namely determining which search category the keywords belong to, so as to establish association relations between the keywords and the automobile term sets according to the search categories, further constructing and obtaining an automobile database, and storing the automobile database in storage equipment such as a server or terminal equipment. Wherein the search category includes any one or more of history of the car, car production, car sales, car purchase, car driving, car maintenance, and car trouble maintenance
In this step, when the association relationship between the keyword and the car term is established, the association relationship between the keyword and the car term corresponding to the user type may be established based on the search history of the same user type, where the user type may specifically be a user occupation, a user age, or the like, that is, for the same search category, the association relationships between different keywords and car terms corresponding to different occupation/ages respectively, so that the corresponding target association relationship may be determined according to the user type of the target user and the attribute of the keyword, and then at least one car term may be matched according to the target keyword and the target association relationship. Of course, the search history may also include all search histories, that is, for a certain search category, the association relationship between the keywords and the car terms may also be established according to the search histories of all users.
Step S202, acquiring a first search statement input by a target user;
In the implementation process, text information or voice information input by a user can be received, when the received input information is voice information, the voice information can be converted, so that the text information is obtained, and further, a first search statement is obtained, for example, the first search statement is an engine of an automobile.
Step S203, extracting keywords based on the first search statement to obtain a plurality of initial keywords;
In this step, when extracting keywords, keyword extraction may be specifically performed according to the part of speech of the word, for example, words of the part of speech such as nouns, adjectives, verbs, etc. may be extracted as initial keywords. For example, when keyword extraction is performed on the first search statement "automobile engine", the "automobile" and/or "engine" with the noun part of speech can be extracted as initial keywords, so that keyword extraction is more accurate and reliable.
Step S204, carrying out validity screening based on each initial keyword to obtain at least one target keyword;
In the implementation process, after a plurality of initial keywords are obtained, validity screening can be carried out on the initial keywords so as to obtain target keywords. For example, the obtained initial keywords are "car", "engine", and the target keyword "engine" can be obtained by performing validity screening on the two initial keywords. In the step, the target keywords are obtained by screening the initial keywords, so that the obtained keywords are more accurate and reasonable, and a foundation is laid for accurately matching the automobile terms based on the target keywords.
Step S205, searching the association relation based on the target keyword to obtain at least one automobile term corresponding to the target keyword;
In the implementation process of the step, the association relation corresponding to the attribute of the target keyword can be searched based on the target keyword and the attribute of the target keyword, and the automobile term corresponding to the target keyword can be obtained. For example, the user type of the target user may be first determined based on occupation, age, gender, etc., such as determining the user type of the target user as a teacher. Therefore, the association relation between all keywords corresponding to the teacher and the automobile terms can be obtained, and then the target association relation corresponding to the attribute is determined based on the target keyword attribute so as to match at least one automobile term based on the target association relation. For example, the target keyword is "engine", so that based on the target keyword and the target association relationship, any one or more of the automobile terms corresponding to the target keyword "engine" are obtained by matching, such as "bad", "shake", "composition", "working principle", and the like. In the step, the target association relation corresponding to the user type of the target user is determined, and then the automobile terminology is matched according to the target association relation, so that the matched automobile terminology is more reasonable and accurate, and a foundation is laid for accurately obtaining the second search statement based on the automobile terminology. In the step, when the automobile terminology is matched, the target association relation corresponding to the attribute can be determined directly according to the attribute of the target keyword, and then at least one automobile terminology is obtained based on the target keyword and the target association relation.
Step S206, at least one second search statement is obtained based on the target keyword and the at least one automobile term, and the at least one second search statement is displayed;
In this step, after obtaining the car term, the car term may be combined with the target key to obtain at least one second search term. For example, the target keyword is "engine", and the automobile term corresponding to the target keyword "engine" is obtained by matching "bad", "jittering", "composition", "working principle", so that the target keyword and each automobile term can be combined to obtain the second search sentence, for example, the second search sentence "bad engine", "jittering", "composition of engine", "working principle", so that a plurality of second search sentences can be obtained.
In this step, when each second search term is displayed, the at least one second search term may be displayed at a predetermined position, for example, below a search box, in order of from high to low in the history search rate of each second search term, so as to present the user with the second search term.
Step S207, responding to the selection operation of the target user for the at least one second search statement, obtaining a target search statement, and searching and obtaining a target result based on the target search statement.
In this step, the selection operation may specifically be a click operation, a drag operation, or the like, and after the user performs an electronic operation on one of the second search sentences, the second search sentence may be displayed in a predetermined search position, for example, in a search box, so as to obtain the target search sentence.
According to the searching method, the first searching sentence is subjected to keyword extraction to obtain the target keyword, and the corresponding association relation is determined based on the attribute of the target keyword, so that the automobile terminology can be accurately matched based on the association relation, the automobile terminology obtained by matching is more accurate and reasonable, the second searching sentence can be obtained based on the automobile terminology and the target keyword later, accurate searching guidance is provided for a user, searching efficiency is improved, and the final searching result is more accurate.
Another embodiment of the present application provides a search apparatus, as shown in fig. 3, including:
The acquisition module 1 is used for acquiring a first search statement input by a target user;
the extraction module 2 is used for extracting keywords based on the first search statement to obtain target keywords;
A matching module 3, configured to match at least one car term from a preset car database based on the target keyword;
A display module 4, configured to obtain at least one second search sentence based on the target keyword and the at least one car term, and display the at least one second search sentence;
and the search module 5 is used for responding to the selection operation of the target user on the at least one second search statement to obtain a target search statement so as to search and obtain a target result based on the target search statement.
In a specific implementation process, the extraction module is specifically configured to extract keywords based on the first search statement to obtain a plurality of initial keywords, and perform validity screening based on each initial keyword to obtain at least one target keyword.
The searching device in the embodiment of the application further comprises an establishing module, wherein the establishing module is used for establishing association relations between each keyword and each automobile term based on search history before the first search statement input by the target user is acquired, so as to establish the preset automobile database at least based on the association relations, and the matching module is specifically used for searching the association relations based on the target keywords and acquiring at least one automobile term corresponding to the target keywords.
In the embodiment of the application, the building module is specifically used for obtaining at least one search category, obtaining a plurality of automobile terms based on the search history, classifying the automobile terms based on the at least one search category to obtain an automobile term set corresponding to the search category, configuring search attributes for the keywords based on the at least one search category, and building association relations between the keywords and the automobile term sets based on the at least one search category to build and obtain the automobile database.
In the implementation process of the embodiment of the application, the search history comprises the search history of at least one first user with the same user type as the target user, or the search history comprises the search histories of all users.
In the embodiment of the application, in the implementation process, the display module is specifically configured to display the at least one second search statement according to the order of the historical search rate of each second search statement from high to low.
In the embodiment of the application, the search category comprises any one or more of automobile history, automobile production, automobile sales, automobile purchase, automobile driving, automobile maintenance and automobile fault maintenance.
According to the search device provided by the embodiment of the application, the target keyword is obtained by extracting the keyword from the first search sentence, and the automobile term is matched with the target keyword, so that the second search sentence is obtained for the subsequent acquisition based on the target keyword and the automobile term, thereby realizing accurate search guidance for the user, improving the search efficiency, and enabling the final search result to be accurate.
Another embodiment of the present application provides an electronic device, as shown in fig. 4, at least including a memory 1 and a processor 2, where the memory 1 stores a computer program, and the processor 2 implements the following method steps when executing the computer program on the memory 1:
step one, acquiring a first search statement input by a target user;
Step two, extracting keywords based on the first search statement to obtain target keywords;
step three, matching at least one automobile term from a preset automobile database based on the target keyword;
step four, at least one second search statement is obtained based on the target keyword and the at least one automobile term, and the at least one second search statement is displayed;
And step five, responding to the selection operation of the target user for the at least one second search statement, and obtaining a target search statement so as to obtain a target result based on the target search statement.
In the implementation process, the first search statement is used for extracting keywords to obtain target keywords, and the processor specifically performs the following steps of extracting keywords to obtain a plurality of initial keywords based on the first search statement, and performing validity screening based on each initial keyword to obtain at least one target keyword.
In the implementation process, before the first search statement input by the target user is obtained, the processor further performs the following steps of establishing association relations between each keyword and each automobile term based on search history so as to establish the preset automobile database at least based on the association relations;
said matching at least one car term from a pre-set car database based on said target keyword, the processor specifically executes the following steps:
And searching the association relation based on the target keyword, and obtaining at least one automobile term corresponding to the target keyword.
In the implementation process, the association relation between each keyword and each automobile term is established based on the search history so as to establish the preset automobile database at least based on the association relation, and the processor specifically executes the following steps of obtaining at least one search category, obtaining a plurality of automobile terms based on the search history, classifying each automobile term based on the at least one search category to obtain an automobile term set corresponding to each search category, and configuring search attributes for each keyword based on the at least one search category;
And establishing association relations between each keyword and each automobile term set based on the at least one search category so as to establish and obtain the automobile database.
Specifically, the search history in the implementation comprises the search history of at least one first user with the same user type as the target user, or the search history comprises the search history of a second user with various user types.
The processor specifically executes the steps of displaying the at least one second search statement in the order of the historical search rate of each second search statement from high to low.
In the embodiment of the application, the search category comprises any one or more of automobile history, automobile production, automobile sales, automobile purchase, automobile driving, automobile maintenance and automobile fault maintenance.
According to the electronic equipment provided by the embodiment of the application, the target keyword is obtained by extracting the keyword from the first search sentence, and the automobile term is matched with the target keyword, so that the second search sentence is obtained for the subsequent acquisition based on the target keyword and the automobile term, thereby realizing accurate search guidance for the user, improving the search efficiency, and enabling the final search result to be accurate.
Another embodiment of the present application provides a storage medium storing a computer program which, when executed by a processor, performs the method steps of:
step one, acquiring a first search statement input by a target user;
Step two, extracting keywords based on the first search statement to obtain target keywords;
step three, matching at least one automobile term from a preset automobile database based on the target keyword;
step four, at least one second search statement is obtained based on the target keyword and the at least one automobile term, and the at least one second search statement is displayed;
And step five, responding to the selection operation of the target user for the at least one second search statement, and obtaining a target search statement so as to obtain a target result based on the target search statement.
In the implementation process, the first search statement is used for extracting keywords to obtain target keywords, and the processor specifically performs the following steps of extracting keywords to obtain a plurality of initial keywords based on the first search statement, and performing validity screening based on each initial keyword to obtain at least one target keyword.
In the implementation process, before the first search statement input by the target user is obtained, the processor further performs the following steps of establishing association relations between each keyword and each automobile term based on search history so as to establish the preset automobile database at least based on the association relations;
said matching at least one car term from a pre-set car database based on said target keyword, the processor specifically executes the following steps:
And searching the association relation based on the target keyword, and obtaining at least one automobile term corresponding to the target keyword.
In the implementation process, the association relation between each keyword and each automobile term is established based on the search history so as to establish the preset automobile database at least based on the association relation, and the processor specifically executes the following steps of obtaining at least one search category, obtaining a plurality of automobile terms based on the search history, classifying each automobile term based on the at least one search category to obtain an automobile term set corresponding to each search category, and configuring search attributes for each keyword based on the at least one search category;
And establishing association relations between each keyword and each automobile term set based on the at least one search category so as to establish and obtain the automobile database.
Specifically, the search history in the implementation comprises the search history of at least one first user with the same user type as the target user, or the search history comprises the search history of a second user with various user types.
The processor specifically executes the steps of displaying the at least one second search statement in the order of the historical search rate of each second search statement from high to low.
In the embodiment of the application, the search category comprises any one or more of automobile history, automobile production, automobile sales, automobile purchase, automobile driving, automobile maintenance and automobile fault maintenance.
According to the storage medium in the embodiment of the application, the target keyword is obtained by extracting the keyword from the first search sentence, and the automobile term is matched with the target keyword, so that the second search sentence is obtained for the subsequent acquisition based on the target keyword and the automobile term, thereby realizing accurate search guidance for the user, improving the search efficiency, and enabling the final search result to be accurate.
The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application, the scope of which is defined by the claims. Various modifications and equivalent arrangements of this application will occur to those skilled in the art, and are intended to be within the spirit and scope of the application.