Search method, device, equipment and storage medium based on dynamic dictionary

By obtaining the merged buffer and disk index file of information data elements, the top N weighted word combinations are selected for query expansion, which solves the problem of complex and slow retrieval in the existing technology and achieves efficient information matching and accurate retrieval results.

CN116775828BActive Publication Date: 2025-09-19WUHAN FIBERHOME INFORMATION INTEGRATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310706423.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-13
Publication Date
2025-09-19
Estimated Expiration
2043-06-13

AI Technical Summary

Technical Problem

In the existing technology, retrieval relies on the rationality of the extended rules, the retrieval process is complicated, the retrieval speed is slow, and the retrieval accuracy and efficiency are low.

Method used

By obtaining the merge buffer corresponding to each information data element, it writes into the disk index file; when the target keyword input by the user is detected, the word combination with the top N weights is selected to form the query word set after the initial query is expanded; according to the disk index file, the target information document corresponding to the query word set is retrieved and the target information document is output.

Benefits of technology

It simplifies the retrieval process, improves information matching, ensures retrieval accuracy, reduces retrieval calculation costs, and improves the search speed and efficiency based on dynamic dictionaries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116775828B_ABST
    Figure CN116775828B_ABST
Patent Text Reader

Abstract

The present invention discloses a search method, device, equipment and storage medium based on a dynamic dictionary. The method obtains a merge buffer corresponding to each information data element and writes a disk index file to the merge buffer; when a target keyword input by a user query is detected, a word combination with the top N weights is selected to form a query word set after the initial query is expanded; the target information document corresponding to the query word set is retrieved according to the disk index file, and the target information document is output. The method can screen information according to the user query behavior, simplify the retrieval process, improve the information matching degree, ensure the retrieval accuracy, reduce the retrieval calculation cost, and improve the speed and efficiency of the search based on the dynamic dictionary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer information retrieval applications, and in particular to a dynamic dictionary-based search method, device, equipment and storage medium. Background Art

[0002] With the development of the Internet and computer application related technologies, web network information resources have increased dramatically. In order to search for the information users need in massive data, various retrieval technologies have emerged. Information retrieval has become an important means for users to find information. It is widely used in the computer field and is used very frequently. As a search technology, the important criterion for information retrieval is the degree of match between the query results and the user's expected results. The query conditions submitted by users themselves are vague. Sometimes some simple query terms are difficult to express clear query requirements, which will affect the query results. In addition, each user has different sensitivity and understanding of the overall information database, and there is a complex intersection network between information. The same concept may be expressed using the same words in different fields, which greatly affects the query results. To solve the problem of matching queries with information, traditional retrieval solutions have built static knowledge association libraries based on the organizational structure of different fields to expand the semantics of user-submitted queries. However, static knowledge libraries themselves need to reflect the laws of human information cognition, so building and maintaining knowledge libraries requires a huge amount of manpower and knowledge resources. Another approach is to use query results to improve and expand the user's original query, and use the results of multiple queries to expand the semantic expression so that simple words are closer to the information content. However, this solution relies on the rationality of the expansion rules, and the retrieval process becomes more complicated and the retrieval speed will also be slower. Summary of the Invention

[0003] The main purpose of the present invention is to provide a search method, device, equipment and storage medium based on a dynamic dictionary, aiming to solve the technical problems in the prior art of the rationality of retrieval dependence on expansion rules, complex retrieval process, slow retrieval speed, low retrieval accuracy and efficiency.

[0004] In a first aspect, the present invention provides a dynamic dictionary-based search method, the dynamic dictionary-based search method comprising the following steps:

[0005] Obtaining a merge buffer corresponding to each information data element, and writing a disk index file to the merge buffer;

[0006] When the target keyword input by the user is detected, the top N weighted word combinations are selected to form the query word set after the initial query is expanded;

[0007] The target information document corresponding to the query term set is retrieved according to the disk index file, and the target information document is output.

[0008] Optionally, obtaining a merge buffer corresponding to each information data element and writing a disk index file to the merge buffer includes:

[0009] Obtaining the frequencies of occurrence of different keywords in each information data element, and determining the association between each keyword and each information data element based on the frequencies;

[0010] According to the merge buffer corresponding to the association relationship, the disk index file is written to the merge buffer.

[0011] Optionally, writing the disk index file to the merge buffer corresponding to the association relationship includes:

