Search method, device, computer equipment and storage medium

By extracting similar data pairs from the original data set and deduplicating them based on the data's attention, a candidate data set is generated. This solves the problems of low efficiency and redundancy in existing search platforms and achieves more efficient search result output.

CN115269785BActive Publication Date: 2025-09-26INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210996284.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-19
Publication Date
2025-09-26
Estimated Expiration
2042-08-19

AI Technical Summary

Technical Problem

The existing search platform has low search efficiency and redundancy problems and is in urgent need of improvement.

Method used

By extracting similar data pairs from the original data set, deduplication is performed based on the data attention, a candidate data set is generated, and a search is performed in the candidate data set to output the search results.

Benefits of technology

It reduces the amount of data redundancy in search results, improves search efficiency, and makes the results more in line with user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115269785B_ABST
    Figure CN115269785B_ABST
Patent Text Reader

Abstract

This application relates to a search method, apparatus, computer device, and storage medium. The method comprises: in response to search information input by a search requester, searching within a candidate dataset to obtain search results for the search information; wherein the candidate dataset is obtained by deduplicating the original dataset based on the data attention of similar data pairs in the original dataset; and outputting the search results. This method enables efficient and low-redundancy search results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a search method, apparatus, computer device, and storage medium. Background Art

[0002] With the continuous development of artificial intelligence technology, search platforms have been vigorously promoted, providing convenience for users' searches.

[0003] Existing search platforms typically retrieve search results based on user-provided search information, searching across all available data on the platform. However, this approach suffers from low efficiency and is in urgent need of improvement. Summary of the Invention

[0004] Based on this, it is necessary to provide a search method, apparatus, computer device and storage medium that can obtain search results efficiently and with low redundancy to address the above technical problems.

[0005] In a first aspect, the present application provides a search method. The method comprises:

[0006] In response to search information input by a search requester, a search is performed in a candidate data set to obtain search results of the search information; wherein the candidate data set is obtained by deduplicating the original data set based on the data attention of similar data pairs in the original data set;

[0007] The search results are output.

[0008] In one embodiment, in response to the search information input by the search requester, searching from the candidate data set to obtain the search results of the search information includes:

[0009] In response to the search statement input by the search demander, a search is performed from a candidate text set to obtain search results for the search statement; wherein, the candidate text set is obtained by deduplicating the original text set based on the text attention of similar text pairs in the original text set.

[0010] In one embodiment, performing deduplication processing on the original text set according to the text attention of similar text pairs in the original text set includes:

[0011] Extracting similar text pairs from the original text set according to the distances between different original texts in the original text set;

[0012] Determining a text to be removed from the similar text pair according to the text attention of each similar text in the similar text pair;

[0013] The text to be eliminated is eliminated from the original text set to obtain the candidate text set.

[0014] In one embodiment, determining the text to be removed from the similar text pair according to the text attention of each similar text in the similar text pair includes:

[0015] Clustering the similar text pairs to obtain a similar text set;

[0016] The text to be removed is determined from the similar text set according to the text attention of each similar text in the similar text set.

[0017] In one embodiment, for each similar text, the text attention of the similar text includes: the number of views and / or the number of likes of the similar text.

[0018] In one embodiment, in response to a search statement input by the search requester, searching from a candidate text set to obtain search results for the search statement includes:

[0019] Expanding the search statement to obtain similar statements to the search statement;

[0020] Searching the candidate text set based on the similar sentences to obtain a target text set of the similar sentences;

[0021] The search results of the search sentence are determined according to the target text set of similar sentences.

[0022] In one embodiment, the expanding the search statement to obtain similar statements to the search statement includes:

[0023] The search sentence is input into a similar sentence generation model to obtain the similar sentence and a first similarity between the search sentence and the similar sentence.

[0024] In one embodiment, searching the candidate text set based on the similar sentences to obtain the target text set of the similar sentences includes:

[0025] According to the similar sentence, searching for target keywords similar to the similar sentence from a preset inverted index; wherein the inverted index includes a correspondence between each candidate keyword and a candidate text in the candidate text set, and the candidate keyword is extracted from the candidate text set;

[0026] According to the target keyword, candidate texts corresponding to the target keyword are determined from the inverted index, and a target text set of similar sentences is determined based on the candidate texts corresponding to the target keyword.

[0027] In one embodiment, determining the search results of the search statement based on the target text set of similar statements includes:

[0028] determining a third similarity between the similar sentence and each target text in the target text set based on a first similarity between the search sentence and the similar sentence, and a second similarity between the target keyword and a target text corresponding to the target keyword in the target text set;

[0029] According to the third similarity, each target text in the target text set is sorted, and the sorted target text is used as the search result of the search statement.

[0030] In one embodiment, sorting the target texts in the target text set according to the third similarity and using the sorted target texts as search results of the search statement includes:

[0031] determining, based on the third similarity, a fourth similarity between the search statement and each target text in the target text set;

[0032] According to the fourth similarity, each target text in the target text set is sorted, and the sorted target text is used as the search result of the search statement.

[0033] In one embodiment, determining a third similarity between the similar statement and each target text in the target text set based on a first similarity between the search statement and the similar statement, and a second similarity between the target keyword and a target text corresponding to the target keyword in the target text set, includes:

[0034] The third similarity is determined according to the product of the first similarity and the second similarity.

[0035] In one embodiment, if the number of the similar sentences is at least two, searching from the candidate text set based on the similar sentences to obtain the target text set of the similar sentences includes:

[0036] Determine the search order for similar statements;

[0037] According to the search order, the target text sets of the similar sentences are searched in sequence from the candidate text set; wherein, in each search process, the target texts of the similar sentences that have been searched in the candidate text set are skipped.

[0038] In one embodiment, the candidate texts in the candidate text set are business work order texts.

[0039] In a second aspect, the present application further provides a search device. The device comprises:

[0040] A search module, configured to search candidate data sets in response to search information input by a search requester, and obtain search results for the search information; wherein the candidate data sets are obtained by deduplicating the original data sets based on the data attention of similar data pairs in the original data sets;

[0041] An output module is used to output the search results.

[0042] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:

[0043] In response to search information input by a search requester, a search is performed in a candidate data set to obtain search results of the search information; wherein the candidate data set is obtained by deduplicating the original data set based on the data attention of similar data pairs in the original data set;

[0044] The search results are output.

[0045] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0046] In response to search information input by a search requester, a search is performed in a candidate data set to obtain search results of the search information; wherein the candidate data set is obtained by deduplicating the original data set based on the data attention of similar data pairs in the original data set;

[0047] The search results are output.

[0048] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:

