Similar article query method, device, equipment and storage medium
By extracting and normalizing topic words, building length and source weight functions, and integrating query statements, the inaccurate and redundant similarity calculation problems in medical article queries are solved, the accuracy and efficiency of the query are improved, and the information is credible Spend.
Patent Information
- Application Number
- CN202410063740.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-16
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-01-16
AI Technical Summary
In the prior art, the calculation of article similarity is inaccurate, the search error is large, the search steps are redundant and time-consuming and inefficient. Especially in article processing in the medical field, proper nouns and text length affect the results, resulting in an increase in error.
By obtaining the medical article to be queried, extracting the subject words and their weights and normalizing, building the subject weight function; building the length weight function based on the length of the article; tracing the article and binding the source information to build the source weight function; Integrate query statements to be used for database queries to improve the accuracy and reliability of query results.
It improves the accuracy and efficiency of medical article query, reduces errors, enhances information credibility, and provides more comprehensive and accurate search results.
Smart Images

Figure CN118296099B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information retrieval technology, and in particular to a similar article query method, device, equipment and storage medium. Background Art
[0002] At present, the popularity calculation method based on the number of similar articles binds and stores the association between the article similarity fingerprint code and the article information. When used, it directly aggregates and queries through the fingerprint code and the association relationship. After sorting, the articles with the largest number of similarities, that is, the most popular articles, are obtained, so as to analyze the popular articles and the popularity of articles in a specific field. At the same time, there are also methods for segmenting long texts, preprocessing texts through TF-IDF (term frequency-inverse document frequency) weight calculation and core keyword extraction, and using Word2vec (word to vector) to mine the semantic relationship between segmented words and store them in ES (El sticSearch, search engine database). When using, set conditions to perform ES full-library retrieval, and finally use the cosine similarity algorithm to calculate the similarity of the vectors of each text. The larger the cosine value, the more similar the documents are.
[0003] However, the heat calculation method based on the number of similar articles has nothing to do with user behavior, and cannot specifically recommend content based on user behavior. Simply obtaining the data with the most relevant content in all data in the database is the hot data within a certain time range, and the push content is single, and all users receive the same push content. At the same time, the cosine similarity calculation method of the vector depends largely on the preprocessing results of the text, because the processing method, processing results and length of the text will affect the representation of the vector. When the vector representation is inaccurate, the cosine similarity result is also inaccurate. For articles in the field of medical devices, there are a large number of proprietary medical and device terms, such as: medical regulations related documents or news, medical litigation article information and medical device related property rights regulations news articles, etc., and different text processing methods will further increase the similarity of articles in the medical field and the error of retrieval. Secondly, the calculation of the vector can be directly calculated by matrix. In this method, the one-by-one comparison of related articles is time-consuming. Finally, the vector search of ES can be equipped with cosine similarity calculation and return the matching results. There is no need to search the entire ES library and then perform cosine similarity calculation, which leads to redundant and time-consuming retrieval steps. Summary of the invention
[0004] The present invention provides a similar article query method, device, equipment and storage medium to solve the technical problems in the prior art of inaccurate article similarity calculation, large article retrieval error, redundant and time-consuming article retrieval steps and low efficiency.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a similar article query method, comprising:
[0006] Get the medical articles to be searched;
[0007] Extracting subject words and their weights from the medical articles to be queried, and normalizing the extracted subject words and their weights, thereby constructing a subject weight function based on the normalized subject words and their weights;
[0008] Acquiring the length of the medical article to be queried, and constructing a length weight function according to the length of the medical article to be queried;
[0009] Tracing and binding the medical articles to be queried, thereby constructing a source weight function;
[0010] The subject weight function, the length weight function and the source weight function are integrated to obtain a query statement, and according to the query statement, a target medical article similar to the medical article to be queried is queried from a preset database.
[0011] As a preferred solution, the method for constructing the preset database includes:
[0012] Access medical articles;
[0013] Performing text topic modeling on each of the medical articles in turn to obtain a topic distribution and a topic weight corresponding to each medical article; wherein each medical article corresponds to a topic distribution and a topic weight corresponding to each topic;
[0014] All topic weights of each medical article are normalized to the maximum and minimum in turn, and the medical articles corresponding to the topic weights after the maximum and minimum normalization are stored, so as to construct a preset database.
[0015] As a preferred solution, the calculation formula for normalizing the maximum and minimum weights of all thematic weights of each medical article is:
[0016]
[0017] Among them, A ij is the normalized value of the jth topic weight in the ith medical article, K ij is the jth topic weight in the ith medical article, K i,minis the minimum topic weight in the i-th medical article, K i,max is the maximum topic weight in the i-th medical article.
[0018] As a preferred solution, the subject words and their weights are extracted from the medical articles to be queried, and the extracted subject words and their weights are normalized, so as to construct a subject weight function according to the normalized subject words and their weights, specifically:
[0019] Performing text topic modeling on the medical article to be queried, thereby extracting each subject word and its weight;
[0020] The weights corresponding to the extracted subject words are normalized to the maximum and minimum values respectively, and a callback function corresponding to each subject word is constructed according to the subject words after maximum and minimum normalization and their corresponding weights, and then the constructed callback functions are integrated to obtain the subject weight function.
[0021] As a preferred solution, the length of the medical article to be queried is obtained, and a length weight function is constructed according to the length of the medical article to be queried, specifically:
[0022] Performing score adjustment on the length of the medical article to be queried, and performing logarithmic transformation on the adjusted length;
[0023] The length after logarithmic transformation is multiplied by a preset penalty factor to obtain the length weight of the medical article to be queried, and a length weight function is constructed according to the length weight of the medical article to be queried.
[0024] As a preferred solution, the medical articles to be queried are traced and bound to construct a source weight function, specifically:
[0025] Tracing the source of the medical article to be queried, thereby obtaining source information of the medical article to be queried;
[0026] According to the preset source weight correspondence table, the source information of the medical article to be queried is bound to its corresponding weight, and a source weight function is constructed based on the source information of the medical article to be queried after the bound weight; wherein the preset source weight correspondence table includes the source information of the medical article to be queried and its corresponding weight parameters.
[0027] As a preferred solution, it also includes:
[0028] Calculating the weight score of the medical article to be queried by using the subject weight function, the length weight function and the source weight function;
[0029] Calculate the similarity between the medical article to be queried and all medical articles in the preset database, so as to obtain an original query score;
[0030] The weight score is added to the original query score to obtain a final relevance score between the medical article to be queried and all medical articles in the preset database.
[0031] Accordingly, the present invention also provides a similar article query device, comprising: an acquisition module, a subject module, a length module, a source module and a query module;
[0032] The acquisition module is used to acquire the medical articles to be queried;
[0033] The subject module is used to extract subject words and their weights from the medical articles to be queried, and normalize the extracted subject words and their weights, so as to construct a subject weight function according to the normalized subject words and their weights;
[0034] The length module is used to obtain the length of the medical article to be queried, and construct a length weight function according to the length of the medical article to be queried;
[0035] The source module is used to trace and bind the medical articles to be queried, thereby constructing a source weight function;
[0036] The query module is used to integrate the subject weight function, the length weight function and the source weight function to obtain a query statement, and query a preset database for target medical articles similar to the medical article to be queried based on the query statement.
[0037] Correspondingly, the present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements the similar article query method described in any one of the above.
[0038] Correspondingly, the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any of the similar article query methods described above.
[0039] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0040] The technical solution of the present invention obtains medical articles to be queried, extracts subject words and their weights from the medical articles, normalizes the extracted subject words and their weights, and constructs a subject weight function, which can accurately capture the core content of the medical articles and improve the accuracy of the query results. At the same time, according to the length of the medical articles, a length weight function is constructed, so that the different contribution degrees of articles of different lengths in the similarity calculation can be considered by using the length weight function, so that the query results are more comprehensive, and the medical articles are traced and bound to construct a source weight function, which can further improve the accuracy and reliability of the query results and improve the credibility of the information, so that the subject weight function, the length weight function and the source weight function are integrated to obtain a query statement, and then according to the query statement, a target medical article similar to the medical article to be queried is queried from a preset database. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 : A flowchart of a similar article search method provided by an embodiment of the present invention;
[0042] Figure 2 : A structural diagram of a similar article query device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] Embodiment 1
[0045] Please refer to Figure 1 , a similar article query method provided by an embodiment of the present invention includes the following steps S101-S105:
[0046] Step S101: Obtain the medical article to be searched.
[0047] In this embodiment, the medical articles to be queried include but are not limited to meetings, documents and regulations related to the medical industry, as well as news articles on relevant regulations such as the approval, recall and adverse events of medical devices. All these documents and regulations are to ensure the safety and effectiveness of medical devices, protect human health and life safety, and promote the development of the medical device industry. At the same time, they are all applicable to the research, production, operation, use and supervision and management of medical devices, so that these regulations and documents ensure that the information of the whole process of medical devices is true, accurate, complete and traceable. At the same time, the number of articles is complicated, among which the content of articles related to the medical field is relatively complex, with more proper nouns and words. Therefore, different from the conventional article query method, this embodiment can effectively retrieve and query relevant information such as medical articles through the three aspects of subject, length and information source credibility, avoiding the deviation of information source, subject distribution and the error of identification of length information, resulting in the problem of low accuracy and efficiency of article query.
[0048] Step S102: extracting subject words and their weights from the medical articles to be queried, and normalizing the extracted subject words and their weights, thereby constructing a subject weight function based on the normalized subject words and their weights.
[0049] As a preferred solution of this embodiment, the subject words and their weights are extracted from the medical articles to be queried, and the extracted subject words and their weights are normalized, so as to construct a subject weight function according to the normalized subject words and their weights, which is specifically:
[0050] Perform text topic modeling on the medical articles to be queried, so as to extract various subject words and their weights; perform maximum and minimum normalization on the weights corresponding to the extracted subject words, and construct a callback function corresponding to each subject word based on the maximum and minimum normalized subject words and their corresponding weights, and then integrate the constructed callback functions to obtain a subject weight function.
[0051] In this embodiment, text topic modeling is performed on the medical articles to be queried, and each subject word and its weight is extracted. The weights corresponding to the extracted subject words are normalized to the maximum and minimum values respectively, and then a callback function corresponding to each subject word is constructed based on the subject words after the maximum and minimum normalization and their corresponding weights. The constructed callback functions are then integrated to obtain a topic weight function.
[0052] Furthermore, the LDA (Latent Direct Allocation) text topic modeling is performed on the medical articles to be queried to obtain the topic distribution and topic weight of the article, and the filter method is used to construct multiple filter methods with LDA topic words and their weight values to obtain the topic weight function. The filter method is a high-order function that accepts a function as a parameter and returns a new set that contains the elements in the original set that meet specific conditions.
[0053] It is understandable that through text topic modeling, the core content and themes of medical articles can be accurately captured, the accuracy of query results can be improved, and the maximum and minimum normalization method can be used to unify the weights of different subject words, making them comparable in calculations, and avoiding certain subject words from affecting the final results due to excessive or small weights. At the same time, constructing a callback function can make the relationship between subject words and their weights more intuitive and easy to understand, which is convenient for subsequent analysis and processing. By integrating multiple callback functions, a more comprehensive and accurate topic weight function can be obtained, which can better reflect the topic distribution of medical articles and provide higher quality search results.
[0054] Step S103: Acquire the length of the medical article to be queried, and construct a length weight function according to the length of the medical article to be queried.
[0055] As a preferred solution of this embodiment, the length of the medical article to be queried is obtained, and a length weight function is constructed according to the length of the medical article to be queried, which is specifically:
[0056] The length of the medical article to be queried is fractionally adjusted, and the adjusted length is logarithmically transformed; the logarithmically transformed length is multiplied by a preset penalty factor to obtain a length weight of the medical article to be queried, and a length weight function is constructed based on the length weight of the medical article to be queried.
[0057] In this embodiment, the length of the medical article to be queried is fractionally adjusted, the adjusted length is logarithmically transformed, and the logarithmically transformed length is multiplied by a preset penalty factor to obtain the length weight of the medical article to be queried, thereby constructing a length weight function based on the length weight.
[0058] In this embodiment, the length weight function is used to punish articles that are too long or too short. The length weight function uses the field_value_factor method to adjust the length of the article content by score, and uses the log1p modifier to logarithmically transform the article length, and then multiply it by the penalty factor. Preferably, the penalty factor is 0.1 to punish articles that are too long or too short. Among them, the field_value_factor function is a parameter used in Elasticsearch, and its main function is to control the relevance score of the document and the order of the document. Specifically, it can accept three parameters: field (the name of the field to be used), factor (the factor used to adjust the document score), and modifier (the modifier used to control the factor, for example, log). By adjusting these parameters, the relevance and order of the search results can be more finely controlled, and then the length of the article content can be controlled to score, thereby achieving the adjustment of the score. Among them, the log1p modifier is the log1p() function in Numpy (an open source numerical calculation extension library), which is used to calculate the logarithmic transformation of data.
[0059] Step S104: tracing and binding the medical articles to be queried, thereby constructing a source weight function.
[0060] As a preferred solution of this embodiment, the medical articles to be queried are traced and bound to construct a source weight function, which is specifically:
[0061] The medical article to be queried is traced to obtain the source information of the medical article to be queried; the source information of the medical article to be queried is bound to its corresponding weight according to a preset source weight correspondence table, and a source weight function is constructed according to the source information of the medical article to be queried after the weight is bound; wherein the preset source weight correspondence table includes the source information of the medical article to be queried and its corresponding weight parameter.
[0062] In this embodiment, the medical article to be queried is traced to obtain its source information, and the source information of the medical article to be queried is bound to its corresponding weight according to a preset source weight correspondence table, so as to construct a source weight function based on the source information of the medical article to be queried after binding the weight, wherein the preset source weight correspondence table includes the source information of the medical article to be queried and its corresponding weight parameters.
[0063] In this embodiment, the source weight function uses a filter method to improve the credibility of corresponding data sources by using weight parameters preset in a preset source weight correspondence table for some well-known data sources, wherein the source weight function based on the source of the article is used to increase the weight of articles with higher credibility.
[0064] It is understandable that by tracing the source information of the medical articles to be queried, we can better understand the background and credibility of the articles, which helps to improve the accuracy and reliability of the search results. By using the preset source weight correspondence table, we can assign corresponding weights to each source based on the authority, influence and other factors of different sources, so as to give articles with high-quality sources higher scores and rankings in the search results. By constructing a source weight function, we can quantify the source information and weights, making the search results more objective and fair, and avoiding the quality of the search results being affected by the bias or preference of certain sources.
[0065] Step S105: Integrate the subject weight function, the length weight function and the source weight function to obtain a query statement, and query a preset database for target medical articles similar to the medical article to be queried based on the query statement.
[0066] As a preferred solution of this embodiment, the method for constructing the preset database includes:
[0067] Obtain medical articles; perform text topic modeling on each of the medical articles in turn to obtain a topic distribution and a topic weight corresponding to each medical article; wherein each medical article corresponds to a topic distribution and a topic weight corresponding to each topic; perform maximum and minimum normalization on all topic weights of each medical article in turn, and store the medical articles corresponding to the maximum and minimum normalized topic weights, thereby constructing a preset database.
[0068] As a preferred solution of this embodiment, the calculation formula for performing maximum and minimum normalization on all topic weights of each medical article is:
[0069]
[0070] Among them, A ij is the normalized value of the jth topic weight in the ith medical article, K ij is the jth topic weight in the ith medical article, K i,min is the minimum topic weight in the i-th medical article, K i,max is the maximum topic weight in the i-th medical article.
[0071] In this embodiment, LDA text topic modeling is performed on each medical industry-related meeting, document and regulations, as well as the approval, recall and adverse events of medical devices and other related regulatory news articles to obtain the topic distribution and topic weight of the article, and store them in the database. At the same time, all topic weights of each article are normalized, and the normalization method is "minimum-maximum normalization", that is, in each article, the formula is executed: (this weight value-minimum weight value) / (maximum weight value-minimum weight value). Thereby, the problem of relevance loss caused by uneven distribution of weight values of subject words of different articles due to narrow or wide distribution of topics can be avoided.
[0072] In this embodiment, the LDA subject words and their weights extracted from the medical device-related regulatory news articles that need to be matched and compared for similarity are used to construct the Elasticsearch function score custom scoring search statement to define the search scope. Furthermore, three functions based on subject weight, article length, and article source are integrated to modify the score, thereby defining multiple functions to modify the score to improve the accuracy of the query matching score; among them, the function based on subject weight is used to calculate the subject matching degree between the article and the query, the function based on article length is used to punish articles that are too long or too short, and the function based on article source is used to increase the weight of articles with higher credibility.
[0073] As a preferred solution of this embodiment, it also includes:
[0074] The weight score of the medical article to be queried is calculated by using the subject weight function, the length weight function and the source weight function; the similarity between the medical article to be queried and all the medical articles in the preset database is calculated to obtain an original query score; the weight score is added to the original query score to obtain a final relevance score between the medical article to be queried and all the medical articles in the preset database.
[0075] In this embodiment, by comprehensively applying the topic weight function, the length weight function and the source weight function, the relevance and importance of the document can be considered more comprehensively, the accuracy and reliability of the search results can be improved, and the similarity calculation method can be used to compare the medical article to be queried with all the medical articles in the preset database, so as to find the most relevant document and provide a better search experience. At the same time, by adding the weight score to the original query score, the relevance and importance of the document can be more accurately reflected, making the search results more objective and fair, and avoiding the quality of the search results being affected by the bias or preference of certain factors.
[0076] It can be understood that through actual retrieval results, the customized scoring retrieval based on the subject word weights is effective, and the article relevance is high. Compared with the traditional retrieval method based on keyword matching, this embodiment can significantly improve the accuracy and efficiency of the retrieval results. At the same time, LDA topic modeling is used, and the weights of each topic are used to construct the Elasticsearch function score for customized scoring retrieval, which improves the quality of the retrieval results.
[0077] Implementing the above embodiments has the following effects:
[0078] The embodiment of the present invention obtains medical articles to be queried, extracts subject words and their weights from the medical articles, normalizes the extracted subject words and their weights, and constructs a subject weight function, which can accurately capture the core content of the medical articles and improve the accuracy of the query results. At the same time, according to the length of the medical articles, a length weight function is constructed, so that by using the length weight function, the different contribution degrees of articles of different lengths in the similarity calculation can be considered, so that the query results are more comprehensive, and the medical articles are traced and bound to construct a source weight function, which can further improve the accuracy and reliability of the query results and improve the credibility of the information, so that the subject weight function, the length weight function and the source weight function are integrated to obtain a query statement, and then according to the query statement, a target medical article similar to the medical article to be queried is queried from a preset database.
[0079] Embodiment 2
[0080] See also Figure 2 , which is a similar article query device provided by the present invention, including: an acquisition module 201, a theme module 202, a length module 203, a source module 204 and a query module 205.
[0081] The acquisition module 201 is used to acquire the medical articles to be searched.
[0082] The subject module 202 is used to extract subject words and their weights from the medical articles to be queried, and normalize the extracted subject words and their weights, thereby constructing a subject weight function based on the normalized subject words and their weights.
[0083] The length module 203 is used to obtain the length of the medical article to be queried and construct a length weight function according to the length of the medical article to be queried.
[0084] The source module 204 is used to trace and bind the medical articles to be queried, thereby constructing a source weight function.
[0085] The query module 205 is used to integrate the subject weight function, the length weight function and the source weight function to obtain a query statement, and query the preset database for target medical articles similar to the medical article to be queried based on the query statement.
[0086] As a preferred solution, the method for constructing the preset database includes:
[0087] Obtain medical articles; perform text topic modeling on each of the medical articles in turn to obtain a topic distribution and a topic weight corresponding to each medical article; wherein each medical article corresponds to a topic distribution and a topic weight corresponding to each topic; perform maximum and minimum normalization on all topic weights of each medical article in turn, and store the medical articles corresponding to the maximum and minimum normalized topic weights, thereby constructing a preset database.
[0088] As a preferred solution, the calculation formula for normalizing the maximum and minimum weights of all thematic weights of each medical article is:
[0089]
[0090] Among them, A ij is the normalized value of the jth topic weight in the ith medical article, K ij is the jth topic weight in the ith medical article, K i,min is the minimum topic weight in the i-th medical article, K i,max is the maximum topic weight in the i-th medical article.
[0091] As a preferred solution, the subject words and their weights are extracted from the medical articles to be queried, and the extracted subject words and their weights are normalized, so as to construct a subject weight function according to the normalized subject words and their weights, specifically:
[0092] Perform text topic modeling on the medical articles to be queried, so as to extract various subject words and their weights; perform maximum and minimum normalization on the weights corresponding to the extracted subject words, and construct a callback function corresponding to each subject word based on the maximum and minimum normalized subject words and their corresponding weights, and then integrate the constructed callback functions to obtain a subject weight function.
[0093] As a preferred solution, the length of the medical article to be queried is obtained, and a length weight function is constructed according to the length of the medical article to be queried, specifically:
[0094] The length of the medical article to be queried is fractionally adjusted, and the adjusted length is logarithmically transformed; the logarithmically transformed length is multiplied by a preset penalty factor to obtain a length weight of the medical article to be queried, and a length weight function is constructed based on the length weight of the medical article to be queried.
[0095] As a preferred solution, the medical articles to be queried are traced and bound to construct a source weight function, specifically:
[0096] The medical article to be queried is traced to obtain the source information of the medical article to be queried; the source information of the medical article to be queried is bound to its corresponding weight according to a preset source weight correspondence table, and a source weight function is constructed according to the source information of the medical article to be queried after the weight is bound; wherein the preset source weight correspondence table includes the source information of the medical article to be queried and its corresponding weight parameter.
[0097] As a preferred solution, it also includes:
[0098] The weight score of the medical article to be queried is calculated by using the subject weight function, the length weight function and the source weight function; the similarity between the medical article to be queried and all the medical articles in the preset database is calculated to obtain an original query score; the weight score is added to the original query score to obtain a final relevance score between the medical article to be queried and all the medical articles in the preset database.
[0099] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0100] Implementing the above embodiments has the following effects:
[0101] The embodiment of the present invention obtains medical articles to be queried, extracts subject words and their weights from the medical articles, normalizes the extracted subject words and their weights, and constructs a subject weight function, which can accurately capture the core content of the medical articles and improve the accuracy of the query results. At the same time, according to the length of the medical articles, a length weight function is constructed, so that by using the length weight function, the different contribution degrees of articles of different lengths in the similarity calculation can be considered, so that the query results are more comprehensive, and the medical articles are traced and bound to construct a source weight function, which can further improve the accuracy and reliability of the query results and improve the credibility of the information, so that the subject weight function, the length weight function and the source weight function are integrated to obtain a query statement, and then according to the query statement, a target medical article similar to the medical article to be queried is queried from a preset database.
[0102] Embodiment 3
[0103] Correspondingly, the present invention also provides a terminal device, comprising: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the similar article query method described in any one of the above embodiments is implemented.
[0104] The terminal device of this embodiment includes: a processor, a memory, and a computer program and a computer instruction stored in the memory and executable on the processor. When the processor executes the computer program, each step in the above-mentioned embodiment 1 is implemented, for example: Figure 1 Alternatively, when the processor executes the computer program, the functions of each module / unit in the above device embodiment, such as the query module 205, are implemented.
[0105] Exemplarily, the computer program may be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device. For example, the query module 205 is used to integrate the subject weight function, the length weight function and the source weight function to obtain a query statement, and according to the query statement, query from a preset database to obtain target medical articles similar to the medical article to be queried.
[0106] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the schematic diagram is merely an example of a terminal device and does not constitute a limitation on the terminal device. The terminal device may include more or fewer components than shown in the diagram, or may combine certain components, or different components. For example, the terminal device may also include an input / output device, a network access device, a bus, etc.
[0107] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and various interfaces and lines are used to connect various parts of the entire terminal device.
[0108] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile terminal, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Med ia Card, SMC), a secure digital (SecureDi gita l, SD) card, a flash card (F l ash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0109] Wherein, if the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-On l yMemory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0110] Embodiment 4
[0111] Correspondingly, the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the similar article query method described in any one of the above embodiments.
[0112] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A similar article query method, characterized in that: include: Get the medical articles to be searched; Performing text topic modeling on the medical articles to be queried, extracting each subject word and its weight, performing maximum and minimum normalization on the weights corresponding to the extracted subject words, and then constructing a callback function corresponding to each subject word according to the maximum and minimum normalized subject words and their corresponding weights, thereby integrating the constructed callback functions to obtain a subject weight function; Score-adjust the length of the medical article to be queried, perform logarithmic transformation on the adjusted length, multiply the logarithmic transformed length by a preset penalty factor to obtain a length weight of the medical article to be queried, and construct a length weight function based on the length weight of the medical article to be queried; Tracing the source of the medical article to be queried, obtaining its source information, and binding the source information of the medical article to be queried with its corresponding weight according to a preset source weight correspondence table, and constructing a source weight function according to the source information of the medical article to be queried after binding the weight; wherein the preset source weight correspondence table includes the source information of the medical article to be queried and its corresponding weight parameter; The weight score of the medical article to be queried is calculated through the subject weight function, the length weight function and the source weight function; Calculate the similarity between the medical article to be queried and all medical articles in the preset database to obtain the original query score; The weighted score is added to the original query score to obtain a final relevance score between the medical article to be queried and all medical articles in a preset database, a query statement is determined based on the final relevance score, and based on the query statement, target medical articles similar to the medical article to be queried are queried from the preset database.
2. A similar article query method as claimed in claim 1, characterized in that: The method for constructing the preset database includes: Access medical articles; Performing text topic modeling on each of the medical articles in turn to obtain a topic distribution and a topic weight corresponding to each medical article; wherein each medical article corresponds to a topic distribution and a topic weight corresponding to each topic; All topic weights of each medical article are normalized to the maximum and minimum in turn, and the medical articles corresponding to the topic weights after the maximum and minimum normalization are stored, so as to construct a preset database.
3. A similar article query method as claimed in claim 2, characterized in that: The calculation formula for the maximum and minimum normalization of all topic weights of each medical article is: in, For the Medical articles The normalized value of the topic weight, For the of the medical articles The weight of the topic, For the Minimum topic weight among medical articles, For the The maximum topic weight among medical articles.
4. A similar article query device, characterized in that: include: Acquisition module, subject module, length module, source module and query module; The acquisition module is used to acquire the medical articles to be queried; The topic module is used to perform text topic modeling on the medical article to be queried, extract each topic word and its weight, perform maximum and minimum normalization on the weights corresponding to the extracted topic words, and then construct a callback function corresponding to each topic word according to the maximum and minimum normalized topic words and their corresponding weights, so as to integrate the constructed callback functions to obtain a topic weight function; The length module is used to fractionally adjust the length of the medical article to be queried, perform logarithmic transformation on the adjusted length, multiply the logarithmic transformed length by a preset penalty factor to obtain a length weight of the medical article to be queried, and construct a length weight function based on the length weight of the medical article to be queried; The source module is used to trace the source of the medical article to be queried, obtain its source information, and bind the source information of the medical article to be queried with its corresponding weight according to the preset source weight correspondence table, and construct a source weight function according to the source information of the medical article to be queried after binding the weight; wherein the preset source weight correspondence table includes the source information of the medical article to be queried and its corresponding weight parameter; The query module is used to calculate the weight score of the medical article to be queried through a subject weight function, a length weight function and a source weight function, calculate the similarity between the medical article to be queried and all medical articles in a preset database to obtain an original query score, add the weight score to the original query score to obtain a final relevance score between the medical article to be queried and all medical articles in the preset database, determine a query statement according to the final relevance score, and query the preset database for target medical articles similar to the medical article to be queried according to the query statement.
5. A terminal device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the similar article query method according to any one of claims 1 to 3 is implemented.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the similar article query method according to any one of claims 1 to 3.