[0012] Storing the association relationship in a fixed memory and counting the size of the relationship triples corresponding to the association relationship;

[0013] When the size of the relation triples reaches a preset storage threshold of the fixed memory, sorting the set of relation triples according to keywords, and writing the sorted set into a memory buffer;

[0014] The memory buffers are merged to obtain a merge buffer, a disk index file is written to the merge buffer, and buffer data in the merge buffer is cleared to wait for the next merge.

[0015] Optionally, when the target keyword input by the user is detected, the first N weighted word combinations are selected to form a query word set after the initial query is expanded, including:

[0016] When a target keyword input by a user is detected, the keyword ID matching the expanded vocabulary is searched according to the target keyword, and the top N weighted word combinations are selected according to the keyword ID to form a query word set after the initial query is expanded.

[0017] Optionally, after obtaining the merge buffer corresponding to each information data element and writing the disk index file to the merge buffer, the dynamic dictionary-based search method further includes:

[0018] Acquire a query keyword set and a user selection information set, and form a keyword matrix combination according to the query keyword set and the user selection information set;

[0019] The keyword matrix combinations are filtered according to weights, sorted, and written into the extended vocabulary.

[0020] Optionally, the acquiring of a query keyword set and a user selection information set, and forming a keyword matrix combination according to the query keyword set and the user selection information set, includes:

[0021] A query keyword set and a user selection information set are obtained, and a keyword matrix combination of the query keyword set and the user selection information set is constructed according to a relationship between the user selection information and the query keyword.

[0022] Optionally, after retrieving the target information document corresponding to the query term set according to the disk index file and outputting the target information document, the dynamic dictionary-based search method further comprises:

[0023] Record the search results that the user chooses to browse and store the search results in a log file;

[0024] When the size of the log file reaches a preset size, the keyword matrix combination is reconstructed and the extended vocabulary is updated again.

[0025] In a second aspect, to achieve the above-mentioned purpose, the present invention further proposes a dynamic dictionary-based search device, the dynamic dictionary-based search device comprising:

[0026] A data acquisition module is used to acquire the merge buffer corresponding to each information data element and write the disk index file to the merge buffer;

[0027] A set formation module is used to select the top N weighted word combinations to form a query word set after the initial query is expanded when the target keyword input by the user is detected;

[0028] The document retrieval module is used to retrieve the target information document corresponding to the query term set according to the disk index file and output the target information document.

[0029] In the third aspect, in order to achieve the above-mentioned purpose, the present invention also proposes a dynamic dictionary-based search device, which includes: a memory, a processor, and a dynamic dictionary-based search program stored on the memory and runnable on the processor, and the dynamic dictionary-based search program is configured to implement the steps of the dynamic dictionary-based search method as described above.

[0030] In a fourth aspect, in order to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a search program based on a dynamic dictionary is stored. When the search program based on a dynamic dictionary is executed by a processor, the steps of the search method based on a dynamic dictionary as described above are implemented.

[0031] The search method based on a dynamic dictionary proposed in the present invention obtains a merge buffer corresponding to each information data element and writes a disk index file to the merge buffer; when a target keyword input by a user query is detected, a word combination with the top N weights is selected to form a query word set after the initial query is expanded; the target information document corresponding to the query word set is retrieved according to the disk index file, and the target information document is output. This method can screen information according to the user query behavior, simplify the retrieval process, improve the information matching degree, ensure the retrieval accuracy, reduce the retrieval calculation cost, and improve the speed and efficiency of the search based on the dynamic dictionary. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;

[0033] Figure 2 1 is a flow chart of a first embodiment of a search method based on a dynamic dictionary according to the present invention;

[0034] Figure 3 2 is a flow chart of a second embodiment of a dynamic dictionary-based search method according to the present invention;

[0035] Figure 4 1 is a flow chart of a third embodiment of a dynamic dictionary-based search method according to the present invention;

[0036] Figure 5 1 is a flow chart of a fourth embodiment of a dynamic dictionary-based search method according to the present invention;

[0037] Figure 6 1 is a flow chart of a fifth embodiment of a dynamic dictionary-based search method according to the present invention;

[0038] Figure 7 1 is a flow chart of a sixth embodiment of a dynamic dictionary-based search method according to the present invention;