[0049] In response to search information input by a search requester, a search is performed in a candidate data set to obtain search results of the search information; wherein the candidate data set is obtained by deduplicating the original data set based on the data attention of similar data pairs in the original data set;

[0050] The search results are output.

[0051] The above-described search method, apparatus, computer device, storage medium, and computer program product, upon obtaining search information provided by a search requester, can obtain and display search results corresponding to the search information by searching within a candidate dataset that has been deduplicated based on the data attention of similar data pairs in the original dataset. By deduplicating the original dataset based on the data attention of similar data pairs in the original dataset, the above-described solution can reduce the amount of data redundancy in the candidate dataset. Furthermore, searching within the candidate dataset can reduce the amount of data duplication in the search results and improve search efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A diagram of an application environment of a search method in one embodiment;

[0053] Figure 2 Schematic diagram of a search method in one embodiment;

[0054] Figure 3 1. A schematic diagram of a process for performing deduplication processing on an original text set in one embodiment;

[0055] Figure 4 A schematic diagram of a process for determining search results in one embodiment;

[0056] Figure 5 is a flowchart of a search method in another embodiment;

[0057] Figure 6 Schematic diagram of the principle of a search method in one embodiment;

[0058] Figure 7 is a structural block diagram of a search device in one embodiment;

[0059] Figure 8 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0061] The search method provided in the embodiment of the present application can be applied to Figure 1 In the system architecture shown in Figure 1 As shown, the system architecture includes a terminal 102 and a server 104. The method of this embodiment can be applied to Figure 1The server shown can also be applied to terminals with relatively strong computing power, and can also be applied to systems including terminals and servers, and can be implemented through the interaction between the terminal and the server. For example, the server can obtain the search information entered by the search demander in the search interface displayed by the terminal, and search from the candidate data set after deduplication of the original data set based on the data attention of similar data pairs in the original data set. The search results corresponding to the search information can be obtained and displayed to the search demander through the terminal. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server can be implemented as an independent server or a server cluster consisting of multiple servers.

[0062] In one embodiment, Figure 2 As shown, a search method is provided, which is applied to Figure 1 The server shown in the figure is used as an example for explanation. This embodiment can be applied to the scenario of searching for the data required by the user from a large amount of data. The method includes the following steps:

[0063] S202 , in response to the search information input by the search demander, searching from the candidate data set to obtain search results of the search information.

[0064] The so-called search demander is any party with a search demand; the search information is the information entered by the search demander in the search interface provided by the server, and can specifically be any form of information that the server can support. The search information can also be search information obtained by the server from an external device. For example, the search demander enters the search information on a terminal, and the terminal sends the search information to the server. Optionally, the search information can be a search voice input by the search demander in voice mode, a search statement input in text mode, or a search image input in image mode.

[0065] The candidate dataset is the dataset after deduplication processing of the original dataset. The original dataset is the collection of all searchable data provided by the server. For example, in the music search scenario, the original dataset can be the collection of all searchable music. In another example, in the bank work order search scenario, the original dataset can be the collection of all searchable business work order texts.

[0066] It should be noted that, usually, the original data set contains a large amount of repeated or highly similar data. This embodiment deduplicates the original data set to obtain a low-redundancy candidate data set. Optionally, deduplication is performed on the original data set to obtain a candidate data set, which can be obtained by deduplicating the original data set based on the data attention of similar data pairs in the original data set. The so-called similar data pair consists of two similar or related original data; the data attention of each original data in the similar data pair is used to characterize the degree to which the original data is paid attention to by the user. Specifically, pairwise similar original data, i.e., similar data pairs, can be extracted from the original data set first; then, for each similar data pair, the original data with low data attention in the similar data pair can be eliminated, and the candidate data set can be obtained.

[0067] Specifically, when the search demander has a search demand, the server responds to the search information input by the search demander, uses the search information as an index, and searches from the candidate data set to obtain search results corresponding to the search information.

[0068] S204: Output search results.

[0069] Specifically, after obtaining the search results corresponding to the search information, the server can output the obtained search results. In one embodiment, if the server has a visual display terminal, the server can display the search results in a default display method (such as a sliding display method or a vertical display method). In another embodiment, if the search information obtained by the server is sent to the server by the search demander based on the terminal, the server can determine the display method of the search results based on the size information of the display screen of the terminal held by the search demander, and layout the search results in the determined display method, and display the layout search results through the terminal held by the search demander.

[0070] In the above search method, by deduplicating the original dataset based on the data attention of similar data pairs in the original dataset, the amount of data redundancy in the candidate dataset can be reduced. Searching from the candidate dataset can then reduce the amount of data duplication in the search results, while also reducing search complexity, conserving computing resources, and improving search efficiency. Furthermore, while controlling the number of results displayed, since the search results obtained through this solution are free of redundancy, the search results presented to the searcher can be more comprehensive.

[0071] It is understandable that, generally, the server can provide different data sets for different search scenarios, that is, the candidate data sets are different in different search scenarios; at the same time, the search information input by the search demander is in different forms in different search scenarios.

[0072] For example, in an image search scenario, S202 may specifically be: in response to a search image input by a search demander, searching from a candidate image set to obtain search results for the search image; wherein the candidate image set is obtained by deduplicating the original image set based on the image attention of similar image pairs in the original image set.

[0073] For another example, in a text search scenario, such as a bank work order search scenario, S202 may specifically include: in response to a search query input by a search requester, searching from a candidate text set to obtain search results for the search query; wherein the candidate text set is obtained by deduplicating the original text set based on the text attention of similar text pairs in the original text set. Furthermore, in the bank work order search scenario, the candidate texts in the candidate text set are bank work order texts.

[0074] It should be noted that the search scenarios supported by the server in this embodiment are not limited to image search scenarios and text search scenarios, and can also support other search scenarios, such as music search scenarios, etc. This embodiment does not limit this.

[0075] The following uses a text search scenario, such as a bank work order search scenario, as an example.

[0076] Figure 3 FIG. 1 is a flow chart of deduplication processing of an original text set in one embodiment. Based on the above embodiment, this embodiment relates to an optional implementation process of how the server deduplications the original text set according to the text attention of similar text pairs in the original text set. Figure 3 As shown, the method may specifically include the following steps:

[0077] S302: extract similar text pairs from the original text set according to the distances between different original texts in the original text set.

[0078] In this embodiment, the distance between different original texts can be used to represent the degree of similarity between the different original texts. Optionally, for any two original texts, the closer the distance between the two original texts, the higher the degree of similarity between the two original texts; conversely, the farther the distance between the two original texts, the lower the degree of similarity between the two original texts.

