An information retrieval method and related device

By filtering and sorting candidate texts, combining labels and content similarity, the problem of accurately retrieving matching texts from a large number of texts in information retrieval is solved, achieving more efficient and accurate information retrieval.

CN119760089APending Publication Date: 2025-04-04BEIJING SHANGYIN MICRO CORE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411896300.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In the field of information retrieval, how to accurately retrieve the text that best matches user needs from a large number of texts is an urgent problem.

Method used

By obtaining the attribute information of the text to be retrieved, filter out the matching candidate text and determine its label data. Then, the label similarity and content similarity between the candidate text and the text to be retrieved are calculated, and the candidate text is sorted based on these similarities to obtain the search results.

Benefits of technology

This method can effectively eliminate irrelevant texts, improve retrieval accuracy and efficiency, and improve the comprehensiveness and accuracy of information retrieval by taking into account the similarity between text labels and contents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760089A_ABST
    Figure CN119760089A_ABST
Patent Text Reader

Abstract

The present application provides an information retrieval method and related devices, and relates to the field of information retrieval. In the present application, for the text to be retrieved, firstly, the candidate texts matching the attribute information of the text to be retrieved are screened out, and irrelevant texts are eliminated to avoid the interference of irrelevant texts, thereby improving the accuracy and efficiency of retrieval. Furthermore, the candidate texts are sorted based on label similarity and content similarity, that is, when comparing texts, the similarity of text labels and text contents is considered at the same time, so that the factors considered when comparing similarity are more comprehensive, further improving the accuracy of information retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information retrieval, and more specifically, to an information retrieval method and related devices. Background Art

[0002] Information Retrieval (IR) refers to the process of organizing and storing information, finding information that matches user needs through certain technical means and algorithms based on user query requirements, and presenting it to users in an appropriate form.

[0003] In actual scenarios, there are many retrieval requirements in the field of information retrieval, such as users wanting to filter out the text that is most relevant to the uploaded text. So how to accurately retrieve the required text from a large amount of text is a technical problem that technicians in this field need to solve urgently. Summary of the invention

[0004] In view of this, the present application provides an information retrieval method and related devices to solve the problem of accurately retrieving required text from a large amount of text.

[0005] In order to solve the above technical problems, this application adopts the following technical solutions:

[0006] An information retrieval method, comprising:

[0007] Acquire the text to be searched, and filter out candidate texts that match the attribute information of the text to be searched;

[0008] Determining label data of the text to be retrieved; the label data represents key information of the text to be retrieved;

[0009] Calculating the label similarity between the label data of the candidate text and the label data of the text to be retrieved, and calculating the content similarity between the candidate text and the text to be retrieved;

[0010] The candidate texts are sorted based on the tag similarity and the content similarity to obtain a search result of the text to be searched.

[0011] Optionally, the attribute information includes at least one of a text type, an organization, and a business scenario;

[0012] Screening out candidate texts that match the attribute information of the text to be retrieved includes:

[0013] Filtering out a target text set having the same attribute information as the text to be retrieved from a database; storing each text set in the database respectively according to the attribute information;

[0014] The texts in the target text set are taken as candidate texts.

[0015] Optionally, determining the tag data of the text to be retrieved includes:

[0016] Acquire a tag library; the tag library stores a plurality of tags and a method for determining the tags;

[0017] According to the label determination method, label data of the corresponding label is extracted from the content of the text to be retrieved.

[0018] Optionally, calculating the label similarity between the label data of the candidate text and the label data of the text to be retrieved includes:

[0019] Determining that the similarity of a first candidate text is a specific similarity, wherein the first candidate text is a candidate text whose label data is completely the same as the label data of the text to be retrieved;

[0020] Determine the similarity of the second candidate text based on the different contents of the label data of the second candidate text and the label data of the text to be retrieved; the second candidate text is a candidate text whose label data includes the label data of the text to be retrieved;

[0021] The similarity of the third candidate text is determined based on the overlap between the label data of the third candidate text and the label data of the text to be retrieved; the third candidate text is other candidate text among the candidate texts except the first candidate text and the second candidate text.

[0022] Optionally, calculating the content similarity between the candidate text and the text to be retrieved includes:

[0023] Performing a word segmentation operation on the candidate text to obtain a first word segmentation result, and performing a word segmentation operation on the text to be searched to obtain a second word segmentation result;

[0024] The similarity between the first word segmentation result and the second word segmentation result is calculated, and the similarity is used as the content similarity.

[0025] Optionally, the candidate texts are sorted based on the tag similarity and the content similarity to obtain a search result of the text to be searched, including:

[0026] The candidate texts are sorted according to the tag similarity; wherein, during the sorting process, if there are multiple candidate texts with the same tag similarity, the multiple candidate texts with the same tag similarity are sorted according to the content similarity.

[0027] Optionally, after the candidate texts are sorted based on the tag similarity and the content similarity to obtain the search result of the text to be searched, the method further includes:

[0028] For the candidate text in the search result, the difference between the candidate text and the text to be searched is determined, and the difference is marked in the candidate text and the text to be searched respectively.

[0029] An information retrieval device, comprising:

[0030] A text screening module is used to obtain the text to be searched and screen out candidate texts that match the attribute information of the text to be searched;

[0031] A label determination module, used to determine label data of the text to be retrieved; the label data represents key information of the text to be retrieved;

[0032] A similarity calculation module, used to calculate the label similarity between the label data of the candidate text and the label data of the text to be retrieved, and to calculate the content similarity between the candidate text and the text to be retrieved;

[0033] The sorting module is used to sort the candidate texts based on the tag similarity and the content similarity to obtain the search result of the text to be searched.

[0034] An electronic device comprises at least one processor and a memory connected to the processor, wherein:

[0035] The memory is used to store computer programs;

[0036] The processor is used to execute the computer program so that the electronic device can implement the above-mentioned information retrieval method.

[0037] A computer storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the above-mentioned information retrieval method.

[0038] The present application provides an information retrieval method and related devices. In the present application, for the text to be retrieved, firstly, candidate texts matching the attribute information of the text to be retrieved are screened out, and irrelevant texts are eliminated to avoid interference from irrelevant texts, thereby improving the accuracy and efficiency of retrieval. Furthermore, the candidate texts are sorted based on label similarity and content similarity, that is, when comparing texts, the similarity of text labels and text contents is considered at the same time, so that the factors considered when comparing similarity are more comprehensive, further improving the accuracy of information retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0040] Figure 1 A flowchart of an information retrieval method provided by an embodiment of the present invention;

[0041] Figure 2 A flowchart of a tag data determination method provided by an embodiment of the present invention;

[0042] Figure 3 A flowchart of a similarity calculation method provided by an embodiment of the present invention;

[0043] Figure 4 A schematic diagram of the structure of an information retrieval device provided by an embodiment of the present invention;

[0044] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0046] Information retrieval refers to the process of organizing and storing information, finding information that matches user needs through certain technical means and algorithms based on user query requirements, and presenting it to users in an appropriate form.

[0047] In actual scenarios, there are many retrieval needs in the field of information retrieval, such as users wanting to filter out the text that is most relevant to the uploaded text. In response to this retrieval need, people usually filter out relevant texts based on their own experience. In this case, the accuracy and efficiency of the screening method are low, and it cannot meet the user's efficient and accurate comparison needs.

[0048] To this end, in the embodiment of the present invention, for the text to be retrieved, firstly, the candidate texts matching the attribute information of the text to be retrieved are screened out, and irrelevant texts are eliminated to avoid interference from irrelevant texts, thereby improving the accuracy and efficiency of retrieval. Furthermore, the candidate texts are sorted based on label similarity and content similarity, that is, when comparing texts, the similarity of text labels and text contents is considered at the same time, so that the factors considered when comparing similarity are more comprehensive, further improving the accuracy of information retrieval.

[0049] Based on the above content, an embodiment of the present invention provides an information retrieval method, and the execution subject may be an information retrieval device such as a processor or a controller. The information retrieval method in the present invention can be applied in scenarios such as contract review and academic research that require frequent comparison of document contents.

[0050] Reference Figure 1 , an information retrieval method may include:

[0051] S11, obtaining a text to be searched, and screening out candidate texts that match the attribute information of the text to be searched.