[0039] Figure 8 This is a functional module diagram of the first embodiment of the search device based on the dynamic dictionary of the present invention.

[0040] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0041] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0042] The solution of the embodiment of the present invention is mainly: by obtaining the merge buffer corresponding to each information data element, writing the disk index file to the merge buffer; when detecting the target keyword input by the user query, selecting the word combination with the top N weights to form the query word set after the initial query is expanded; according to the disk index file, the target information document corresponding to the query word set is retrieved, and the target information document is output. It can screen information according to the user query behavior, simplify the retrieval process, improve the information matching degree, ensure the retrieval accuracy, reduce the retrieval calculation cost, and improve the speed and efficiency of the search based on the dynamic dictionary, and solve the technical problems in the existing technology that the retrieval relies on the rationality of the expansion rule, the complex retrieval process, the slow retrieval speed, and the low retrieval accuracy and efficiency.

[0043] Reference Figure 1 , Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0044] like Figure 1 As shown, the device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory (Non-Volatile Memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0045] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0046] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating device, a network communication module, a user interface module, and a search program based on a dynamic dictionary.

[0047] The device of the present invention calls the dynamic dictionary-based search program stored in the memory 1005 through the processor 1001 and performs the following operations:

[0048] Obtaining a merge buffer corresponding to each information data element, and writing a disk index file to the merge buffer;

[0049] When the target keyword input by the user is detected, the top N weighted word combinations are selected to form the query word set after the initial query is expanded;

[0050] The target information document corresponding to the query term set is retrieved according to the disk index file, and the target information document is output.

[0051] The device of the present invention calls the dynamic dictionary-based search program stored in the memory 1005 through the processor 1001, and further performs the following operations:

[0052] Obtaining the frequencies of occurrence of different keywords in each information data element, and determining the association between each keyword and each information data element based on the frequencies;

[0053] According to the merge buffer corresponding to the association relationship, the disk index file is written to the merge buffer.

[0054] The device of the present invention calls the dynamic dictionary-based search program stored in the memory 1005 through the processor 1001, and further performs the following operations:

[0055] Storing the association relationship in a fixed memory and counting the size of the relationship triples corresponding to the association relationship;

[0056] When the size of the relation triples reaches a preset storage threshold of the fixed memory, sorting the set of relation triples according to keywords, and writing the sorted set into a memory buffer;

[0057] The memory buffers are merged to obtain a merge buffer, a disk index file is written to the merge buffer, and buffer data in the merge buffer is cleared to wait for the next merge.

[0058] The device of the present invention calls the dynamic dictionary-based search program stored in the memory 1005 through the processor 1001, and further performs the following operations:

[0059] When a target keyword input by a user is detected, the keyword ID matching the expanded vocabulary is searched according to the target keyword, and the top N weighted word combinations are selected according to the keyword ID to form a query word set after the initial query is expanded.

[0060] The device of the present invention calls the dynamic dictionary-based search program stored in the memory 1005 through the processor 1001, and further performs the following operations:

[0061] Acquire a query keyword set and a user selection information set, and form a keyword matrix combination according to the query keyword set and the user selection information set;

[0062] The keyword matrix combinations are filtered according to weights, sorted, and written into the extended vocabulary.

[0063] The device of the present invention calls the dynamic dictionary-based search program stored in the memory 1005 through the processor 1001, and further performs the following operations:

[0064] A query keyword set and a user selection information set are obtained, and a keyword matrix combination of the query keyword set and the user selection information set is constructed according to a relationship between the user selection information and the query keyword.

[0065] The device of the present invention calls the dynamic dictionary-based search program stored in the memory 1005 through the processor 1001, and further performs the following operations:

[0066] Record the search results that the user chooses to browse and store the search results in a log file;

[0067] When the size of the log file reaches a preset size, the keyword matrix combination is reconstructed and the extended vocabulary is updated again.

[0068] This embodiment adopts the above scheme, obtains the merge buffer corresponding to each information data element, writes the disk index file to the merge buffer; when the target keyword input by the user query is detected, selects the word combination with the top N weights to form the query word set after the initial query is expanded; retrieves the target information document corresponding to the query word set according to the disk index file, and outputs the target information document, which can screen information according to the user query behavior, simplifies the retrieval process, improves the information matching degree, ensures the retrieval accuracy, reduces the retrieval calculation cost, and improves the speed and efficiency of the search based on the dynamic dictionary.