[0079] Optionally, for any two original texts, the distance between the two original texts can be determined by calculating the Euclidean distance, cosine value, or Hamming distance between the two original texts. For example, for any two original texts, the SimHash algorithm can be used to determine the vector fingerprints of the two original texts, and then the Hamming distance between the two determined vector fingerprints can be calculated as the distance between the two original texts.

[0080] Specifically, similar text pairs can be extracted from the original text set based on the distance between different original texts in the original text set and a pre-set distance threshold. For example, for any two original texts in the original text set, if the Hamming distance between the two original texts is less than a set distance threshold (e.g., 3), then the two original texts are determined to be similar. In this case, the two original texts can be regarded as a similar text pair, and each original text in the two original texts can be regarded as a similar text.

[0081] S304: Determine the text to be removed from the similar text pair according to the text attention of each similar text in the similar text pair.

[0082] In this embodiment, the text attention of each similar text in a similar text pair can be used to represent the degree of user attention to the similar text. In one embodiment, for each similar text, the text attention of the similar text can be represented by the number of times the similar text has been viewed, liked, forwarded, or saved by users. In other words, the text attention of a similar text can include at least one of the number of views, likes, forwards, and saves of the similar text.

[0083] Furthermore, for each similar text pair extracted from the original text set, the similar text in the similar text pair with a low number of views can be used as the text to be eliminated; or, the similar text in the similar text pair with a low number of likes can be used as the text to be eliminated; or, the similar text in the similar text pair with a low number of forwardings can be used as the text to be eliminated, etc.

[0084] Furthermore, when the attention level of a text includes at least two of the following: number of views, number of likes, number of reposts, and number of favorites, the files to be removed can be determined based on a pre-set statistical formula or a pre-trained analysis model. For example, the number of views and number of likes for each similar text in a similar text pair can be input into a pre-trained analysis model, which then outputs a numerical value corresponding to each similar text. The similar text in the similar text pair with the lower numerical value is then selected as the text to be removed.

[0085] In another embodiment, for each similar text, the text attention of the similar text can be comprehensively evaluated based on the number of times the similar text has been viewed, liked, forwarded, or saved by users, as well as the time the similar text was created. For example, the number of views and likes of the similar text, as well as the time it was created and the number of times it has been modified, can be input into the attention determination model, which then outputs the text attention of the similar text. In this case, the text attention can be represented by a numerical value.

[0086] Furthermore, for each similar text pair extracted from the original text set, the similar text with low text attention in the similar text pair can be used as the text to be eliminated.

[0087] S306: Eliminate the texts to be eliminated from the original text set to obtain a candidate text set.

[0088] Specifically, after determining the text to be removed, the text to be removed can be removed from the original text set, and each remaining original text in the original text set can be used as a candidate text, and the collection of all candidate texts can be used as a candidate text set.

[0089] It can be understood that in this embodiment, the original text set is deduplicated by combining the distance between different original texts and the text attention. While ensuring that the final candidate text set has low duplicate data, it is ensured that the texts left in the original text set, that is, the candidate texts in the candidate text set, are the texts that most users pay more attention to, thereby making the search results extracted from the candidate text set more accurate and more in line with user needs.

[0090] In addition, it should be noted that in actual scenarios, there may be a situation where every original text in the original text set is used as a text to be eliminated. For example, the original text set includes three original texts A, B and C. Assume that the original texts A and B are a pair of similar text pairs, and based on the text attention of the original texts A and B, it is determined that the text to be eliminated is the original text A; the original texts B and C are also a pair of similar text pairs, and based on the text attention of the original texts B and C, it is determined that the text to be eliminated is the original text B; and the original texts A and C are also a pair of similar text pairs, and based on the text attention of the original texts A and C, it is determined that the text to be eliminated is the original text C.

[0091] To avoid this situation, this embodiment further optimizes S304, namely, the process of determining the texts to be removed. Optionally, based on the above embodiment, S304 can also be implemented as follows: clustering similar text pairs to obtain a similar text set; and determining the texts to be removed from the similar text set based on the text attention of each similar text in the similar text set.

[0092] Specifically, similar texts in similar text pairs with direct or indirect similarity are clustered, and each cluster is considered a similar text set. For each similar text set, all similar texts in the set, except for the similar text with the highest text attention, can be considered as texts to be removed. In other words, a similar text set refers to retaining one similar text. In other words, for the above situation, through clustering, the original texts A, B, and C can be grouped together as a similar text set. Then, based on the text attention of each similar text in the similar text set, the texts to be removed, such as A and C, are selected from the similar text set.

[0093] It is understandable that, by introducing the operation of clustering similar text pairs in this embodiment, it is possible to avoid the situation where there are no search results due to the candidate text set being empty after deduplication.

[0094] Figure 4 This is a flow chart of determining search results in one embodiment. Based on the above embodiment, this embodiment relates to an optional implementation method of how a server responds to a search statement input by a search requester and searches from a candidate text set to obtain search results for the search statement. Specifically, the steps may include:

[0095] S402: Expand the search statement to obtain similar statements to the search statement.

[0096] In this embodiment, the similar statements of the search statement are statements similar to the search statement. Optionally, the number of similar statements can be one or more.

[0097] In one possible implementation, the search statement can be segmented, and based on the segmentation results, the words in the search statement can be extracted; each extracted word can be synonymously expanded to obtain synonyms of each word; then, the synonyms of each word can be randomly combined according to the position of the word in the search statement to obtain similar statements to the search statement.

[0098] In another possible implementation, the search statement can be input into a similar statement generation model to obtain similar statements and a first similarity between the search statement and the similar statements. The similar statement generation model can be obtained by training a neural network model using training corpus; the training corpus includes sample statements and statements similar to the sample statements; further, the neural network model in this embodiment can be a SimBERTv2 model. The SimBERTv2 model is an upgraded version of SimBERT and can be pre-trained based on RoFormaer, UniLm, contrastive learning, BERT, and distillation technology. It can be understood that this embodiment introduces a similar statement generation model to generate similar statements to the search statement, which can ensure the accuracy and comprehensiveness of the generated similar statements.

[0099] S404: Search the candidate text set based on similar sentences to obtain a target text set of similar sentences.

[0100] Optionally, after similar sentences are determined, the similar sentences may be used as index words to search in a candidate text set, and a target text set of similar sentences may be determined based on the found candidate texts.