[0052] The text to be searched is the text uploaded by the user using the text upload method configured by the platform, and the text is called the text to be searched. In one implementation, the text to be searched can be in word format or other formats.

[0053] It should be noted that, in order to better perform information retrieval, when a user uploads a text, the user is also required to select attribute information of the text. In one implementation, the attribute information includes at least one of the text type, the organization to which it belongs, and the business scenario.

[0054] Among them, the text type refers to the file type to which the text belongs, which may include guarantee letter format documents, cooperation confirmation letters, bidding contracts and other types; the affiliated institution refers to the information of the institution to which the text belongs, which may include specific institutions, specific enterprises and other types; the business scenario refers to the business type described in the text, including user application, payment, contract signing and other scenarios. Through the text type, affiliated institution and business scenario, the scope of screening can be located to ensure that the system accurately matches the candidate text related to the uploaded text.

[0055] In one implementation, the text type has a higher priority than the affiliated institution and business type. Therefore, for a text to be retrieved, the user must select the text type corresponding to the text, but does not need to select the affiliated institution and business scenario. For example, if the attribute information of a text uploaded by the user is: the text type is the guarantee letter format, and there is no affiliated institution and business scenario, the attribute information of the text can also be: the text type is the guarantee letter format, the affiliated institution is the enterprise, and the business scenario is the user application.

[0056] In one implementation, in order to meet the actual retrieval needs, a large number of texts need to be pre-configured, and the texts can involve various fields used by users to provide a basis for subsequent file comparison. Therefore, in an embodiment of the present invention, multiple texts (also referred to as text templates) for information retrieval are pre-configured in the database, and these texts need to be configured into different text sets according to attribute information. Among them, the attribute information in the same text set is the same, and the attribute information of different text sets is different. Among them, there are multiple implementations of different attribute information, including different text types, the same text type and different affiliated institutions, the same text type and different business scenarios, the same text type and the same affiliated institutions and different business scenarios, the same text type and the same affiliated institutions and the same business scenarios, and the same text type and the same affiliated institutions and the same business scenarios. For example, in a scenario, each text has both a text type and a business scenario. At this time, text sets of different text types can be stored in different folders, and then for the texts in each folder, subfolders can be established according to the business scenario, and the texts corresponding to the same business scenario are stored in the same subfolder, and the texts of different business scenarios are stored in different subfolders. In this way, multiple text sets can be constructed, and the texts in each folder and each subfolder are a file set.

[0057] In another scenario, for texts that are not configured with corresponding business scenarios, it is indicated that the texts can be applied to any scenario, and in this case, the text sets are stored separately only by text type. When storing, text sets of different text types can be stored in different folders, and texts that are not configured with corresponding business scenarios can be stored in a separate subfolder under the folder of the corresponding text type, or directly stored in the folder of the corresponding text type.

[0058] In another scenario, for texts with different text types, organizations, and business scenarios, you can first classify and store them by text type. Store texts of the same text type in the same folder. For the texts in each folder, you can further classify them by organization. Texts of the same organization are in the same subfolder. For each subfolder, continue to classify them using the business scenario, create the next level of subfolders, and store texts of the same business scenario in the same subfolder. The classification and storage process for other scenarios is similar. Among them, the texts under each folder and subfolder can be a text collection.

[0059] As can be seen from the above, for multiple texts pre-configured in the database, they are stored separately according to the attribute information to obtain multiple text sets, that is, each text set in the database is stored separately according to the attribute information.

[0060] In one implementation, the text to be retrieved uploaded by the user is configured with attribute information, and the text collection in the database used for information retrieval is also configured with attribute information. Therefore, an intelligent algorithm can be used to screen out a target text collection with the same attribute information as the text to be retrieved from the database, ensuring the accuracy and efficiency of text matching.

[0061] For example, if the attribute information of the text to be retrieved is: the text type is a guarantee format document and the business scenario is user application, then a text set whose text type is a guarantee format document and the business scenario is user application is screened out from the database. In another example, if the attribute information of the text to be retrieved is: the text type is a guarantee format document, then all text sets whose text type is a guarantee format document and whose business scenario is not limited in the database are screened out, and the screened text set is the target text set.