[0069] Based on the above hardware structure, an embodiment of a search method based on a dynamic dictionary of the present invention is proposed.

[0070] Reference Figure 2 , Figure 2 FIG. 4 is a flow chart of a first embodiment of a dynamic dictionary-based search method according to the present invention.

[0071] In a first embodiment, the dynamic dictionary-based search method includes the following steps:

[0072] Step S10: Obtain the merge buffer corresponding to each information data element, and write the disk index file into the merge buffer.

[0073] It should be noted that each information data element is an information data element in the information data set, and the information data element corresponds to a merge buffer. After the merge buffer is determined, the disk index file can be written to the merge buffer.

[0074] Step S20: When a target keyword input by a user is detected, the top N weighted word combinations are selected to form a query word set after the initial query is expanded.

[0075] It is understandable that when the keywords input by the user are detected, the word combinations with the top N weights can be selected to form the query word set after the initial query is expanded. Generally, the word combinations with the top five weights can be selected to form the query word set. Of course, other numbers of word combinations can also be selected.

[0076] Step S30: Retrieve the target information document corresponding to the query term set according to the disk index file, and output the target information document.

[0077] It should be understood that the information documents corresponding to the query term set can be retrieved through the disk index file, and then the set corresponding to the retrieved target information documents can be output.

[0078] In a specific implementation, a mapping between words and information is obtained based on the expanded word set and index file, and a target information document is searched and obtained, and then the retrieved target information set is output.

[0079] This embodiment adopts the above scheme, obtains the merge buffer corresponding to each information data element, writes the disk index file to the merge buffer; when the target keyword input by the user query is detected, selects the word combination with the top N weights to form the query word set after the initial query is expanded; retrieves the target information document corresponding to the query word set according to the disk index file, and outputs the target information document, which can screen information according to the user query behavior, simplifies the retrieval process, improves the information matching degree, ensures the retrieval accuracy, reduces the retrieval calculation cost, and improves the speed and efficiency of the search based on the dynamic dictionary.

[0080] Furthermore, Figure 3 FIG. 1 is a flow chart of a second embodiment of a search method based on a dynamic dictionary according to the present invention. Figure 3 As shown, based on the first embodiment, a second embodiment of the search method based on a dynamic dictionary of the present invention is proposed. In this embodiment, step S11 specifically includes the following steps:

[0081] Step S11: Obtain the frequencies of occurrence of different keywords in each information data element, and determine the association between each keyword and each information data element according to the frequencies.

[0082] It should be noted that after obtaining the frequencies of occurrence of different keywords in each information data element, the association relationship between each keyword and each information data element can be determined based on the frequencies.

[0083] In the specific implementation, the initialized data set W = {w1, w2, ..., wn} represents the information data set of the system, and K = {k1, k2, ..., kn} represents the set of words appearing in the information data set; according to the frequency of occurrence of different keywords ki in each information data element wi, the triple r (k, w, n) can be obtained to represent the association relationship between keywords and data elements.

[0084] Step S12: writing the disk index file into the merge buffer corresponding to the association relationship.

[0085] It is understandable that the corresponding merge buffer can be determined through the association relationship, and then the disk index file can be written to the merge buffer.

[0086] This embodiment adopts the above scheme to obtain the frequency of occurrence of different keywords in each information data element, and determine the association relationship between each keyword and each information data element based on the frequency; write the disk index file to the merge buffer corresponding to the association relationship according to the merge buffer, which can quickly determine the merge buffer and improve the speed and efficiency of the search based on the dynamic dictionary.

[0087] Furthermore, Figure 4 FIG. 1 is a flow chart of a third embodiment of a search method based on a dynamic dictionary according to the present invention. Figure 4 As shown, based on the second embodiment, a third embodiment of the search method based on a dynamic dictionary of the present invention is proposed. In this embodiment, step S12 specifically includes the following steps:

[0088] Step S121: Store the association relationship in a fixed memory, and count the sizes of the relationship triples corresponding to the association relationship.

[0089] It should be noted that, by storing the association relationship in a fixed memory, the size of the relationship triples corresponding to the association relationship can be counted.

[0090] In a specific implementation, a triple set p={r1, r2, ..., rn} is defined, and the relationship triple r corresponding to the association relationship is stored in a fixed-size memory.