[0101] Furthermore, to improve search efficiency, an inverted index can be constructed in advance based on the candidate text set, and then a search can be performed based on the constructed inverted index. In one embodiment, the above-mentioned search from the candidate text set based on similar sentences to obtain the target text set of similar sentences can be specifically performed as follows: based on the similar sentences, a target keyword similar to the similar sentence is searched from a preset inverted index; wherein the inverted index includes the correspondence between each candidate keyword and the candidate text in the candidate text set, and the candidate keyword is extracted from the candidate text set; based on the target keyword, the candidate text corresponding to the target keyword is determined from the inverted index, and the target text set of similar sentences is determined based on the candidate text corresponding to the target keyword.

[0102] Specifically, after determining similar sentences, the similar sentences can be used as index words and searched from the inverted index, and the candidate keywords similar to the similar sentences in the inverted index can be used as target keywords for the similar sentences; then, the candidate texts corresponding to the target keywords of the similar sentences can be extracted from the inverted index, and the target text set of the similar sentences can be determined based on the candidate texts corresponding to the extracted target keywords.

[0103] S406: Determine the search results of the search statement based on the target text set of similar statements.

[0104] In one embodiment, after determining a target text set of similar sentences, for each target text in the target text set, the similarity between the target text and the similar sentence can be calculated. For example, the similarity between the target text and the similar sentence can be determined by calculating the Hamming distance between the target text and the similar sentence. The target texts in the target text set are then sorted in descending order based on the similarity between the similar sentence and each target text in the target text set, and the sorted target texts are used as search results for the search statement.

[0105] In another possible implementation, if the inverted index also includes a second similarity between the candidate keyword and the candidate text in which the candidate keyword is located, the third similarity between the similar statement and each target text in the target text set can be determined based on the first similarity between the search statement and the similar statement, and the second similarity between the target keyword and the target text corresponding to the target keyword in the target text set; based on the third similarity, the target texts in the target text set are sorted, and the sorted target texts are used as the search results of the search statement.

[0106] For any candidate keyword, the second similarity between the candidate keyword and the candidate text in which the candidate keyword is located can be represented by TF-IDF (Term Frequency–Inverse Document Frequency).

[0107] Specifically, for each target text in the target text set, the first similarity between the search statement and the similar statement corresponding to the target text set, and the second similarity between the target text and the target keyword indexed into the target text, can be processed according to a predetermined algorithm, such as by adding, multiplying, or dividing the two, and the result of the processing is used as the third similarity between the target text and the similar statement. Subsequently, the target texts in the target text set can be sorted in descending order based on the third similarity between the similar statement and each target text in the target text set, and the sorted target texts are used as the search results of the search statement.

[0108] Optionally, based on the first similarity between the search statement and the similar statement, and the second similarity between the target keyword and the target text corresponding to the target keyword in the target text set, determining the third similarity between the similar statement and each target text in the target text set can be: determining the third similarity based on the product of the first similarity and the second similarity.

[0109] It should be noted that the search results in this embodiment are obtained by sorting the target texts based on the third similarity, so it is convenient for users to quickly locate the required texts.

[0110] It can be understood that the method of determining search results provided by this embodiment is not limited to searching based on the search statement entered by the user, but can also search based on similar statements of the search statement, thereby increasing the flexibility of the search; at the same time, due to the introduction of similar statements for searching, the search results obtained can also be made more comprehensive.

[0111] For example, based on the above embodiment, the process of determining the search results can be further modified according to the number of similar sentences. Specifically, if the number of similar sentences is one, S402-S406 can be directly executed to determine the search results. Furthermore, if the number of similar sentences is at least two, the search sentence can be determined in the following two ways:

[0112] The first method is to determine the search order for each similar sentence; according to the search order, search the target text set of each similar sentence from the candidate text set in turn; wherein, in each search process, skip the target text of the similar sentence that has been searched in the candidate text set; then, determine the search result of the search sentence based on the target text set of each similar sentence.

[0113] Specifically, in this embodiment, each similar statement can be randomly sorted, and the random sorting result can be used as the search order. Alternatively, in this embodiment, the search order of each similar statement can be determined based on the first similarity between each similar statement and the search statement. For example, each similar statement can be sorted in descending order according to the first similarity to determine the search order of each similar statement.

[0114] Furthermore, after determining the search order for each similar sentence, the target text set for each similar sentence can be determined from the candidate text set in turn according to the search order. It should be noted that for each similar sentence, in the search process based on the similar sentence, the target texts of other similar sentences that have been searched in the candidate text set will be skipped. For example, the search sentence has two similar sentences, namely similar sentence 1 and similar sentence 2. Assuming that the search order is similar sentence 1 first and similar sentence 2 second, for similar sentence 1, the target text set of similar sentence 1 can be directly selected from the candidate text set. For similar sentence 2, the target text set of similar sentence 2 can be selected from other candidate texts in the candidate text set except the target text set of similar sentence 1.

[0115] After determining the target text set of each similar sentence, the search results of the search sentence can be determined by executing the above S406.

[0116] It can be understood that, in this embodiment, each candidate text in the candidate text set will not be searched repeatedly during the search process, thereby improving the search efficiency.

[0117] The second method is that, for each similar sentence, a target keyword similar to the similar sentence is searched from a preset inverted index, and the candidate text corresponding to the target keyword in the inverted index is used as the target text set of the similar sentence; then, based on the first similarity between the search sentence and the similar sentence, and the second similarity between the target keyword corresponding to the similar sentence and the target text corresponding to the target keyword in the target text set of the similar sentence, the third similarity between the similar sentence and each target text in the target text set of the similar sentence is determined.

[0118] Then, based on the third similarity, a fourth similarity is determined between the search statement and each target text in the target text set; based on the fourth similarity, each target text in the target text set is sorted, and the sorted target text is used as the search result of the search statement. Specifically, determining the fourth similarity between the search statement and each target text in the target text set based on the third similarity can be: performing an intersection operation on the target text set of each similar statement to obtain overlapping text and at least two similar statements corresponding to the overlapping text; for each overlapping text, the sum of the third similarities between the overlapping text and each similar statement corresponding to the overlapping text is used as the fourth similarity between the overlapping text and the search statement. For any other target text in the target text set of each similar statement other than the overlapping text, the third similarity between the other target text and the corresponding similar statement can be used as the fourth similarity between the other target text and the search statement.

[0119] For example, the search statement has two similar statements, namely similar statement 1 and similar statement 2; for similar statement 1, a search is performed from the candidate text set to obtain target text set 1 for similar statement 1, and similarly, target text set 2 for similar statement 2 can be obtained; assuming that target text set 1 includes target text a and target text b, and target text set 2 includes target text a and target text c.