[0062] After the target text set is screened, the text in the target text set is used as a candidate text, and the candidate text is matched with the attribute information of the text to be retrieved. Specifically, the match means that the attribute information is the same.

[0063] S12: Determine the tag data of the text to be retrieved.

[0064] The tag data represents the key information of the text to be retrieved.

[0065] In actual scenarios, backend personnel can configure tags that are frequently used and represent key content of the text according to actual needs, so as to quickly locate and analyze the text content during text comparison and improve retrieval efficiency. All tags form a library, which stores multiple tags and the method of determining the tags.

[0066] Among them, the label can be a label indicating the key content of the text, such as bidding method, whether to include the fifth clause, format type, etc. The label can be a single keyword label or multiple keyword labels. For example, if a label is a delivery method, then the label is a single keyword label. For example, if a label is whether to be a guarantor and whether to be a guaranteed party, then whether to be a guarantor and whether to be a guaranteed party are two keywords, and the label includes labels for the two keywords.

[0067] The method of determining a label refers to the method of analyzing the label data of the label from the text. For example, taking the label as the format type, it can be analyzed whether the text contains independence, subordination and other contents. If it contains independence, the guarantee format is independent, and if it contains subordination, the guarantee format is subordination. Similarly, for other labels, the determination process is similar.

[0068] After the label and the method for determining the label are known, the label data of the text to be retrieved can be determined.

[0069] In one implementation, referring to Figure 2 , determining the tag data of the text to be retrieved may include:

[0070] S21. Obtain a tag library.

[0071] The tag library stores a plurality of tags and methods for determining the tags. For the specific implementation process of the tag library, please refer to the above corresponding description.

[0072] S22: extracting label data of corresponding labels from the content of the text to be searched according to the label determination method.

[0073] Specifically, for each tag, since the determination method of the tag is configured, corresponding data can be extracted from the content of the text to be retrieved according to the determination method of the tag, and the data can be analyzed to obtain tag data.

[0074] S13, calculating the label similarity between the label data of the candidate text and the label data of the text to be retrieved, and calculating the content similarity between the candidate text and the text to be retrieved.

[0075] In the implementation of the present invention, after the candidate texts and the texts to be retrieved are determined, similarity analysis is performed from two perspectives: label similarity and text similarity, so as to retrieve the candidate texts with higher relevance.

[0076] It should be noted that, for each candidate text, its label similarity and text similarity with the text to be retrieved need to be calculated.

[0077] For label similarity, if the value of label similarity is larger, it means that the similarity between the candidate text and the text to be retrieved is higher. Similarly, for text similarity, if the value of text similarity is larger, it means that the similarity between the candidate text and the text to be retrieved is higher.

[0078] S14. Sort the candidate texts based on the tag similarity and the content similarity to obtain a search result of the text to be searched.

[0079] In this embodiment, for each candidate text, after determining its tag similarity and text similarity with the text to be retrieved, the candidate texts may be sorted using the tag similarity and the content similarity, thereby obtaining a search result for the text to be retrieved.

[0080] In one implementation, the candidate texts are sorted according to the tag similarity; wherein, during the sorting process, if there are multiple candidate texts with the same tag similarity, the multiple candidate texts with the same tag similarity are sorted according to the content similarity.

[0081] Specifically, when the candidate texts are sorted based on the tag similarity and the content similarity, since the text tag can represent the key information of the text, that is, represents the important content in the text, if the tag similarity is used first to sort, candidate texts with similar key information can be screened out.

[0082] In a special scenario, there are multiple candidate texts with the same tag similarity. In this case, these candidate texts can be sorted using content similarity.

[0083] That is, for the candidate texts in the embodiment of the present invention, the tag similarity sorting is preferentially used, and when there are candidate texts with the same tag similarity, the content similarity sorting is used for these candidate texts.

[0084] In another implementation, the tag similarity and the text similarity may be weighted and summed to obtain a total similarity, and then the candidate texts may be sorted according to the total similarity.

[0085] In another implementation, the candidate texts may be sorted using only one of the tag similarity and the text similarity. For example, the candidate texts may be sorted using only the tag similarity to obtain a sorting result.