[0091] Step S122: When the size of the relation triples reaches a preset storage threshold of the fixed memory, the set of the relation triples is sorted according to the keywords, and the sorted set is written into a memory buffer.

[0092] It is understandable that when the size of the relation triples reaches a preset storage threshold of the fixed memory, the relation triples may be sorted, and then the sorted set may be written into the memory buffer.

[0093] In the specific implementation, when the cumulative r reaches the fixed memory size, the set p composed of r is sorted according to the keyword k and written into the memory buffer.

[0094] Step S123: merge the memory buffers to obtain a merge buffer, write the disk index file to the merge buffer, and clear the buffer data in the merge buffer to wait for the next merge.

[0095] It should be understood that by merging the memory buffers, a merge buffer can be obtained, and then the disk index file can be written to the merge buffer, and the data in the merge buffer can be cleared to wait for the next merge.

[0096] It can be understood that the buffers are merged, the triplets of the same keyword ID in different buffers are merged, written to the disk index file, and the buffer data is cleaned up and waits for the next merge.

[0097] This embodiment adopts the above scheme, by storing the association relationship in a fixed memory and counting the size of the relationship triples corresponding to the association relationship; when the size of the relationship triples reaches the preset storage threshold of the fixed memory, sorting the set of the relationship triples according to keywords, and writing the sorted set into the memory buffer; merging the memory buffers to obtain a merge buffer, writing the disk index file to the merge buffer, and cleaning the buffer data in the merge buffer to wait for the next merge, which can quickly determine the merge buffer and improve the speed and efficiency of the search based on the dynamic dictionary.

[0098] Furthermore, Figure 5 FIG. 4 is a flow chart of a fourth embodiment of a search method based on a dynamic dictionary according to the present invention. Figure 5 As shown, based on the first embodiment, a fourth embodiment of the search method based on a dynamic dictionary of the present invention is proposed. In this embodiment, step S20 specifically includes the following steps:

[0099] Step S21: When a target keyword input by a user is detected, a keyword ID matching the target keyword is searched in an expanded vocabulary, and a word combination with the top N weights is selected according to the keyword ID to form a query word set after the initial query is expanded.

[0100] It should be noted that when the target keyword input by the user is detected, the keyword ID matching the expanded vocabulary can be searched according to the target keyword, and then the top N word combinations with the highest weight can be selected according to the keyword ID to form the query word set after the initial query is expanded.

[0101] In a specific implementation, the user submits a query input, the submitted keywords are extracted, the expanded vocabulary is searched for matching keyword IDs, and the top five weighted word combinations are selected to form a query word set after the initial query is expanded.

[0102] Through the above scheme, this embodiment detects the target keyword input by the user query, searches the keyword ID of the expanded vocabulary according to the target keyword, selects the top N word combinations with the weight according to the keyword ID to form the query word set after the initial query is expanded, and can quickly form the query word set, thereby ensuring the retrieval accuracy, reducing the retrieval calculation cost, and improving the speed and efficiency of the search based on the dynamic dictionary.

[0103] Furthermore, Figure 6 FIG. 5 is a flow chart of a fifth embodiment of a search method based on a dynamic dictionary according to the present invention. Figure 6 As shown, a fifth embodiment of the dynamic dictionary-based search method of the present invention is proposed based on the first embodiment. In this embodiment, after step S10, the dynamic dictionary-based search method specifically includes the following steps:

[0104] Step S101: Acquire a query keyword set and a user selection information set, and construct a keyword matrix combination according to the query keyword set and the user selection information set.

[0105] It should be noted that after obtaining the query keyword set and the user selection information set, a keyword matrix combination can be constructed according to the query keyword set and the user selection information set.

[0106] Furthermore, the step S101 specifically includes the following steps:

[0107] A query keyword set and a user selection information set are obtained, and a keyword matrix combination of the query keyword set and the user selection information set is constructed according to a relationship between the user selection information and the query keyword.

[0108] In the specific implementation, the query keyword set U = {key1, key2, ..., keyn} and the user selection information set D = {d1, d2, ..., dn} can be defined. The matrix formed between U and D represents the relationship between user selection and information. The keyword set formed by each column of the matrix can be represented as the same type of search. The number of keywords with a matrix value of 1 is the weight of the set.