[0120] At this time, the third similarity between similar statement 1 and target text a, and the third similarity between similar statement 2 and target text a, can be taken as the fourth similarity between target text a and the search statement; at the same time, the third similarity between similar statement 1 and target text b can be directly taken as the fourth similarity between target text b and the search statement, and the third similarity between similar statement 2 and target text d can be taken as the fourth similarity between target text d and the search statement.

[0121] After determining the fourth similarity between each target text and the search statement, the target texts may be sorted according to the fourth similarity, and the sorted target texts may be used as search results of the search statement.

[0122] It can be understood that in the process of determining the search results, this embodiment introduces the fourth similarity between the search statement and the target text through the third similarity between the similar statement and the target text, that is, further in-depth analysis of the target text is performed, so that the user can quickly locate the required text from the search results obtained after sorting the target texts based on the fourth similarity.

[0123] For example, based on the above embodiment, this embodiment takes the server as a server hosting the Elasticsearch search engine and the search scenario as a bank work order search scenario as an example, and provides an optional implementation process, combined with Figure 5 and Figure 6 , the process specifically includes the following steps:

[0124] S501 : extracting similar business work order text pairs from the original business work order text set based on the distances between different original business work order texts in the original business work order text set.

[0125] S502 , determining a to-be-removed business work order text from the similar business work order text pairs according to the text attention of each similar business work order text in the similar business work order text pairs, and removing the to-be-removed business work order text from the original business work order text set to obtain a candidate business work order text set.

[0126] In this embodiment, the original business work order text in the work order system database may be processed regularly, and the candidate business work order text in the search engine database may be dynamically updated based on the processing result of the original business work order text.

[0127] It should be noted that the execution process of the above S501-S502 corresponds to Figure 6 The logic of deduplication processing.

[0128] S503: Receive a search statement input by a search requester.

[0129] When a search demander has a search demand, the search demander enters a search statement on the search platform.

[0130] Optionally, the search platform can be presented to the search requester via an interface or voice. Optionally, the search platform can be integrated into a terminal or a server. If integrated into a terminal, upon receiving a search query entered by the search requester on the search platform, the terminal sends the search query to the server.

[0131] S504 , in response to the search statement, generating a model based on similar statements, expanding the search statement, and obtaining the searched similar statement and a first similarity between the search statement and the similar statement.

[0132] It should be noted that the execution process of the above S503-S504 corresponds to Figure 6 The logic for generating similar statements in .

[0133] S505: Based on the similar sentences, search for target keywords similar to the similar sentences from a preset inverted index.

[0134] The inverted index includes the correspondence between each candidate keyword and the candidate business work order text in the candidate business work order text set, and the candidate keywords are extracted from the candidate business work order text set.

[0135] S506 , determining candidate business work order texts corresponding to the target keyword from the inverted index according to the target keyword, and determining a target business work order text set of similar sentences based on the candidate business work order texts corresponding to the target keyword.

[0136] S507, determining a third similarity between the similar statement and each target business work order text in the target business work order text set based on the first similarity between the search statement and the similar statement, and the second similarity between the target keyword and the target business work order text corresponding to the target keyword in the target business work order text set.

[0137] Optionally, the third similarity may be determined according to the product of the first similarity and the second similarity.

[0138] S508 , sorting the target business work order texts in the target business work order text set according to the third similarity, and using the sorted target business work order texts as search results of the search statement.

[0139] Alternatively, the fourth similarity between the search statement and each target business work order text in the target business work order text set can be determined based on the third similarity; based on the fourth similarity, each target business work order text in the target business work order text set is sorted, and the sorted target business work order text is used as the search result of the search statement.

[0140] S509: Output the search results.

[0141] For example, the search results can be sent to a terminal held by the search demander and displayed, and the search demander can then view the search results on the terminal held by him.

[0142] It should be noted that the execution process of the above S505-S509 corresponds to Figure 6 The logic of the search.

[0143] The specific process of the above S501-S509 can be found in the description of the above method embodiment. The implementation principle and technical effects are similar and will not be repeated here.

[0144] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0145] Based on the same inventive concept, embodiments of the present application also provide a search device for implementing the aforementioned search method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more search device embodiments provided below can be found in the above-described limitations of the search method and will not be further elaborated here.

[0146] In one embodiment, Figure 7 As shown, a search device 700 is provided, which includes: a search module 710 and an output module 720, wherein:

[0147] Search module 710, configured to search candidate datasets in response to search information input by a search requester, and obtain search results for the search information; wherein the candidate datasets are obtained by deduplicating the original dataset based on the data attention of similar data pairs in the original dataset;

[0148] The output module 720 is used to output the search results.

[0149] In the above-described search device, by deduplicating the original dataset based on the data attention of similar data pairs in the original dataset, the amount of data redundancy in the candidate dataset can be reduced. Furthermore, searching within the candidate dataset can reduce the amount of data duplication in the search results, while also improving search efficiency. Furthermore, while controlling the number of displayed results, since the search results obtained using this solution are free of redundancy, the search results presented to the search requester can be more comprehensive.

[0150] In one embodiment, the search module 710 is specifically configured to:

[0151] In response to a search statement input by a search demander, a search is performed from a candidate text set to obtain search results for the search statement; wherein the candidate text set is obtained by deduplicating the original text set based on the text attention of similar text pairs in the original text set.

[0152] The search device 700 further includes a deduplication processing module 730 for performing deduplication processing on the original text set according to the text attention of similar text pairs in the original text set.

[0153] In one embodiment, the deduplication processing module 730 includes:

[0154] An extraction unit 731 is configured to extract similar text pairs from the original text set based on the distances between different original texts in the original text set;

[0155] A first determining unit 732 is configured to determine a text to be removed from a similar text pair based on the text attention of each similar text in the similar text pair;

[0156] The elimination unit 733 is used to eliminate the text to be eliminated from the original text set to obtain a candidate text set.

[0157] In one embodiment, the first determining unit 732 is specifically configured to:

[0158] Cluster similar text pairs to obtain similar text sets;

[0159] According to the text attention of each similar text in the similar text set, the text to be removed is determined from the similar text set.

[0160] Exemplarily, in one embodiment, the text attention of similar texts includes: the number of views and / or the number of likes of the similar texts.

[0161] In one embodiment, the search module 710 includes:

[0162] An expansion unit 711 is configured to expand the search statement to obtain similar statements to the search statement;

[0163] A search unit 712 is configured to search the candidate text set based on similar sentences to obtain a target text set of similar sentences;

[0164] The second determining unit 713 is configured to determine search results of the search sentence according to the target text set of similar sentences.

[0165] In one embodiment, the expansion unit 711 is specifically configured to:

