Disclosure of Invention
In view of this, the present invention provides a data search method, an apparatus and an electronic device, so as to solve the problem that the search result of the existing search method is single and cannot meet the search requirement of the user.
In order to solve the technical problems, the invention adopts the following technical scheme:
a method of data searching, comprising:
acquiring content to be searched, and determining an initial search result of the content to be searched;
generating a pre-constructed linked list; the linked list comprises knowledge information and associated knowledge information of the knowledge, which are arranged in sequence;
determining knowledge information matched with the initial search result from the linked list and using the knowledge information as target knowledge information;
analyzing the inclusion relationship of the target knowledge information and the associated knowledge information corresponding to the target knowledge information to determine an associated information display result of the initial search result;
and taking the initial search result and the associated information display result as the search result of the content to be searched, and displaying the search result.
Optionally, generating a pre-constructed linked list includes:
acquiring a historical linked list under the condition that the current time meets a linked list generation rule;
acquiring each stored knowledge information, and sequencing each knowledge information according to the updating time of each knowledge information;
for each knowledge information, determining other knowledge information after the knowledge information is called according to the called sequence of each knowledge information, and using the other knowledge information as associated knowledge information of the knowledge information;
summarizing the knowledge information and the associated knowledge information of the knowledge information, and obtaining an initial linked list based on a summarizing result and a historical linked list;
and repeating partial deletion operation on the initial linked list to obtain the linked list.
Optionally, performing a repeated partial deletion operation on the initial linked list to obtain a linked list, including:
for a knowledge information in the initial linked list, if the number of associated knowledge information is larger than that of associated knowledge information of the knowledge information and the associated knowledge information of the target knowledge information comprises the associated knowledge information of the knowledge information, the associated knowledge information of the target knowledge information and the target knowledge information is reserved, and the knowledge information and the associated knowledge information of the knowledge information are deleted.
Optionally, determining knowledge information matching the initial search result from the linked list, and using the knowledge information as target knowledge information includes:
and determining a knowledge tag corresponding to the initial search result, and taking knowledge information matched with the knowledge tag in the linked list as target knowledge information.
Optionally, performing inclusion relation analysis on the target knowledge information and associated knowledge information corresponding to the target knowledge information to determine an associated information display result of the initial search result, including:
determining the inclusion relation between the information content of the target knowledge information and the information content of the associated knowledge information;
if the information content of the target knowledge information contains the information content of the associated knowledge information completely, setting the associated information display result of the content to be searched to be empty;
if the information content part of the target knowledge information contains the information content of the associated knowledge information, establishing a quick link of the information content of the associated knowledge information contained in part in the information content of the target knowledge information, and taking the content which is not contained in the information content of the associated knowledge information and is contained in the information content of the associated knowledge information as an associated information display result of the content to be searched;
and if the information content containing relationship is that the information content of the target knowledge information does not contain the information content of the associated knowledge information, taking the information content of the associated knowledge information as an associated information display result of the content to be searched.
Optionally, the step of taking the initial search result and the associated information display result as the search result of the content to be searched and displaying the search result includes:
summarizing the initial search result and the associated information display result according to a preset template to obtain a search result of the content to be searched, and displaying the search result of the content to be searched.
A data search apparatus comprising:
the data determining module is used for acquiring the content to be searched and determining an initial search result of the content to be searched;
the linked list generating module is used for generating a pre-constructed linked list; the linked list comprises knowledge information and associated knowledge information of the knowledge, which are arranged in sequence;
the information matching module is used for determining knowledge information matched with the initial search result from the linked list and taking the knowledge information as target knowledge information;
the relation analysis module is used for carrying out inclusion relation analysis on the target knowledge information and the associated knowledge information corresponding to the target knowledge information so as to determine an associated information display result of the initial search result;
and the display module is used for taking the initial search result and the associated information display result as the search result of the content to be searched and displaying the search result.
Optionally, the linked list generating module includes:
the linked list generation submodule is used for acquiring a historical linked list under the condition that the current time meets the linked list generation rule;
the knowledge sequencing submodule is used for acquiring each piece of stored knowledge information and sequencing each piece of knowledge information according to the updating time of each piece of knowledge information;
the associated data determining submodule is used for determining other knowledge information after the knowledge information is called according to the called sequence of the knowledge information and the knowledge information is used as associated knowledge information of the knowledge information;
the summarizing submodule is used for summarizing the knowledge information and the associated knowledge information of the knowledge information and obtaining an initial linked list based on a summarizing result and a historical linked list;
and the deleting submodule is used for carrying out repeated partial deleting operation on the initial linked list to obtain the linked list.
Optionally, the delete sub-module is specifically configured to:
for a knowledge information in the initial linked list, if the number of associated knowledge information is larger than that of associated knowledge information of the knowledge information and the associated knowledge information of the target knowledge information comprises the associated knowledge information of the knowledge information, the associated knowledge information of the target knowledge information and the target knowledge information is reserved, and the knowledge information and the associated knowledge information of the knowledge information are deleted.
An electronic device, comprising: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls a program and is used to perform the data search method described above.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a data searching method, a data searching device and electronic equipment, which are used for acquiring content to be searched, determining an initial searching result of the content to be searched, generating a pre-constructed linked list, determining knowledge information matched with the initial searching result from the linked list and using the knowledge information as target knowledge information, performing inclusion relation analysis on the target knowledge information and associated knowledge information corresponding to the target knowledge information to determine an associated information display result of the initial searching result, and using the initial searching result and the associated information display result as a searching result of the content to be searched for and displaying the associated knowledge information. In other words, in the invention, besides the initial search result of the content to be searched, the associated information display result of the initial search result is also displayed, compared with the mode of only displaying the initial search result, the richness of the displayed content is improved, the problem of single search result is avoided, and the search requirement of the user is met.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the wider and wider application range of the computer, more and more users use the computer to search data, and when searching, the users input data to be inquired, and the computer responds to the search requirement to obtain and display the search result. The searching method has single searching result and can not meet the searching requirement of the user.
In order to solve the technical problem, the inventor finds that the problem of single search result can be solved and the search requirement of the user can be met by displaying the search result and the related information related to the search result through research.
Specifically, the embodiment of the invention provides a data search method, a data search device and an electronic device, which are used for acquiring a content to be searched, determining an initial search result of the content to be searched, generating a pre-constructed linked list, determining knowledge information matched with the initial search result from the linked list and using the knowledge information as target knowledge information, performing inclusion relation analysis on the target knowledge information and associated knowledge information corresponding to the target knowledge information to determine an associated information display result of the initial search result, and using the initial search result and the associated information display result as a search result of the content to be searched for display. In other words, in the invention, besides the initial search result of the content to be searched, the associated information display result of the initial search result is also displayed, compared with the mode of only displaying the initial search result, the richness of the displayed content is improved, the problem of single search result is avoided, and the search requirement of the user is met.
It should be noted that the data searching method, the data searching device and the electronic equipment provided by the invention can be used in the field of big data or the field of finance. The above is merely an example, and does not limit the application fields of the data search method, the data search device and the electronic device provided by the present invention.
On the basis of the above content, an embodiment of the present invention provides a data search method, and with reference to fig. 1, the method may include:
s11, obtaining the content to be searched, and determining the initial search result of the content to be searched.
In this embodiment, the data search method may be applied to a processor, and a corresponding page is provided on the processor, so that a user can input search content, the search content input by the user is referred to as content to be searched, and then a conventional search method is used to perform search, so as to obtain an initial search result. If the user needs to search for 'ETC', the initial search result is the content related to ETC.
In addition, the processor can also remotely receive the content to be searched sent by the user terminal, and after the search result is determined, the content is returned to the user terminal.
And S12, generating a pre-constructed linked list.
In this embodiment, the linked list includes knowledge information and knowledge-related knowledge information arranged in sequence.
That is, for a certain knowledge, the knowledge is sorted in a reverse order according to the updating time to obtain the knowledge information arranged in the order, and corresponding associated knowledge information is set for each knowledge. The associated knowledge information such as "ETC" is "ETC summary", "ETC is handled", or "ETC scene problem".
And S13, determining knowledge information matched with the initial search result from the linked list, and using the knowledge information as target knowledge information.
Specifically, a knowledge tag corresponding to the initial search result is determined, and knowledge information matched with the knowledge tag in the linked list is used as target knowledge information.
If the initial search result is the content related to ETC and the knowledge tag corresponding to ETC is ETC, the knowledge information matched with the knowledge tag in the linked list, such as 'ETC', is used as the target knowledge information.
And S14, analyzing the target knowledge information and the associated knowledge information corresponding to the target knowledge information to determine the associated information display result of the initial search result.
In this embodiment, the target knowledge information and the content of the associated knowledge information corresponding to the target knowledge information may be repeated, and at this time, based on the inclusion relationship between the target knowledge information and the associated knowledge information, the repeated part is processed to obtain an associated information display result of the initial search result.
And S15, taking the initial search result and the associated information display result as the search result of the content to be searched, and displaying the search result.
In this embodiment, the initial search result and the associated information display result may be summarized according to a preset template, so as to obtain a search result of the content to be searched.
The preset templates may be:
"$ { current entry text }" + "you are not or do not want to ask: "+" 1. $- $ { recommendation entry title } - $ { short summary corresponding to recommendation entry } - $ { recommendation entry tag } -. - $, "/n +" 2.$ { recommendation entry title } - $ { entry summary corresponding to recommendation entry } - $ { recommendation entry tag } -. -% "/n.
Where,/n denotes line feed.
The current item text is the initial search result, the recommended item title is the title in the associated information display result, and the short abstract corresponding to the recommended item is the abstract in the associated information display result; the recommended item label is a knowledge label in the associated information display result.
And when the associated information display results are multiple, sequentially arranging the multiple associated information display results according to the template, and directly displaying the template data serving as the search result of the content to be searched or outputting the template data to a user terminal sending the content to be searched so as to display the content by the user terminal.
In this embodiment, content to be searched is acquired, an initial search result of the content to be searched is determined, a pre-constructed linked list is generated, knowledge information matched with the initial search result is determined from the linked list and is used as target knowledge information, inclusion relation analysis is performed on the target knowledge information and associated knowledge information corresponding to the target knowledge information to determine an associated information display result of the initial search result, and the initial search result and the associated information display result are used as search results of the content to be searched and are displayed. In other words, in the invention, besides the initial search result of the content to be searched, the associated information display result of the initial search result is also displayed, compared with the mode of only displaying the initial search result, the richness of the displayed content is improved, the problem of single search result is avoided, and the search requirement of the user is met.
In another implementation manner of the present invention, a specific implementation process of "generating a pre-constructed linked list" is given, and with reference to fig. 2, the specific implementation process may include:
and S21, acquiring the history linked list under the condition that the current time meets the linked list generation rule.
In a banking scene, the use of the linked list is time-efficient, such as the etc knowledge hot push time, the related knowledge search and push frequency is high, and the general time, etc knowledge search and push frequency are general. At this time, an update time T (for example, 5 days) is set for the linked list, and the linked list is reinitialized once every T time (namely, a fixed period), so that the knowledge in the linked list is ensured to be most consistent with the knowledge use characteristics of the client.
In this embodiment, the linked list is updated every fixed period, and a new linked list is generated at this time. The linked list generation rule is set to be updated every fixed period, which may be 5 days.
If yes, the current time meets the linked list generation rule, namely the updating time point is reached, and a period of time, such as the historical linked list of each fixed period in one year, is obtained.
And S22, acquiring the stored knowledge information, and sequencing the knowledge information according to the updating time of the knowledge information.
In this embodiment, the database stores various knowledge information, such as "ETC", "deposit", "loan", and the like.
And after acquiring each knowledge information, sequencing the knowledge information in a reverse order according to the updating time of the knowledge information.
And S23, determining other knowledge information after the knowledge information is called according to the called sequence of the knowledge information and using the other knowledge information as the associated knowledge information of the knowledge information.
In this embodiment, obtaining a latest fixed period and the called condition of each knowledge information includes: the time when each knowledge information is called, which knowledge is called after the knowledge information is called, and the order in which the knowledge information is called, such as the knowledge identification ID of the last used knowledge information, the ID of the next used knowledge information, the number of times of use of the last used knowledge information, the number of times of use of the next used knowledge information, and the like, is determined.
Then, based on the called order, it is determined that other knowledge information after the knowledge information is called, such as knowledge information 1, and then knowledge information 7, knowledge information 8, and knowledge information 9 are called, and then knowledge information 7, knowledge information 8, and knowledge information 9 are associated knowledge information of the knowledge information. The knowledge information 7, the knowledge information 8, and the knowledge information 9 may be sorted in reverse order according to the number of uses, i.e., before the number of uses and after the number of uses.
S24, summarizing the knowledge information and the associated knowledge information of the knowledge information, and obtaining an initial linked list based on the summarizing result and the historical linked list.
In this embodiment, the knowledge information and the associated knowledge information of the knowledge information are summarized to obtain a summarized result, and then the summarized result is integrated with the history linked list.
Specifically, in combination with the history linked list, when the number of times of using part of the associated knowledge information of one knowledge information is large, the associated knowledge information of the knowledge information may be obtained by directly retaining the part of the associated knowledge information with the large number of times of using and removing the associated knowledge information with the small number of times of using.
In addition, if the historical linked list is analyzed, it is found that if some knowledge information is called, another knowledge information is called at a high probability, and the called another knowledge information is used as the fixed associated knowledge information of the knowledge information.
If so, the associated knowledge information of the knowledge information in the historical linked list can be used as the associated knowledge information of the current knowledge information.
In addition, the order of the associated knowledge information of each knowledge information in the linked list can be counted, and the associated knowledge information with the highest use frequency and the use times are recorded and returned to the user as the alternative knowledge filling.
And secondly, counting the associated knowledge information of each knowledge information in the current linked list, and if the use frequency of the associated knowledge information of some or a certain knowledge information is greater than the historical frequency of the statistics, filling and returning the associated knowledge information of the knowledge information as alternative knowledge to the user.
And S25, carrying out repeated partial deletion operation on the initial linked list to obtain the linked list.
Specifically, for a knowledge information in the initial linked list, if there is destination knowledge information whose number of associated knowledge information is greater than that of associated knowledge information of the knowledge information and the associated knowledge information of the destination knowledge information includes the associated knowledge information of the knowledge information, the destination knowledge information and the associated knowledge information of the destination knowledge information are retained, and the knowledge information and the associated knowledge information of the knowledge information are deleted.
For example, there are three pieces of knowledge information, the associated knowledge information of 1, 2, 3,1 is 7, 8, 9, the associated knowledge information of 2 is 1, 7, 8, 9, the associated knowledge information of 3 is 2, 7, 8, 9.
Since the number (4) of pieces of associated knowledge information of the knowledge information 2 is greater than the number (3) of pieces of associated knowledge information of the knowledge information 1 and includes the associated knowledge information of the knowledge information 1, the associated knowledge information of the knowledge information 2 and the knowledge information 2 is retained for 1, 7, 8, 9 and the associated knowledge information 7, 8, 9 of the knowledge information 1 and the knowledge information 1 is deleted.
Although the knowledge information 2 and 3 each include the associated knowledge information of the knowledge information 1, the associated knowledge information of 2 and 3 are different and therefore both remain.
If the knowledge information 4 is included and the associated knowledge information is 2, 1, 7, 8, 9, in this case, the associated knowledge information of the knowledge information 4 and the knowledge information 4 is included, and the associated knowledge information of the knowledge information 1 and the knowledge information 1, and the associated knowledge information of the knowledge information 2 and the knowledge information 2 can be deleted.
On the basis of the present embodiment, step S14: the analyzing the inclusion relationship between the target knowledge information and the associated knowledge information corresponding to the target knowledge information to determine an associated information display result of the initial search result may include:
1) determining the inclusion relation between the information content of the target knowledge information and the information content of the associated knowledge information;
2) if the information content of the target knowledge information contains the information content of the associated knowledge information completely, setting the associated information display result of the content to be searched to be empty;
3) if the information content part of the target knowledge information contains the information content of the associated knowledge information, establishing a quick link of the information content of the associated knowledge information contained in part in the information content of the target knowledge information, and taking the content which is not contained in the information content of the associated knowledge information and is contained in the information content of the associated knowledge information as an associated information display result of the content to be searched;
4) and if the information content containing relationship is that the information content of the target knowledge information does not contain the information content of the associated knowledge information, taking the information content of the associated knowledge information as an associated information display result of the content to be searched.
Specifically, in order to avoid content coincidence between the target knowledge information and the associated knowledge information, in this embodiment, content coincidence between the target knowledge information and the associated knowledge information is analyzed, and the content of the target knowledge information and the content of the associated knowledge information are analyzed to obtain an inclusion relationship between the information content of the target knowledge information and the information content of the associated knowledge information. The method is specifically divided into three types:
1) the information content of the target knowledge information completely contains the information content of the associated knowledge information;
2) the information content part of the target knowledge information comprises the information content of the associated knowledge information;
3) the information content of the target knowledge information does not include the information content of the associated knowledge information.
And under the condition that the information content of the target knowledge information completely contains the information content of the associated knowledge information, the associated knowledge information does not need to be displayed any more, and at the moment, the associated knowledge information is not displayed directly, namely, the associated information display result of the content to be searched is set to be empty.
If so, the information content part of the target knowledge information contains the information content of the associated knowledge information, and only the part which is not disclosed by the target knowledge information in the information content of the associated knowledge information needs to be displayed. In this case, a shortcut link may be established for the information content of the associated knowledge information partially included in the information content of the target knowledge information, the shortcut link being directly connected to the information content of the associated knowledge information. And then, taking the content which is not contained in the information content of the target knowledge information in the information content of the associated knowledge information as an associated information display result of the content to be searched. That is, the information content showing the target knowledge information and the associated knowledge information which is not disclosed by the target knowledge information.
If the information content of the target knowledge information does not contain the information content of the associated knowledge information, the information content of the target knowledge information and the information content of the associated knowledge information are not overlapped, and at the moment, the target knowledge information and the associated knowledge information are required to be completely displayed.
In this embodiment, for each piece of associated knowledge information, the inclusion relation analysis is performed according to the above contents to determine the portion to be displayed, and then the template, that is, the portion to be displayed is determined according to the above
"$ { current entry text }" + "you are not or do not want to ask: "+" 1. $- $ { recommendation entry title } - $ { short summary corresponding to recommendation entry } - $ { recommendation entry tag } -. - $, "/n +" 2.$ { recommendation entry title } - $ { entry summary corresponding to recommendation entry } - $ { recommendation entry tag } -. -% "/n.
Where,/n denotes line feed.
And (5) displaying.
It should be noted that, during the presentation, the presentation may be performed from high to low according to the degree of correlation, and only the set number of associated knowledge information may be presented, so as to reduce the interface occupied by the presented associated knowledge information. In addition, from the perspective of the user, the user generally only pays attention to the high degree of correlation, that is, the degree of attention paid by the user to the subsequent associated knowledge information is low, so that the high degree of correlation is preferentially displayed, and the user experience can be improved.
In addition, historical associated knowledge information inquiry is supported, and user experience is improved.
In the embodiment, the linked list is generated, and the linked list is used for determining the associated knowledge information, so that the user experience is improved. In addition, the method and the system can intelligently combine the knowledge information based on the use condition of the client, effectively utilize the regularity of the search history of the client, fully ensure the search timeliness of the knowledge information and effectively improve the search experience of the client.
Optionally, on the basis of the embodiment of the data search method, another embodiment of the present invention provides a data search apparatus, and with reference to fig. 3, the data search apparatus may include:
the data determining module 11 is configured to obtain a content to be searched, and determine an initial search result of the content to be searched;
a linked list generating module 12, configured to generate a pre-constructed linked list; the linked list comprises knowledge information and associated knowledge information of the knowledge, which are arranged in sequence;
an information matching module 13, configured to determine knowledge information matched with the initial search result from the linked list, and use the knowledge information as target knowledge information;
a relation analysis module 14, configured to perform inclusion relation analysis on the target knowledge information and associated knowledge information corresponding to the target knowledge information to determine an associated information display result of the initial search result;
and the display module 15 is configured to take the initial search result and the associated information display result as search results of the content to be searched, and display the search results.
Further, the linked list generating module includes:
the linked list generation submodule is used for acquiring a historical linked list under the condition that the current time meets the linked list generation rule;
the knowledge sequencing submodule is used for acquiring each piece of stored knowledge information and sequencing each piece of knowledge information according to the updating time of each piece of knowledge information;
the associated data determining submodule is used for determining other knowledge information after the knowledge information is called according to the called sequence of the knowledge information and the knowledge information is used as associated knowledge information of the knowledge information;
the summarizing submodule is used for summarizing the knowledge information and the associated knowledge information of the knowledge information and obtaining an initial linked list based on a summarizing result and a historical linked list;
and the deleting submodule is used for carrying out repeated partial deleting operation on the initial linked list to obtain the linked list.
Further, the delete sub-module is specifically configured to:
for a knowledge information in the initial linked list, if the number of associated knowledge information is larger than that of associated knowledge information of the knowledge information and the associated knowledge information of the target knowledge information comprises the associated knowledge information of the knowledge information, the associated knowledge information of the target knowledge information and the target knowledge information is reserved, and the knowledge information and the associated knowledge information of the knowledge information are deleted.
Further, the relationship analysis module 14 is specifically configured to:
determining the inclusion relation between the information content of the target knowledge information and the information content of the associated knowledge information; if the information content of the target knowledge information contains the information content of the associated knowledge information completely, setting the associated information display result of the content to be searched to be empty; if the information content part of the target knowledge information contains the information content of the associated knowledge information, establishing a quick link of the information content of the associated knowledge information contained in part in the information content of the target knowledge information, and taking the content which is not contained in the information content of the associated knowledge information and is contained in the information content of the associated knowledge information as an associated information display result of the content to be searched; and if the information content containing relationship is that the information content of the target knowledge information does not contain the information content of the associated knowledge information, taking the information content of the associated knowledge information as an associated information display result of the content to be searched.
Further, the display module 15 is specifically configured to:
summarizing the initial search result and the associated information display result according to a preset template to obtain a search result of the content to be searched, and displaying the search result of the content to be searched.
In this embodiment, content to be searched is acquired, an initial search result of the content to be searched is determined, a pre-constructed linked list is generated, knowledge information matched with the initial search result is determined from the linked list and is used as target knowledge information, inclusion relation analysis is performed on the target knowledge information and associated knowledge information corresponding to the target knowledge information to determine an associated information display result of the initial search result, and the initial search result and the associated information display result are used as search results of the content to be searched and are displayed. In other words, in the invention, besides the initial search result of the content to be searched, the associated information display result of the initial search result is also displayed, compared with the mode of only displaying the initial search result, the richness of the displayed content is improved, the problem of single search result is avoided, and the search requirement of the user is met.
It should be noted that, for the working processes of each module and sub-module in this embodiment, please refer to the corresponding description of the above embodiment, which is not described herein again.
Optionally, on the basis of the embodiments of the data search method and apparatus, another embodiment of the present invention provides an electronic device, including: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls a program and is used to perform the data search method described above.
In this embodiment, content to be searched is acquired, an initial search result of the content to be searched is determined, a pre-constructed linked list is generated, knowledge information matched with the initial search result is determined from the linked list and is used as target knowledge information, inclusion relation analysis is performed on the target knowledge information and associated knowledge information corresponding to the target knowledge information to determine an associated information display result of the initial search result, and the initial search result and the associated information display result are used as search results of the content to be searched and are displayed. In other words, in the invention, besides the initial search result of the content to be searched, the associated information display result of the initial search result is also displayed, compared with the mode of only displaying the initial search result, the richness of the displayed content is improved, the problem of single search result is avoided, and the search requirement of the user is met.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.