[0109] Step S102: Filter the keyword matrix combinations according to weights, sort them, and write them into an extended vocabulary.

[0110] It is understandable that after filtering the keyword matrix combinations according to weights, the filtered keyword matrix combinations can be sorted, and then the sorting can be written into the extended vocabulary.

[0111] In a specific implementation, keyword combinations may be filtered according to a preset weight (lower than a set threshold), sorted, and written into the extended vocabulary.

[0112] It should be understood that the construction of the extended dictionary is to extract the user's cognitive characteristics of the entire information data set. By recording the keyword set used to submit the query and the data set that is finally clicked and browsed, and calculating the matrix of the two, the relationship between the query keywords is analyzed to form query word clusters. The part of the matrix that is one represents the center of the word cluster, and weights are set for these clusters with the same theme. With each search of the user, user cognitive knowledge is accumulated, so that the relationship between the keywords is not only determined by the relationship with the data set, but also by user cognitive judgment.

[0113] Through the above-mentioned scheme, this embodiment obtains a query keyword set and a user selection information set, and forms a keyword matrix combination based on the query keyword set and the user selection information set; filters the keyword matrix combination according to the weight, and sorts and writes it into the extended vocabulary; it can filter information according to user query behavior, simplify the retrieval process, improve information matching, and significantly enhance query performance.

[0114] Furthermore, Figure 7 FIG. 1 is a flow chart of a sixth embodiment of a search method based on a dynamic dictionary according to the present invention. Figure 7 As shown, a sixth embodiment of the dynamic dictionary-based search method of the present invention is proposed based on the first embodiment. In this embodiment, after step S30, the dynamic dictionary-based search method further includes the following steps:

[0115] Step S40: Record the search results that the user chooses to browse, and store the search results in a log file.

[0116] It should be noted that after obtaining the search results that the user chooses to browse, the search results can be recorded and stored in a log file.

[0117] Step S50: When the size of the log file reaches a preset size, the keyword matrix combination is reconstructed and the extended vocabulary is updated.

[0118] It is understandable that when the size of the log file reaches a preset size, the keyword matrix combination can be reconstructed and the extended vocabulary can be re-updated.