[0166] The search sentence is input into the similar sentence generation model to obtain similar sentences and a first similarity between the search sentence and the similar sentences.

[0167] In one embodiment, the search unit 712 is specifically configured to:

[0168] Based on the similar sentences, searching for target keywords similar to the similar sentences from a preset inverted index; wherein the inverted index includes a correspondence between each candidate keyword and a candidate text in a candidate text set, and the candidate keywords are extracted from the candidate text set;

[0169] According to the target keyword, candidate texts corresponding to the target keyword are determined from the inverted index, and a target text set of similar sentences is determined based on the candidate texts corresponding to the target keyword.

[0170] In one embodiment, the second determining unit 713 may include:

[0171] a first determining subunit, configured to determine a third similarity between the similar sentence and each target text in the target text set based on a first similarity between the search sentence and the similar sentence, and a second similarity between the target keyword and the target text corresponding to the target keyword in the target text set;

[0172] The second determining subunit is configured to sort the target texts in the target text set according to the third similarity, and use the sorted target texts as search results of the search statement.

[0173] In one embodiment, the second determining subunit is specifically configured to:

[0174] determining a fourth similarity between the search statement and each target text in the target text set based on the third similarity;

[0175] According to the fourth similarity, each target text in the target text set is sorted, and the sorted target text is used as the search result of the search statement.

[0176] In one embodiment, the first determining subunit is specifically configured to:

[0177] A third similarity is determined according to the product of the first similarity and the second similarity.

[0178] In one embodiment, if the number of similar sentences is at least two, the search unit 712 is further specifically configured to:

[0179] Determine the search order for similar statements;

[0180] According to the search order, the target text set of each similar sentence is searched from the candidate text set in turn; wherein, in each search process, the target text of the similar sentence that has been searched in the candidate text set is skipped.

[0181] In one embodiment, the candidate text in the candidate text set is a business work order text.

[0182] Each module in the above-mentioned search device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0183] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store a deduplicated candidate data set. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a search method is implemented.

[0184] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0185] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0186] In response to the search information input by the search demander, a search is performed in the candidate data set to obtain search results of the search information; wherein the candidate data set is obtained by deduplicating the original data set based on the data attention of similar data pairs in the original data set;

[0187] Output search results.

[0188] In one embodiment, when a processor executes logic in a computer program to search from a candidate data set in response to search information input by a search requester and obtain search results for the search information, the processor may specifically implement the following steps:

[0189] In response to a search statement input by a search demander, a search is performed from a candidate text set to obtain search results for the search statement; wherein the candidate text set is obtained by deduplicating the original text set based on the text attention of similar text pairs in the original text set.

[0190] In one embodiment, when executing logic in a computer program for performing deduplication processing on an original text set based on the text attention of similar text pairs in the original text set, the processor specifically implements the following steps:

[0191] Similar text pairs are extracted from the original text set according to the distances between different original texts in the original text set; texts to be removed are determined from the similar text pairs according to the text attention of each similar text in the similar text pairs; the texts to be removed are removed from the original text set to obtain a candidate text set.

[0192] In one embodiment, when a processor executes logic in a computer program for determining texts to be removed from similar text pairs based on the text attention of each similar text in the similar text pair, the processor may specifically implement the following steps:

[0193] Similar text pairs are clustered to obtain a similar text set; and texts to be removed are determined from the similar text set based on the text attention of each similar text in the similar text set.

[0194] In one embodiment, when the processor executes the computer program, the text attention of the similar text involved includes: the number of views and / or the number of likes of the similar text.

[0195] In one embodiment, when executing the logic of a computer program that searches a candidate text set in response to a search statement input by a search requester and obtains search results for the search statement, the processor specifically implements the following steps:

[0196] The search statement is expanded to obtain similar statements of the search statement; based on the similar statements, a search is performed from a candidate text set to obtain a target text set of the similar statements; and based on the target text set of the similar statements, a search result of the search statement is determined.

[0197] In one embodiment, when a processor executes a computer program to expand a search statement and obtain logic for similar statements to the search statement, the processor specifically implements the following steps:

[0198] The search sentence is input into the similar sentence generation model to obtain similar sentences and a first similarity between the search sentence and the similar sentences.

[0199] In one embodiment, when executing the logic of a computer program to search a candidate text set based on similar sentences to obtain a target text set of similar sentences, the processor specifically implements the following steps:

[0200] Based on similar sentences, target keywords similar to the similar sentences are searched from a preset inverted index; wherein the inverted index includes a correspondence between each candidate keyword and a candidate text in a candidate text set, and the candidate keywords are extracted from the candidate text set; based on the target keyword, the candidate text corresponding to the target keyword is determined from the inverted index, and the target text set of similar sentences is determined based on the candidate text corresponding to the target keyword.

[0201] In one embodiment, when executing the logic of a computer program for determining search results for a search statement based on a target text set of similar statements, the processor specifically implements the following steps:

[0202] Based on the first similarity between the search statement and the similar statement, and the second similarity between the target keyword and the target text corresponding to the target keyword in the target text set, a third similarity between the similar statement and each target text in the target text set is determined; based on the third similarity, each target text in the target text set is sorted, and the sorted target text is used as the search result of the search statement.

[0203] In one embodiment, when the processor executes the logic of sorting target texts in the target text set according to the third similarity in the computer program and using the sorted target texts as search results of the search statement, the processor may further implement the following steps:

[0204] According to the third similarity, a fourth similarity between the search statement and each target text in the target text set is determined; according to the fourth similarity, each target text in the target text set is sorted, and the sorted target text is used as the search result of the search statement.

[0205] In one embodiment, when the processor executes the computer program to determine the logic of third similarities between similar sentences and each target text in the target text set based on the first similarity between the search sentence and the similar sentence, and the second similarity between the target keyword and the target text corresponding to the target keyword in the target text set, the processor may further implement the following steps:

[0206] A third similarity is determined according to the product of the first similarity and the second similarity.

[0207] In one embodiment, if the number of similar sentences is at least two, when the processor executes the logic of searching the candidate text set based on the similar sentences in the computer program to obtain the target text set of similar sentences, the following steps may be specifically implemented:

[0208] Determine the search order for each similar sentence; search the target text set for each similar sentence from the candidate text set in sequence according to the search order; wherein, in each search process, skip the target text of the similar sentence that has been searched in the candidate text set.

[0209] In one embodiment, when the processor executes the computer program, the candidate text in the candidate text set involved is a business work order text.

[0210] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0211] In response to the search information input by the search demander, a search is performed in the candidate data set to obtain search results of the search information; wherein the candidate data set is obtained by deduplicating the original data set based on the data attention of similar data pairs in the original data set;