[0086] After obtaining the sorting results through the above sorting method, the sorting results can be directly used as retrieval results. In actual scenarios, there may be a large number of candidate texts, and texts with low similarity are of little use to users. Therefore, some candidate texts can be screened out from the sorting results and used as retrieval results. For example, a specified number, such as the first 20 candidate texts, can be used as retrieval results. If the number of all candidate texts is less than 20, all candidate texts will be used as retrieval results. In addition, candidate texts with label similarity greater than a preset threshold can also be used as retrieval results, which can be specifically configured according to actual conditions.

[0087] In this embodiment, for the text to be retrieved, candidate texts that match the attribute information of the text to be retrieved are first screened out, and irrelevant texts are eliminated to avoid interference from irrelevant texts, thereby improving retrieval accuracy and efficiency. Further, candidate texts are sorted based on label similarity and content similarity, that is, when comparing texts, the similarity of text labels and text contents is considered at the same time, so that the factors considered when comparing similarity are more comprehensive, further improving the accuracy of information retrieval.

[0088] In addition, the present invention performs text comparison through tag similarity and content similarity, which can realize an efficient text comparison function, allowing users to find the text that best matches their needs more quickly, greatly improving work efficiency and providing users with a more convenient and accurate document processing experience.

[0089] In another implementation of the present invention, the tag similarity can represent the difference between the uploaded text and the candidate text in tags, which can help users quickly understand the key differences between the files. In this embodiment, the implementation process of "calculating the tag similarity between the tag data of the candidate text and the tag data of the text to be retrieved" is given, which specifically includes the following steps:

[0090] 1) Determine the similarity of the first candidate text as a specific similarity.

[0091] In this embodiment, the first candidate text is a candidate text whose label data is exactly the same as the label data of the text to be retrieved, that is, the label data of the first candidate text is exactly the same as the label data of the text to be retrieved, such as the label data of the first candidate text and the text to be retrieved both include label data of fifty labels 1-50, and the label data are the same.

[0092] If the label data of the first candidate text is exactly the same as that of the text to be retrieved, it means that the key information of the two texts is exactly the same, and also that the two texts are highly similar. Then the similarity of the first candidate text is set to a specific similarity. The specific similarity is a similarity value, such as 1000, which can be determined according to actual configuration.

[0093] 2) Determining the similarity of the second candidate text based on the different contents of the label data of the second candidate text and the label data of the text to be retrieved.

[0094] The second candidate text is a candidate text whose label data includes the label data of the text to be retrieved. For example, the label data of the second candidate text includes label data of fifty-two labels 1-52, and the label data of the text to be retrieved includes label data of fifty labels 1-50, that is, the label data of the second candidate text includes the label data of the text to be retrieved.

[0095] For the second candidate text, the similarity of the second candidate text is determined based on the different contents of the label data of the second candidate text and the label data of the text to be retrieved.

[0096] The different contents refer to the difference between the label data of the two candidate texts. For example, for a second candidate text, it includes label data of fifty-two labels 1-52, and the difference between it and the label data of the text to be retrieved is the two label data 51-52. Another second candidate text includes label data of fifty-two labels 1-53, and the difference between it and the label data of the text to be retrieved is the three label data 51-53.

[0097] In this embodiment, when determining the similarity based on the difference part of the label data, a similarity value, such as 1000, can be used as the basis, that is, the minuend. The larger the difference part of the label data, the larger the corresponding minuend value, and the smaller the final similarity value. That is, the similarity between the second candidate text of the label data including the fifty-two labels 1-52 and the text to be retrieved is greater than the similarity between the second candidate text of the label data including the fifty-two labels 1-53 and the text to be retrieved.

[0098] 3) Determine the similarity of the third candidate text based on the overlap between the label data of the third candidate text and the label data of the text to be retrieved.

[0099] The third candidate text is other candidate text among the candidate texts except the first candidate text and the second candidate text.

[0100] For example, a third candidate text includes label data of sixty labels 1-60, and the text to be retrieved includes label data of fifty labels 50-100. The overlapping label data of the two candidate texts are label data of four labels 50-60, and the degree of overlap is the overlapping label data / label data of the text to be retrieved. The degree of overlap in this embodiment is 10 / 50=20%.