[0119] In the specific implementation, when the log file reaches the specified preset size max (the max size is determined by the user's sensitivity to the retrieval results), the matrix of the query keyword set U and the document set D can be reconstructed, the keyword set weights can be calculated and sorted, and the extended vocabulary can be updated.

[0120] This embodiment adopts the above scheme, obtains the merge buffer corresponding to each information data element, writes the disk index file to the merge buffer; when the target keyword input by the user query is detected, selects the word combination with the top N weights to form the query word set after the initial query is expanded; retrieves the target information document corresponding to the query word set according to the disk index file, and outputs the target information document, which can screen information according to the user query behavior, simplifies the retrieval process, improves the information matching degree, ensures the retrieval accuracy, reduces the retrieval calculation cost, and improves the speed and efficiency of the search based on the dynamic dictionary.

[0121] Accordingly, the present invention further provides a search device based on a dynamic dictionary.

[0122] Reference Figure 8 , Figure 8 This is a functional module diagram of the first embodiment of the search device based on the dynamic dictionary of the present invention.

[0123] In a first embodiment of a dynamic dictionary-based search device of the present invention, the dynamic dictionary-based search device includes:

[0124] The data acquisition module 10 is used to acquire the merge buffer corresponding to each information data element and write the disk index file into the merge buffer.

[0125] The set forming module 20 is used to select the top N weighted word combinations to form a query word set after the initial query is expanded when a target keyword input by a user is detected.

[0126] The document retrieval module 30 is configured to retrieve the target information document corresponding to the query term set according to the disk index file and output the target information document.

[0127] The data acquisition module 10 is also used to obtain the frequency of occurrence of different keywords in each information data element, determine the association relationship between each keyword and each information data element based on the frequency; and write the disk index file to the merge buffer corresponding to the association relationship.

[0128] The data acquisition module 10 is also used to store the association relationship in a fixed memory and count the size of the relationship triples corresponding to the association relationship; when the size of the relationship triples reaches a preset storage threshold of the fixed memory, the set of relationship triples is sorted according to keywords, and the sorted set is written into a memory buffer; the memory buffers are merged to obtain a merge buffer, a disk index file is written to the merge buffer, and the buffer data in the merge buffer is cleaned up to wait for the next merge.

[0129] The set forming module 20 is further configured to, when detecting a target keyword input by a user, search the expanded vocabulary for a keyword ID that matches the target keyword, and select the top N weighted word combinations according to the keyword ID to form a query word set after the initial query is expanded.

[0130] The set forming module 20 is further configured to obtain a query keyword set and a user selection information set, form a keyword matrix combination based on the query keyword set and the user selection information set, filter the keyword matrix combination by weight, and write the result into an extended vocabulary in order.

[0131] The set construction module 20 is further configured to obtain a query keyword set and a user selection information set, and construct a keyword matrix combination of the query keyword set and the user selection information set according to the relationship between the user selection information and the query keyword.

[0132] The document retrieval module 30 is further configured to record search results selected by the user and store the search results in a log file; when the size of the log file reaches a preset size, the keyword matrix combination is reconstructed and the extended vocabulary is updated.

[0133] The steps implemented by the various functional modules of the dynamic dictionary-based search device can refer to the various embodiments of the dynamic dictionary-based search method of the present invention, and will not be repeated here.

[0134] In addition, an embodiment of the present invention further provides a storage medium, wherein a dynamic dictionary-based search program is stored on the storage medium. When the dynamic dictionary-based search program is executed by a processor, the following operations are implemented:

[0135] Obtaining a merge buffer corresponding to each information data element, and writing a disk index file to the merge buffer;

[0136] When the target keyword input by the user is detected, the top N weighted word combinations are selected to form the query word set after the initial query is expanded;

[0137] The target information document corresponding to the query term set is retrieved according to the disk index file, and the target information document is output.

[0138] Furthermore, when the dynamic dictionary-based search program is executed by the processor, the following operations are also implemented:

[0139] Obtaining the frequencies of occurrence of different keywords in each information data element, and determining the association between each keyword and each information data element based on the frequencies;

[0140] According to the merge buffer corresponding to the association relationship, the disk index file is written to the merge buffer.

[0141] Furthermore, when the dynamic dictionary-based search program is executed by the processor, the following operations are also implemented:

[0142] Storing the association relationship in a fixed memory and counting the size of the relationship triples corresponding to the association relationship;

[0143] When the size of the relation triples reaches a preset storage threshold of the fixed memory, sorting the set of relation triples according to keywords, and writing the sorted set into a memory buffer;

[0144] The memory buffers are merged to obtain a merge buffer, a disk index file is written to the merge buffer, and buffer data in the merge buffer is cleared to wait for the next merge.

[0145] Furthermore, when the dynamic dictionary-based search program is executed by the processor, the following operations are also implemented:

[0146] When a target keyword input by a user is detected, the keyword ID matching the expanded vocabulary is searched according to the target keyword, and the top N weighted word combinations are selected according to the keyword ID to form a query word set after the initial query is expanded.

[0147] Furthermore, when the dynamic dictionary-based search program is executed by the processor, the following operations are also implemented:

[0148] Acquire a query keyword set and a user selection information set, and form a keyword matrix combination according to the query keyword set and the user selection information set;

[0149] The keyword matrix combinations are filtered according to weights, sorted, and written into the extended vocabulary.

[0150] Furthermore, when the dynamic dictionary-based search program is executed by the processor, the following operations are also implemented:

[0151] A query keyword set and a user selection information set are obtained, and a keyword matrix combination of the query keyword set and the user selection information set is constructed according to a relationship between the user selection information and the query keyword.

[0152] Furthermore, when the dynamic dictionary-based search program is executed by the processor, the following operations are also implemented:

[0153] Record the search results that the user chooses to browse and store the search results in a log file;

[0154] When the size of the log file reaches a preset size, the keyword matrix combination is reconstructed and the extended vocabulary is updated again.

[0155] This embodiment adopts the above scheme, obtains the merge buffer corresponding to each information data element, writes the disk index file to the merge buffer; when the target keyword input by the user query is detected, selects the word combination with the top N weights to form the query word set after the initial query is expanded; retrieves the target information document corresponding to the query word set according to the disk index file, and outputs the target information document, which can screen information according to the user query behavior, simplifies the retrieval process, improves the information matching degree, ensures the retrieval accuracy, reduces the retrieval calculation cost, and improves the speed and efficiency of the search based on the dynamic dictionary.

[0156] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0157] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0158] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A search method based on a dynamic dictionary, characterized in that: The dynamic dictionary-based search method includes: Obtaining a merge buffer corresponding to each information data element, and writing a disk index file to the merge buffer; When the target keyword input by the user is detected, the top N weighted word combinations are selected to form the query word set after the initial query is expanded; Retrieving the target information document corresponding to the query term set according to the disk index file, and outputting the target information document; The step of obtaining a merge buffer corresponding to each information data element and writing the disk index file to the merge buffer includes: Obtaining the frequencies of occurrence of different keywords in each information data element, and determining the association between each keyword and each information data element based on the frequencies; Writing the disk index file to the merge buffer corresponding to the association relationship; The step of writing the disk index file to the merge buffer corresponding to the association relationship includes: Storing the association relationship in a fixed memory and counting the size of the relationship triples corresponding to the association relationship; When the size of the relation triples reaches a preset storage threshold of the fixed memory, sorting the set of relation triples according to keywords, and writing the sorted set into a memory buffer; The memory buffers are merged to obtain a merge buffer, a disk index file is written to the merge buffer, and buffer data in the merge buffer is cleared to wait for the next merge.