[0212] Output search results.

[0213] In one embodiment, when a processor executes logic in a computer program to search from a candidate data set in response to search information input by a search requester and obtain search results for the search information, the processor may specifically implement the following steps:

[0214] In response to a search statement input by a search demander, a search is performed from a candidate text set to obtain search results for the search statement; wherein the candidate text set is obtained by deduplicating the original text set based on the text attention of similar text pairs in the original text set.

[0215] In one embodiment, when executing logic in a computer program for performing deduplication processing on an original text set based on the text attention of similar text pairs in the original text set, the processor specifically implements the following steps:

[0216] Similar text pairs are extracted from the original text set according to the distances between different original texts in the original text set; texts to be removed are determined from the similar text pairs according to the text attention of each similar text in the similar text pairs; the texts to be removed are removed from the original text set to obtain a candidate text set.

[0217] In one embodiment, when a processor executes logic in a computer program for determining texts to be removed from similar text pairs based on the text attention of each similar text in the similar text pair, the processor may specifically implement the following steps:

[0218] Similar text pairs are clustered to obtain a similar text set; and texts to be removed are determined from the similar text set based on the text attention of each similar text in the similar text set.

[0219] In one embodiment, when the processor executes the computer program, the text attention of the similar text involved includes: the number of views and / or the number of likes of the similar text.

[0220] In one embodiment, when executing the logic of a computer program that searches a candidate text set in response to a search statement input by a search requester and obtains search results for the search statement, the processor specifically implements the following steps:

[0221] The search statement is expanded to obtain similar statements of the search statement; based on the similar statements, a search is performed from a candidate text set to obtain a target text set of the similar statements; and based on the target text set of the similar statements, a search result of the search statement is determined.

[0222] In one embodiment, when a processor executes a computer program to expand a search statement and obtain logic for similar statements to the search statement, the processor specifically implements the following steps:

[0223] The search sentence is input into the similar sentence generation model to obtain similar sentences and a first similarity between the search sentence and the similar sentences.

[0224] In one embodiment, when executing the logic of a computer program to search a candidate text set based on similar sentences to obtain a target text set of similar sentences, the processor specifically implements the following steps:

[0225] Based on similar sentences, target keywords similar to the similar sentences are searched from a preset inverted index; wherein the inverted index includes a correspondence between each candidate keyword and a candidate text in a candidate text set, and the candidate keywords are extracted from the candidate text set; based on the target keyword, the candidate text corresponding to the target keyword is determined from the inverted index, and the target text set of similar sentences is determined based on the candidate text corresponding to the target keyword.

[0226] In one embodiment, when executing the logic of a computer program for determining search results for a search statement based on a target text set of similar statements, the processor specifically implements the following steps:

[0227] Based on the first similarity between the search statement and the similar statement, and the second similarity between the target keyword and the target text corresponding to the target keyword in the target text set, a third similarity between the similar statement and each target text in the target text set is determined; based on the third similarity, each target text in the target text set is sorted, and the sorted target text is used as the search result of the search statement.

[0228] In one embodiment, when the processor executes the logic of sorting target texts in the target text set according to the third similarity in the computer program and using the sorted target texts as search results of the search statement, the processor may further implement the following steps:

[0229] According to the third similarity, a fourth similarity between the search statement and each target text in the target text set is determined; according to the fourth similarity, each target text in the target text set is sorted, and the sorted target text is used as the search result of the search statement.

[0230] In one embodiment, when the processor executes the computer program, the logic for determining a third similarity between the similar statement and each target text in the target text set based on the first similarity between the search statement and the similar statement, and the second similarity between the target keyword and the target text corresponding to the target keyword in the target text set, may further specifically implement the following steps:

[0231] A third similarity is determined according to the product of the first similarity and the second similarity.

[0232] In one embodiment, if the number of similar sentences is at least two, the processor may further implement the following steps when executing the logic of searching the candidate text set based on the similar sentences in the computer program to obtain the target text set of similar sentences:

[0233] Determine the search order for each similar sentence; search the target text set for each similar sentence from the candidate text set in sequence according to the search order; wherein, in each search process, skip the target text of the similar sentence that has been searched in the candidate text set.

[0234] In one embodiment, when the processor executes the computer program, the candidate text in the candidate text set involved is a business work order text.

[0235] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0236] In response to the search information input by the search demander, a search is performed in the candidate data set to obtain search results of the search information; wherein the candidate data set is obtained by deduplicating the original data set based on the data attention of similar data pairs in the original data set;

[0237] Output search results.

[0238] In one embodiment, when a processor executes logic in a computer program to search from a candidate data set in response to search information input by a search requester and obtain search results for the search information, the processor may specifically implement the following steps:

[0239] In response to a search statement input by a search demander, a search is performed from a candidate text set to obtain search results for the search statement; wherein the candidate text set is obtained by deduplicating the original text set based on the text attention of similar text pairs in the original text set.

[0240] In one embodiment, when executing logic in a computer program for performing deduplication processing on an original text set based on the text attention of similar text pairs in the original text set, the processor specifically implements the following steps:

[0241] Similar text pairs are extracted from the original text set according to the distances between different original texts in the original text set; texts to be removed are determined from the similar text pairs according to the text attention of each similar text in the similar text pairs; the texts to be removed are removed from the original text set to obtain a candidate text set.

[0242] In one embodiment, when a processor executes logic in a computer program for determining texts to be removed from similar text pairs based on the text attention of each similar text in the similar text pair, the processor may specifically implement the following steps:

[0243] Similar text pairs are clustered to obtain a similar text set; and texts to be removed are determined from the similar text set based on the text attention of each similar text in the similar text set.

[0244] In one embodiment, when the processor executes the computer program, the text attention of the similar text involved includes: the number of views and / or the number of likes of the similar text.

[0245] In one embodiment, when executing the logic of a computer program that searches a candidate text set in response to a search statement input by a search requester and obtains search results for the search statement, the processor specifically implements the following steps:

[0246] The search statement is expanded to obtain similar statements of the search statement; based on the similar statements, a search is performed from a candidate text set to obtain a target text set of the similar statements; and based on the target text set of the similar statements, a search result of the search statement is determined.

[0247] In one embodiment, when a processor executes a computer program to expand a search statement and obtain logic for similar statements to the search statement, the processor specifically implements the following steps:

[0248] The search sentence is input into the similar sentence generation model to obtain similar sentences and a first similarity between the search sentence and the similar sentences.