[0101] For each third candidate text, the overlap between the label data of the text to be retrieved and the third candidate text can be calculated, and then the similarity of the third candidate text can be obtained based on the overlap. When determining the similarity, a mapping relationship between overlap and similarity can be set, such as when the overlap is 20%, the similarity is 0.2, and when the overlap is 70%, the similarity is 0.8.

[0102] In this embodiment, when calculating label similarity, label similarity is calculated using corresponding methods for different types of candidate texts, namely the first candidate text, the second candidate text and the third candidate text, thereby improving the accuracy of determining label similarity. Subsequent users can quickly understand the key differences between files based on label similarity and label data.

[0103] In another implementation of the present invention, in addition to calculating the label similarity of each candidate text, the content similarity of each candidate text also needs to be calculated. It should be noted that there is no limited order for calculating label similarity and content similarity, and they can be performed simultaneously or sequentially, depending on the actual configuration.

[0104] Specifically, refer to Figure 3 , calculating the content similarity between the candidate text and the text to be retrieved may include:

[0105] S31, performing a word segmentation operation on the candidate text to obtain a first word segmentation result, and performing a word segmentation operation on the text to be searched to obtain a second word segmentation result.

[0106] In this embodiment, when performing word segmentation on the candidate texts and the text to be searched, a rule-based word segmentation method, a statistics-based word segmentation method, etc. may be adopted, and the specific method may be based on actual configuration.

[0107] After the word segmentation method is determined, a word segmentation operation is performed on the candidate text to obtain a first word segmentation result, and a word segmentation operation is performed on the text to be searched to obtain a second word segmentation result.

[0108] In another implementation of the present invention, before the text is segmented, preprocessing may be performed, including segmentation, denoising, etc., to ensure the reliability and accuracy of the text content and avoid interference with subsequent segmentation and similarity calculations.

[0109] S32: Calculate the similarity between the first word segmentation result and the second word segmentation result, and use the similarity as content similarity.

[0110] In this embodiment, since the cosine algorithm can more accurately capture the semantic information in the text, it will improve the accuracy of similarity calculation. Therefore, in this embodiment of the present invention, the cosine algorithm is used to calculate the similarity between the first word segmentation result and the second word segmentation result, and the similarity is the content similarity.

[0111] In this embodiment, the cosine algorithm is used to achieve in-depth understanding and analysis of the content of the word file, and improve the accuracy of similarity calculation. In addition, the cosine algorithm is more efficient when processing a large amount of text, and the user can find the text that best matches the needs more quickly, greatly improving work efficiency.

[0112] Based on any of the above embodiments, in another implementation of the present invention, after the candidate texts are sorted based on the tag similarity and the content similarity to obtain the search result of the text to be searched, the method further includes:

[0113] For the candidate text in the search result, the difference between the candidate text and the text to be searched is determined, and the difference is marked in the candidate text and the text to be searched respectively.

[0114] In this embodiment, for the candidate texts in the search results, since the word segmentation operation has been performed when calculating the content similarity, the word segmentation results of the candidate texts and the text to be searched can be analyzed. If both include the same words, the word can be not highlighted. If the same words are not included, such as word A in the candidate text does not appear in the text to be searched, and word B in the text to be searched does not appear in the candidate text, then words A and B are required to be the difference content between the candidate text and the text to be searched. The difference content can be highlighted, so that the user can intuitively view the difference content between the candidate text and the text to be searched, thereby improving the user experience.

[0115] In actual scenarios, the search results can be output according to the tag similarity and content similarity, and the search results can be a comparison list. The list shows the comparison details of each compared text, including tag / content similarity values, key differences and other information.

[0116] It should be noted that the specific content (underlined content) in this article is generally used for user-filled content. Therefore, no difference comparison is performed on the specific content. When the difference comparison is performed on other parts, the different content is marked in red so that users can understand the differences and similarities between the files more clearly.

[0117] On the basis of the above embodiments, if the user wants to use the text comparison function, the user can perform simple operations (such as uploading text and selecting attribute information), and the information retrieval device can quickly compare the similarities and content differences between different texts and the text uploaded by the user, and output the search results to the user, so that the user can more easily select the text that best suits their needs. This function is particularly important in scenarios such as contract review and academic research that require frequent comparison of document content. It helps users save a lot of time and energy and improves work efficiency. If the user is not satisfied with the search results, the user can adjust the attribute information of the text and search again, or the user can adjust the content of the uploaded text and search again, which not only improves the user's work efficiency, but also provides users with a more convenient and accurate document processing experience.