2. The dynamic dictionary-based search method according to claim 1, wherein: When the target keyword input by the user is detected, the first N weighted word combinations are selected to form a query word set after the initial query is expanded, including: When a target keyword input by a user is detected, the keyword ID matching the expanded vocabulary is searched according to the target keyword, and the top N weighted word combinations are selected according to the keyword ID to form a query word set after the initial query is expanded.

3. The dynamic dictionary-based search method according to claim 1, wherein: After obtaining the merge buffer corresponding to each information data element and writing the disk index file to the merge buffer, the dynamic dictionary-based search method further includes: Acquire a query keyword set and a user selection information set, and form a keyword matrix combination according to the query keyword set and the user selection information set; The keyword matrix combinations are filtered according to weights, sorted, and written into the extended vocabulary.

4. The dynamic dictionary-based search method according to claim 3, wherein: The acquiring of a query keyword set and a user selection information set, and forming a keyword matrix combination according to the query keyword set and the user selection information set, includes: A query keyword set and a user selection information set are obtained, and a keyword matrix combination of the query keyword set and the user selection information set is constructed according to a relationship between the user selection information and the query keyword.

5. The dynamic dictionary-based search method according to claim 1, wherein: After retrieving the target information document corresponding to the query term set according to the disk index file and outputting the target information document, the dynamic dictionary-based search method further includes: Record the search results that the user chooses to browse and store the search results in a log file; When the size of the log file reaches a preset size, the keyword matrix combination is reconstructed and the extended vocabulary is updated again.

6. A search device based on a dynamic dictionary, characterized in that: The dynamic dictionary-based search device includes: A data acquisition module is used to acquire the merge buffer corresponding to each information data element and write the disk index file to the merge buffer; A set formation module is used to select the top N weighted word combinations to form a query word set after the initial query is expanded when the target keyword input by the user is detected; A document retrieval module is used to retrieve target information documents corresponding to the query term set according to the disk index file and output the target information documents; The data acquisition module is further configured to obtain the frequencies of occurrence of different keywords in each information data element, determine the association between each keyword and each information data element based on the frequencies, and write the disk index file to the merge buffer corresponding to the association. The data acquisition module is also used to store the association relationship in a fixed memory and count the size of the relationship triples corresponding to the association relationship; when the size of the relationship triples reaches a preset storage threshold of the fixed memory, the set of relationship triples is sorted according to keywords, and the sorted set is written into a memory buffer; the memory buffers are merged to obtain a merge buffer, a disk index file is written to the merge buffer, and the buffer data in the merge buffer is cleaned up to wait for the next merge.

7. A search device based on a dynamic dictionary, characterized in that: The dynamic dictionary-based search device includes: a memory, a processor, and a dynamic dictionary-based search program stored in the memory and executable on the processor. The dynamic dictionary-based search program is configured to implement the steps of the dynamic dictionary-based search method as described in any one of claims 1 to 5.

8. A storage medium, characterized in that: The storage medium stores a dynamic dictionary-based search program, which, when executed by a processor, implements the steps of the dynamic dictionary-based search method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for searching file

    CN101996200A

  • File search system and method

    CN102567364A