[0249] In one embodiment, when executing the logic of a computer program to search a candidate text set based on similar sentences to obtain a target text set of similar sentences, the processor specifically implements the following steps:

[0250] Based on similar sentences, target keywords similar to the similar sentences are searched from a preset inverted index; wherein the inverted index includes a correspondence between each candidate keyword and a candidate text in a candidate text set, and the candidate keywords are extracted from the candidate text set; based on the target keyword, the candidate text corresponding to the target keyword is determined from the inverted index, and the target text set of similar sentences is determined based on the candidate text corresponding to the target keyword.

[0251] In one embodiment, when executing the logic of a computer program for determining search results for a search statement based on a target text set of similar statements, the processor specifically implements the following steps:

[0252] Based on the first similarity between the search statement and the similar statement, and the second similarity between the target keyword and the target text corresponding to the target keyword in the target text set, a third similarity between the similar statement and each target text in the target text set is determined; based on the third similarity, each target text in the target text set is sorted, and the sorted target text is used as the search result of the search statement.

[0253] In one embodiment, when the processor executes the logic of sorting target texts in the target text set according to the third similarity in the computer program and using the sorted target texts as search results of the search statement, the processor may further implement the following steps:

[0254] According to the third similarity, a fourth similarity between the search statement and each target text in the target text set is determined; according to the fourth similarity, each target text in the target text set is sorted, and the sorted target text is used as the search result of the search statement.

[0255] In one embodiment, when the processor executes the computer program to determine the logic of third similarities between similar sentences and each target text in the target text set based on the first similarity between the search sentence and the similar sentence, and the second similarity between the target keyword and the target text corresponding to the target keyword in the target text set, the processor may further implement the following steps:

[0256] A third similarity is determined according to the product of the first similarity and the second similarity.

[0257] In one embodiment, if the number of similar sentences is at least two, when the processor executes the logic of searching the candidate text set based on the similar sentences in the computer program to obtain the target text set of similar sentences, the following steps may be specifically implemented:

[0258] Determine the search order for each similar sentence; search the target text set for each similar sentence from the candidate text set in sequence according to the search order; wherein, in each search process, skip the target text of the similar sentence that has been searched in the candidate text set.

[0259] In one embodiment, when the processor executes the computer program, the candidate text in the candidate text set involved is a business work order text.

[0260] It should be noted that the search information involved in this application is information authorized by the user or fully authorized by all parties. Furthermore, the database involved in this application (i.e., the database including the candidate data set, such as the candidate business work order text set) is a database authorized by the bank and does not involve user privacy.

[0261] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0262] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0263] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A search method, characterized in that: The method comprises: In response to a search statement input by a search demander, a search is performed from a candidate text set to obtain search results for the search statement; wherein, the candidate text set extracts similar text pairs from the original text set based on the distances between different original texts in the original text set; based on the text attention of each similar text in the similar text pairs, texts to be eliminated are determined from the similar text pairs; the similar text pairs are clustered to obtain a similar text set; based on the text attention of each similar text in the similar text set, the texts to be eliminated are determined from the similar text set; the texts to be eliminated are eliminated from the original text set to obtain the candidate text set, wherein the text attention of the similar texts includes: the number of views and / or the number of likes of the similar texts, which is obtained after deduplication processing of the original text set; The search results are output.

2. The method according to claim 1, characterized in that The step of searching the candidate text set in response to the search statement input by the search demander to obtain search results for the search statement includes: Expanding the search statement to obtain similar statements to the search statement; Searching the candidate text set based on the similar sentences to obtain a target text set of the similar sentences; The search results of the search sentence are determined according to the target text set of similar sentences.

3. The method according to claim 2, characterized in that The step of expanding the search statement to obtain similar statements to the search statement includes: The search sentence is input into a similar sentence generation model to obtain the similar sentence and a first similarity between the search sentence and the similar sentence.

4. The method according to claim 2 or 3, characterized in that The step of searching the candidate text set based on the similar sentences to obtain a target text set of the similar sentences includes: According to the similar sentence, searching for target keywords similar to the similar sentence from a preset inverted index; wherein the inverted index includes a correspondence between each candidate keyword and a candidate text in the candidate text set, and the candidate keyword is extracted from the candidate text set; According to the target keyword, candidate texts corresponding to the target keyword are determined from the inverted index, and a target text set of similar sentences is determined based on the candidate texts corresponding to the target keyword.

5. The method according to claim 4, characterized in that Determining the search results of the search statement based on the target text set of similar statements includes: determining a third similarity between the similar sentence and each target text in the target text set based on a first similarity between the search sentence and the similar sentence, and a second similarity between the target keyword and a target text corresponding to the target keyword in the target text set; According to the third similarity, each target text in the target text set is sorted, and the sorted target text is used as the search result of the search statement.

6. The method according to claim 5, characterized in that Sorting the target texts in the target text set according to the third similarity, and using the sorted target texts as search results of the search statement, includes: determining, based on the third similarity, a fourth similarity between the search statement and each target text in the target text set; According to the fourth similarity, each target text in the target text set is sorted, and the sorted target text is used as the search result of the search statement.

7. The method according to claim 5, characterized in that Determining a third similarity between the similar statement and each target text in the target text set based on the first similarity between the search statement and the similar statement, and the second similarity between the target keyword and the target text corresponding to the target keyword in the target text set, includes: The third similarity is determined according to the product of the first similarity and the second similarity.

8. The method according to claim 2, characterized in that If the number of the similar sentences is at least two, searching from the candidate text set based on the similar sentences to obtain a target text set of the similar sentences includes: Determine the search order for similar statements; According to the search order, the target text sets of the similar sentences are searched in sequence from the candidate text set; wherein, in each search process, the target texts of the similar sentences that have been searched in the candidate text set are skipped.

9. The method according to claim 1, characterized in that The candidate texts in the candidate text set are business work order texts.

10. A search device, characterized in that: The device comprises: A search module is configured to, in response to a search statement input by a search demander, search from a candidate text set to obtain search results for the search statement; wherein the candidate text set extracts similar text pairs from the original text set based on the distances between different original texts in the original text set; determines texts to be eliminated from the similar text pairs based on the text attention of each similar text in the similar text pairs; clusters the similar text pairs to obtain a similar text set; determines texts to be eliminated from the similar text set based on the text attention of each similar text in the similar text set; eliminates the texts to be eliminated from the original text set to obtain the candidate text set, wherein the text attention of the similar texts includes: the number of views and / or the number of likes of the similar texts, which is obtained after deduplication processing of the original text set; An output module is used to output the search results.

11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

13. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Data retrieval method and device, electronic equipment, storage medium and computer product

    CN113590898A