[0118] In addition, the embodiment of the present invention can also continuously optimize the algorithm and system design according to the actual feedback of users, so as to improve the accuracy and efficiency of the comparison. At the same time, according to the emerging needs and scenarios, the text templates and label libraries are iteratively updated to ensure the continuous applicability and advancement of the system, realize the efficient and accurate comparison of WORD files, and meet the diverse needs of users in different scenarios.

[0119] Based on the above-mentioned information retrieval method embodiment, another embodiment of the present invention provides an information retrieval device, referring to Figure 4 , which may include:

[0120] The text screening module 11 is used to obtain the text to be searched and screen out candidate texts that match the attribute information of the text to be searched;

[0121] The tag determination module 12 is used to determine the tag data of the text to be retrieved; the tag data represents the key information of the text to be retrieved;

[0122] A similarity calculation module 13, used to calculate the label similarity between the label data of the candidate text and the label data of the text to be retrieved, and to calculate the content similarity between the candidate text and the text to be retrieved;

[0123] The sorting module 14 is used to sort the candidate texts based on the tag similarity and the content similarity to obtain the search result of the text to be searched.

[0124] In one implementation, the attribute information includes at least one of a text type, an organization, and a business scenario;

[0125] The text screening module 11 includes:

[0126] A screening submodule is used to screen out a target text set having the same attribute information as the text to be retrieved from the database; each text set in the database is stored separately according to the attribute information;

[0127] The text determination submodule is used to take the text in the target text set as candidate text.

[0128] In one implementation, the tag determination module 12 includes:

[0129] The tag library acquisition submodule is used to acquire a tag library; the tag library stores a plurality of tags and a method for determining the tags;

[0130] The tag determination submodule is used to extract tag data of corresponding tags from the content of the text to be searched according to the tag determination method.

[0131] In one implementation, the similarity calculation module 13 includes:

[0132] A first calculation submodule is used to determine that the similarity of a first candidate text is a specific similarity, wherein the first candidate text is a candidate text whose label data is completely the same as the label data of the text to be retrieved;

[0133] A second calculation submodule is used to determine the similarity of the second candidate text based on the different contents of the label data of the second candidate text and the label data of the text to be retrieved; the second candidate text is a candidate text whose label data includes the label data of the text to be retrieved;

[0134] The third calculation submodule is used to determine the similarity of the third candidate text based on the overlap between the label data of the third candidate text and the label data of the text to be retrieved; the third candidate text is other candidate text among the candidate texts except the first candidate text and the second candidate text.

[0135] In one implementation, the similarity calculation module 13 includes:

[0136] A word segmentation submodule is used to perform a word segmentation operation on the candidate text to obtain a first word segmentation result, and to perform a word segmentation operation on the text to be searched to obtain a second word segmentation result;

[0137] The fourth calculation submodule is used to calculate the similarity between the first word segmentation result and the second word segmentation result, and use the similarity as content similarity.

[0138] In one implementation, the sorting module 14 is specifically used for:

[0139] The candidate texts are sorted according to the tag similarity; wherein, during the sorting process, if there are multiple candidate texts with the same tag similarity, the multiple candidate texts with the same tag similarity are sorted according to the content similarity.

[0140] In one implementation, the method further includes:

[0141] The difference comparison module is used to determine the difference content between the candidate text and the text to be searched for the candidate text in the search result, and mark the difference content in the candidate text and the text to be searched respectively.

[0142] In this embodiment, for the text to be retrieved, candidate texts that match the attribute information of the text to be retrieved are first screened out, and irrelevant texts are eliminated to avoid interference from irrelevant texts, thereby improving retrieval accuracy and efficiency. Further, candidate texts are sorted based on label similarity and content similarity, that is, when comparing texts, the similarity of text labels and text contents is considered at the same time, so that the factors considered when comparing similarity are more comprehensive, further improving the accuracy of information retrieval.

[0143] It should be noted that, for the working process of each module and sub-module in this embodiment, please refer to the corresponding description in the above embodiment, which will not be repeated here.

[0144] An embodiment of the present application also provides an electronic device, including at least one processor and a memory connected to the processor, wherein:

[0145] The memory is used to store computer programs;

[0146] The processor is used to execute the computer program so that the electronic device can implement the above-mentioned information retrieval method.

[0147] refer to Figure 5 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiment of the present application. The electronic device in the embodiment of the present application may include but is not limited to fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0148] like Figure 5 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 to a random access memory (RAM) 603. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 603. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0149] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a memory card, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0150] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any information retrieval method provided in the embodiment of the present application.

[0151] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any information retrieval method provided in an embodiment of the present application.

[0152] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An information retrieval method, characterized in that: include: Acquire the text to be searched, and filter out candidate texts that match the attribute information of the text to be searched; Determining label data of the text to be retrieved; the label data represents key information of the text to be retrieved; Calculating the label similarity between the label data of the candidate text and the label data of the text to be retrieved, and calculating the content similarity between the candidate text and the text to be retrieved; The candidate texts are sorted based on the tag similarity and the content similarity to obtain a search result of the text to be searched.

2. The information retrieval method according to claim 1, characterized in that: The attribute information includes at least one of a text type, an organization, and a business scenario; Screening out candidate texts that match the attribute information of the text to be retrieved includes: Filtering out a target text set having the same attribute information as the text to be retrieved from a database; storing each text set in the database respectively according to the attribute information; The texts in the target text set are taken as candidate texts.

3. The information retrieval method according to claim 1, characterized in that: Determining the tag data of the text to be retrieved includes: Acquire a tag library; the tag library stores a plurality of tags and a method for determining the tags; According to the label determination method, label data of the corresponding label is extracted from the content of the text to be retrieved.

4. The information retrieval method according to claim 1, characterized in that: Calculating the label similarity between the label data of the candidate text and the label data of the text to be retrieved includes: Determining that the similarity of a first candidate text is a specific similarity, wherein the first candidate text is a candidate text whose label data is completely the same as the label data of the text to be retrieved; Determine the similarity of the second candidate text based on the different contents of the label data of the second candidate text and the label data of the text to be retrieved; the second candidate text is a candidate text whose label data includes the label data of the text to be retrieved; The similarity of the third candidate text is determined based on the overlap between the label data of the third candidate text and the label data of the text to be retrieved; the third candidate text is other candidate text among the candidate texts except the first candidate text and the second candidate text.

5. The information retrieval method according to claim 1, characterized in that: Calculating the content similarity between the candidate text and the text to be searched includes: Performing a word segmentation operation on the candidate text to obtain a first word segmentation result, and performing a word segmentation operation on the text to be searched to obtain a second word segmentation result; The similarity between the first word segmentation result and the second word segmentation result is calculated, and the similarity is used as the content similarity.

6. The information retrieval method according to claim 1, characterized in that: The candidate texts are sorted based on the tag similarity and the content similarity to obtain a search result of the text to be searched, including: The candidate texts are sorted according to the tag similarity; wherein, during the sorting process, if there are multiple candidate texts with the same tag similarity, the multiple candidate texts with the same tag similarity are sorted according to the content similarity.

7. The information retrieval method according to any one of claims 1 to 6, characterized in that: After the candidate texts are sorted based on the tag similarity and the content similarity to obtain the search result of the text to be searched, the method further includes: For the candidate text in the search result, the difference between the candidate text and the text to be searched is determined, and the difference is marked in the candidate text and the text to be searched respectively.

8. An information retrieval device, characterized in that: include: A text screening module is used to obtain the text to be searched and screen out candidate texts that match the attribute information of the text to be searched; A label determination module, used to determine label data of the text to be retrieved; the label data represents key information of the text to be retrieved; A similarity calculation module, used to calculate the label similarity between the label data of the candidate text and the label data of the text to be retrieved, and to calculate the content similarity between the candidate text and the text to be retrieved; The sorting module is used to sort the candidate texts based on the tag similarity and the content similarity to obtain the search result of the text to be searched.

9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the information retrieval method as described in any one of claims 1 to 7.

10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the information retrieval method as described in any one of claims 1 to 7.