Text information search method, device, equipment, and medium based on artificial intelligence
By calculating the similarity value of the weight vector of the target word and text information and the subject word vector, the problem of insufficient search range in the prior art is solved, and high accuracy and efficient text information search is achieved.
Patent Information
- Application Number
- CN202210439432.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-04-25
AI Technical Summary
When facing the user's divergent search intention, existing text information search methods cannot effectively expand the search scope, resulting in insufficient search accuracy and effectiveness.
By obtaining the first weight vector of the target word and the second weight vector of the target text information and the subject word vector, the similarity value is calculated to determine the search results, and combining the preset word text association relationship and vector regulation algorithm, the search range is expanded and the accuracy is improved.
It realizes high accuracy and efficient text information search under the diverse search needs of users to meet the diverse search needs of users.
Smart Images

Figure CN114706959B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an artificial intelligence-based text information search method, apparatus, device, and medium. Background Art
[0002] With the development of natural language technology, word-based searches for relevant information in different application scenarios have gradually relied on artificial intelligence algorithms. In particular, users usually search for information by entering text content such as words. At this time, the execution end will search for words through algorithm models to obtain matching information.
[0003] Currently, during the information search process, the algorithm model corrects and converts the target search information into synonyms, and then recalls the corrected search information. However, in many application scenarios, users' search intentions are divergent. For example, when searching for "milk," in addition to recalling content related to "milk," users may also need to search for information on bread, calcium supplements, lactose, and other related products. Simply based on a clear search term will not expand the search scope or content, resulting in a narrow range of search information, unable to meet users' diverse search needs, thus affecting the accuracy and effectiveness of the search. Summary of the Invention
[0004] In view of this, the present application provides a text information search method and apparatus, device, and medium based on artificial intelligence, the main purpose of which is to solve the problem of poor accuracy of existing text information searches.
[0005] According to one aspect of the present application, a text information search method based on artificial intelligence is provided, comprising:
[0006] Acquire a target word to be searched, and determine at least one target text information matching the target word from the global text information;
[0007] A first weighted topic vector and a second weighted topic vector are obtained by multiplying the first weight vector of the target word, the second weight vector of the target text information, and the topic vector, respectively. The topic vector is a vector content obtained by extracting multiple topic words from the global text information using a search extraction model that has completed model training;
[0008] The text information obtained as the search result is determined based on the similarity value between the first weighted topic vector and the second weighted topic vector.
[0009] Furthermore, before obtaining the target word to be searched and determining at least one target text information matching the target word from the global text information, the method further includes:
[0010] Obtaining global text information, wherein the global text information is all text content within a search field;
[0011] Extracting a keyword from the global text information based on a search extraction model that has completed model training, where the keyword includes a plurality of words;
[0012] A topic word vector of the topic word is constructed, where the topic word vector is composed of weight values of multiple words in the global text information.
[0013] Furthermore, before the first weight vector of the target word and the second weight vector of the target text information are multiplied by the subject word vector respectively, the method further includes:
[0014] Extracting a first weight vector of the target word from the global text information based on a first word vector model, where the first weight vector is a distribution weight of the target word in the global text information;
[0015] A second weight vector of the target text information is extracted from the global text information based on a second word vector model, where the second weight vector is a distribution weight of the target text information in the global text information.
[0016] Furthermore, determining the target text information matching the target word from the global text information includes:
[0017] Obtaining a preset word-text association relationship, wherein the preset word-text association relationship includes a weight mapping relationship between different words and different text information;
[0018] Based on the matrix value of the first weight vector, target text information matching the target word is found from the preset word text association relationship.
[0019] Furthermore, the determining the text information obtained as the search result based on the similarity value between the first weighted topic vector and the second weighted topic vector includes:
[0020] Performing reduction processing on the first weighted topic vector and the second weighted topic vector based on a vector reduction algorithm;
[0021] Calculating similarity values between the first weighted topic vector and the second weighted topic vector after the reduction process, and sorting the similarity values;
[0022] The target text information corresponding to the similarity values whose order meets the preset number is determined as the searched text information.
[0023] Furthermore, the method further comprises:
[0024] If the calculated similarity value is less than a preset similarity threshold, the recommended text information pre-configured in the search field is retrieved and output as auxiliary search text content.
[0025] Furthermore, after determining the text information obtained by the search based on the similarity value between the first weighted topic vector and the second weighted topic vector, the method further includes:
[0026] Extracting an output link for outputting the text information, wherein the output link is connected to an output text box pre-configured in the front-end interface;
[0027] The text information is output in a scrolling manner in the output text box through the output link.
[0028] According to another aspect of the present application, there is provided an artificial intelligence-based text information search device, comprising:
[0029] an acquisition module, configured to acquire a target word to be searched, and determine at least one target text information matching the target word from the global text information;
[0030] a processing module that multiplies the first weight vector of the target word, the second weight vector of the target text information, and the subject word vector to obtain a first weighted subject vector and a second weighted subject vector, wherein the subject word vector is a vector content obtained by extracting multiple subject words from the global text information using a search extraction model that has completed model training;
[0031] A determination module is configured to determine text information obtained through search based on a similarity value between the first weighted topic vector and the second weighted topic vector.
[0032] Furthermore, the device further comprises: an extraction module, a construction module,
[0033] The acquisition module is further used to acquire global text information, which is all text content within a search field;
[0034] The extraction module is configured to extract a keyword from the global text information based on a search extraction model for which model training has been completed, wherein the keyword includes a plurality of words;
[0035] The construction module is used to construct a topic word vector for the topic word, and the topic word vector is composed of weight values of multiple words in the global text information.
[0036] Furthermore, the extraction module is further configured to extract a first weight vector of the target word from the global text information based on a first word vector model, wherein the first weight vector is a distribution weight of the target word in the global text information;
[0037] The extraction module is further configured to extract a second weight vector of the target text information from the global text information based on a second word vector model, where the second weight vector is a distribution weight of the target text information in the global text information.
[0038] Furthermore, the acquisition module includes:
[0039] An acquiring unit, configured to acquire a preset word-text association relationship, wherein the preset word-text association relationship includes a weight mapping relationship between different words and different text information;
[0040] A searching unit is configured to search for target text information matching the target word from the preset word-text association relationship based on the matrix value of the first weight vector.
[0041] Furthermore, the determining module includes:
[0042] a processing unit, configured to perform reduction processing on the first weighted topic vector and the second weighted topic vector based on a vector reduction algorithm;
[0043] a calculation unit, configured to calculate similarity values between the first weighted topic vector and the second weighted topic vector that have completed the reduction process, and to sort the similarity values;
[0044] The determining unit is configured to determine the target text information corresponding to the similarity values whose order meets a preset number as the searched text information.
[0045] Furthermore, the device further comprises:
[0046] The retrieval module retrieves the recommended text information pre-configured in the search field and outputs it as auxiliary search text content if the calculated similarity value is less than a preset similarity threshold.
[0047] Furthermore, the device further comprises: an output module,
[0048] The extraction module is further configured to extract an output link for outputting the text information, wherein the output link is connected to an output text box pre-configured in the front-end interface;
[0049] The output module is configured to output the text information in a scrolling manner in the output text box via the output link.
[0050] According to another aspect of the present application, a storage medium is provided, in which at least one executable instruction is stored. The executable instruction enables a processor to perform operations corresponding to the above-mentioned artificial intelligence-based text information search method.
[0051] According to another aspect of the present application, a computer device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;
[0052] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned artificial intelligence-based text information search method.
[0053] By means of the above technical solution, the technical solution provided by the embodiment of the present application has at least the following advantages:
[0054] The present application provides an artificial intelligence-based text information search method, apparatus, device, and medium. Compared with the prior art, the embodiments of the present application obtain a target word to be searched and determine at least one target text information matching the target word from the global text information; multiply the first weight vector of the target word and the second weight vector of the target text information with the subject word vector respectively to obtain a first weighted subject vector and a second weighted subject vector, wherein the subject word vector is a vector content obtained by extracting multiple subject words from the global text information through a search extraction model that has completed model training; and determine the text information obtained as the search based on the similarity value between the first weighted subject vector and the second weighted subject vector, thereby expanding the search scope of the word and greatly improving the accuracy and efficiency of the word search, thereby meeting the diverse search needs of users.
[0055] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0057] Figure 1 A flowchart of a text information search method based on artificial intelligence provided by an embodiment of the present application is shown;
[0058] Figure 2 A flowchart of another text information search method based on artificial intelligence provided by an embodiment of the present application is shown;
[0059] Figure 3 A flowchart of another text information search method based on artificial intelligence provided by an embodiment of the present application is shown;
[0060] Figure 4 A flowchart of another artificial intelligence-based text information search method provided in an embodiment of the present application is shown;
[0061] Figure 5 The following is a block diagram showing the composition of an artificial intelligence-based text information search device provided in an embodiment of the present application;
[0062] Figure 6 A structural diagram of a computer device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0063] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0064] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.
[0065] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0066] In the process of searching for information, the algorithm model will correct the target search information and convert it into synonyms, and recall the corrected search information. However, in many application scenarios, the user's intention for searching for information is divergent. For example, when searching for "milk", in addition to recalling content related to "milk", the user may need to search for information such as bread, calcium supplements, lactose, etc., and the search scope and search content will not be expanded based on clear search terms, which will result in a smaller search information scope and fail to meet the user's diverse search needs, thus affecting the accuracy and effectiveness of the search. The embodiment of the present application provides a text information search method based on artificial intelligence, such as Figure 1 As shown, the method includes:
[0067] 101. Acquire a target word to be searched, and determine at least one target text information matching the target word from the global text information.
[0068] In the embodiment of the present application, the current execution end can be used as a terminal or server for searching text information. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDNs), and big data and artificial intelligence platforms. Application scenarios for text information include but are not limited to case text content in intelligent medical systems, search text content in search engines, etc. The text content can be in Chinese, English or other languages. At the same time, the target words to be searched can be entered by the user at the terminal or pre-stored in the server. This embodiment of the application does not make specific restrictions for different application scenarios. Among them, global text information is all text content within a search field. For example, if the search scope is an intelligent medical system, the corresponding global text information is all case information stored in the intelligent medical system. If the search scope is a certain paper search engine, the corresponding global text information is all paper information stored in a certain paper search engine. This embodiment of the application does not make specific restrictions.
[0069] It should be noted that in the embodiments of the present application, in order to improve the efficiency of searching text information based on target words, after obtaining the target word to be searched, at least one target text information that matches the target word is first determined from the global text information. At this time, multiple target text information are the range of the expected search text information. The determination method may include word matching based on the number of times the target word is marked. For example, if the target word is diabetes, then the cases of patients with diabetes are determined as target text information; matching classification may also be performed based on the language of the target word. For example, if the target word is Chinese, then the Chinese in the search library is determined as the target text information; sentiment classification matching may also be performed based on the word meaning of the target word, etc., which is not specifically limited in the embodiments of the present application.
[0070] 102. Obtain a first weighted topic vector and a second weighted topic vector by multiplying the first weight vector of the target word, the second weight vector of the target text information, and the topic word vector respectively.
[0071] In the embodiment of the present application, the subject word vector is the vector content obtained by extracting multiple subject words from the global text information through the search extraction model that has completed model training, wherein the subject word is a word in the global text information that represents the same superordinate meaning or classification, and the subject word includes multiple words. For example, the subject word includes but is not limited to emotions, things, actions, etc., and the corresponding subject words 1-emotion include loneliness, freedom, confusion, strength, etc., and the subject word 2-things include life, road, sky, children, etc., and the subject word 3-action includes love, broken, crying, death, etc., which are not specifically limited in the embodiment of the present application. The subject word vector is composed of the weights of multiple words. Different words are pre-calculated in the global text information to obtain different weight values, thereby forming a subject word vector, that is, the element values in the subject word vector are the weight values of different words.
[0072] It should be noted that the first weight vector is the weight vector value of the target word relative to the global text information, and the second weight vector is the weight vector value of the target text information relative to the global text information. At this time, the first weight vector and the second weight vector can be extracted based on the Word2vec word vector extraction model, respectively. This embodiment of the present application does not make specific restrictions. After determining the first weight vector and the second weight vector, they are multiplied with the topic word vector respectively to obtain the first weighted topic vector of the target word and the second weighted topic vector of the target text information.
[0073] For example, the first weight vector of the target word is [0.12, 0.08, 0.05, ...], and the theme word vector 1 is The theme word vector 2 is The theme word vector 3 is Multiply them by the first weight vector of the target word to get the first weighted topic vector
[0074] 103. Determine text information obtained through search based on a similarity value between the first weighted topic vector and the second weighted topic vector.
[0075] In an embodiment of the present application, in order to search for text information that best matches the search term from the target text information, a similarity value between the first weighted topic vector and the second weighted topic vector is calculated, and the searched text information is determined based on the similarity value. For example, the target text information corresponding to the second weighted topic vector with the highest similarity value may be selected as the searched text information, or the target text information corresponding to the second weighted topic vector whose similarity meets a preset similarity threshold may be selected as the searched text information, which is not specifically limited in this embodiment of the present application.
[0076] In another embodiment of the present application, in order to further define and illustrate, Figure 2 As shown, before the step of obtaining a target word to be searched and determining at least one target text information matching the target word from the global text information, the method further includes:
[0077] 201. Get global text information;
[0078] 202. Extracting keywords from the global text information based on the search extraction model for which model training has been completed;
[0079] 203. Construct a topic word vector for the topic word.
[0080] In order to accurately utilize the subject word vector to multiply the target words and target text information, the subject word vector is pre-built. Specifically, the global text information is first obtained, and then the subject words are extracted from the global text information based on the search extraction model to construct the subject word vector. Among them, the subject words include multiple words, and the global text information is all the text content in a search field, including but not limited to the field of intelligent medical care, paper search, etc. At this time, the global text information is stored in the current execution end and has a matching correspondence with different fields, so as to obtain global text information of different application fields. The embodiment of this application does not make specific limitations. After obtaining the global text information, the subject words are extracted from the global text information based on the search extraction model that has completed model training. At this time, the subject word vector is composed of the weight values of multiple words in the global text information. Specifically, the learning and training of the search extraction model is completed in advance based on the global text sample data. The search extraction model can be a model that parses and extracts text or word bodies, such as the LDA (Latent Dirichlet Allocation) model, so that the TOP topics of all tags are extracted from the global text information based on the search extraction model, as well as the word distribution in each topic, that is, the probability distribution of multiple words in each topic word in the global text information, such as a 0-1 distribution, as word weights. In addition, before extracting topic words based on the search model, it is also necessary to obtain the vector elements of each word in the global text information based on word vector models such as word2vec, Transformer or Rnn in natural language processing technology, that is, the Embedding vector, so as to convert each topic word into a topic word vector by combining the word distribution of multiple words in the topic word and the word's Embedding vector. For example, when using the LDA model to extract topic words (represented in the form of vectors) from the global text information, the number of topic words can be configured to 256 when training the model, and the multiple words contained in each topic word are obtained, such as each topic word is represented as:
[0081] Keyword 1 (emotion): 0.3*loneliness+0.1*freedom+0.1*confusion+0.05*strength+…
[0082] Keyword 2 (things): 0.2*life+0.15*road+0.15*sky+0.02*child+…
[0083] Topic 3 (action): 0.15*love+0.12*broken+0.12*cry+0.1*die+…; among them, 0.3, 0.1, 0.1, 0.05…are the word weights of loneliness, freedom, confusion, strength…. The topic word vector can be obtained through the multiple words contained in the above topic words and the word embedding vectors. At this time, if the embedding of each word in topic word 1 is extracted based on the word2vec model, such as loneliness: [0.2, 0.15, 0.1,…, 0.35]; freedom: [0.1, 0.3, 0.3,…, 0.3]; confusion: [0.2, 0.15, 0.12,…, 0.04]; strength: [0.1, 0.05, 0.14,…, 0.04]…, then based on the word weights and embedding vectors,
[0084]
[0085] Through the above calculation method,
[0086] Get all the topic word vectors, such as:
[0087] Topic 1 (emotion): [0.143, 0.189, 0.031, …, 0.121];
[0088] Topic 2 (things): [0.031, 0.167, 0.171, …, 0.172];
[0089] Subject 3 (action): [0.125, 0.026, 0.163, …, 0.168].…
[0090] In another embodiment of the present application, in order to further define and illustrate, Figure 3 As shown, before the step of multiplying the first weight vector of the target word, the second weight vector of the target text information, and the subject word vector respectively, the method further includes:
[0091] 301. Extracting a first weight vector of the target word from the global text information based on a first word vector model;
[0092] 302. Extract a second weight vector of the target text information from the global text information based on a second word vector model.
[0093] Since the words to be searched need to be converted into vector form, model operations and other processing are performed, and in order to realize the multiplication of the first weight vector based on the target word and the second weight vector of the target text information with the subject word vector, the first weight vector of the target word is extracted from the global text information in advance based on the first word vector model. At this time, the first weight vector is the distribution weight of the target word in the global text information, that is, the word weight. At the same time, the second weight vector of the target text information is extracted from the global text information based on the second word vector model. At this time, the second weight vector is the distribution weight of the target text information in the global text information, that is, the text weight. Among them, the first word vector model and the second word vector model can be pre-trained based on word vector models such as word2vec, Transformer or Rnn. Therefore, before extracting the first weight vector and the second weight vector, it is necessary to perform model training of the global text information on the first word vector model and the second word vector model, so as to process the target word and the target text information as model input parameters respectively, and obtain the first weight vector and the second weight vector. The embodiment of the present application does not specifically limit the specific training process.
[0094] In another embodiment of the present application, for further limitation and explanation, the step of determining the target text information that matches the target word from the global text information includes: obtaining a preset word text association relationship; based on the matrix value of the first weight vector, searching for the target text information that matches the target word from the preset word text association relationship.
[0095] In order to improve the accuracy of searching for text information in global text information, when determining the target text information, specifically, a word text association relationship can be pre-configured, so that the target text information matching the target word can be searched based on this preset word text association relationship, thereby narrowing the search range of the expected search text information. The preset word text association relationship includes a weight mapping relationship between different words and different text information. The weight mapping relationship at this time can be configured differently based on different global text information. For example, in the intelligent medical system, the weight mapping relationship between children and freedom-related text information is represented as 0.1. In the paper search system, the weight mapping relationship between children and freedom-related text information is represented as 0.6. Therefore, when searching for the target text information of the target word, different target text information can be found for different scene fields, greatly narrowing the search range of text information.
[0096] It should be noted that in order to accurately find the target text information that matches the target word, and since the first weight vector is obtained by extracting the word distribution of the target word, the matrix value of the first weight vector is calculated and multiplied by the weight mapping relationship representation value of the relevant text information in the preset word text association relationship that is greater than 0.5. If the obtained value is greater than 0.5, then the relevant text information is determined as the target text information. For example, if the matrix value of the first weight vector is calculated to be 0.8, then the weight mapping relationships corresponding to the relevant text information 1 and the relevant text information 2 that match the target word are represented as 0.7 and 0.4 respectively. After multiplication, if the result of multiplying the text information 1 and the matrix value is greater than 0.5, then the relevant text information 1 is used as the target text information that matches the target word. This embodiment of the application does not make specific limitations.
[0097] In another embodiment of the present application, for further limitation and explanation, the step of determining the text information obtained by the search based on the similarity value between the first weighted topic vector and the second weighted topic vector includes: reducing the first weighted topic vector and the second weighted topic vector based on a vector reduction algorithm; calculating the similarity value between the first weighted topic vector and the second weighted topic vector that have completed the reduction processing, and sorting the similarity values; determining the target text information corresponding to the similarity value that meets a preset number of sortings as the text information obtained by the search.
[0098] In an embodiment of the present application, in order to accurately calculate the similarity between the first weighted topic vector and the second weighted topic vector, so as to determine the text information as the search result from the target text information, specifically, the first weight vector and the second weight vector are reduced based on the vector reduction algorithm, thereby calculating the similarity value between the first weight vector and the second weight vector after the reduction process, which greatly improves the accuracy of the similarity value calculation. Among them, the vector reduction algorithm can be a neural network model, a convolutional neural network model, a support vector machine model, etc., which is not specifically limited in the embodiment of the present application. After the reduction process is completed, since the first weighted topic vector and the second weighted topic vector are obtained by multiplying the first weight vector and the second weight vector with the subject word vector respectively, the similarity value between the first weighted topic vector and the second weighted topic vector is calculated, which can be the Euclidean distance between the vectors, thereby obtaining the similarity value and sorting them in sequence. Among them, a preset number, such as 2 or 3, is pre-configured as the basis for screening the text information obtained by the search from the sorted target text, which is not specifically limited in the embodiment of the present application.
[0099] In another embodiment of the present application, for further definition and explanation, the step further includes: if the calculated similarity value is less than a preset similarity threshold, retrieving recommended text information pre-configured in the search field.
[0100] In order to enable text information search and push even when the similarity value is less than a preset similarity threshold, in an embodiment of the present application, if the calculated similarity value is less than the preset similarity threshold, the pre-configured recommended text information within the search field is retrieved and output as auxiliary search text content. Recommended text information is pre-configured for different search fields. In this case, the selection of recommended text information can be manual, or any text information can be randomly extracted from the global text information as recommended text information, which is not specifically limited in the present embodiment.
[0101] In another embodiment of the present application, in order to further define and illustrate, Figure 4 As shown, after determining the text information obtained by the search based on the similarity value between the first weighted topic vector and the second weighted topic vector, the method further includes:
[0102] 401. Extracting an output link for outputting the text information;
[0103] 402. Output the text information in a scrolling manner in the output text box through the output link.
[0104] In order to facilitate the output of the searched text information, thereby realizing an efficient and flexible text information display method, after determining the text information obtained as the search, the output link for outputting this text information is extracted, so that the text information can be output in the output text box through the output link. Wherein, the output link is connected to the output text box pre-configured in the front-end interface, and the output link can be pre-configured to be connected to the output text boxes at different positions in the front-end interface. Different output links can be matched for different text information, thereby realizing flexible selection of the output text box. In addition, in order to meet the user's viewing diversification effect, when outputting text information in the output text box, it can be implemented in a scrolling manner, that is, by adjusting the size of the words displayed in the output text box, all the text information can be scrolled up and down or left and right in sequence. In the embodiment of the present application, there is no specific limitation on the scrolling speed.
[0105] An embodiment of the present application provides a text information search method based on artificial intelligence. Compared with the prior art, the embodiment of the present application obtains a target word to be searched and determines at least one target text information matching the target word from the global text information; multiplies the first weight vector of the target word and the second weight vector of the target text information with the subject word vector respectively to obtain a first weighted subject vector and a second weighted subject vector, wherein the subject word vector is a vector content obtained by extracting multiple subject words from the global text information through a search extraction model that has completed model training; and determines the text information obtained as the search based on the similarity value between the first weighted subject vector and the second weighted subject vector, thereby expanding the search scope of the word and greatly improving the accuracy and efficiency of the word search, thereby meeting the diverse search needs of users.
[0106] Furthermore, as a response to the above Figure 1 The embodiment of the present application provides a text information search device based on artificial intelligence, such as Figure 5 As shown, the device includes:
[0107] An acquisition module 51 is configured to acquire a target word to be searched and determine at least one target text information matching the target word from the global text information;
[0108] Processing module 52, which multiplies the first weight vector of the target word, the second weight vector of the target text information, and the subject word vector respectively to obtain a first weighted subject vector and a second weighted subject vector, wherein the subject word vector is a vector content obtained by extracting multiple subject words from the global text information using a search extraction model that has completed model training;
[0109] The determination module 53 is configured to determine text information obtained through search based on a similarity value between the first weighted topic vector and the second weighted topic vector.
[0110] Furthermore, the device further comprises: an extraction module, a construction module,
[0111] The acquisition module is further used to acquire global text information, which is all text content within a search field;
[0112] The extraction module is configured to extract a keyword from the global text information based on a search extraction model for which model training has been completed, wherein the keyword includes a plurality of words;
[0113] The construction module is used to construct a topic word vector for the topic word, and the topic word vector is composed of weight values of multiple words in the global text information.
[0114] Furthermore, the extraction module is further configured to extract a first weight vector of the target word from the global text information based on a first word vector model, wherein the first weight vector is a distribution weight of the target word in the global text information;
[0115] The extraction module is further configured to extract a second weight vector of the target text information from the global text information based on a second word vector model, where the second weight vector is a distribution weight of the target text information in the global text information.
[0116] Furthermore, the acquisition module includes:
[0117] An acquiring unit, configured to acquire a preset word-text association relationship, wherein the preset word-text association relationship includes a weight mapping relationship between different words and different text information;
[0118] A searching unit is configured to search for target text information matching the target word from the preset word-text association relationship based on the matrix value of the first weight vector.
[0119] Furthermore, the determining module includes:
[0120] a processing unit, configured to perform reduction processing on the first weighted topic vector and the second weighted topic vector based on a vector reduction algorithm;
[0121] a calculation unit, configured to calculate similarity values between the first weighted topic vector and the second weighted topic vector that have completed the reduction process, and to sort the similarity values;
[0122] The determining unit is configured to determine the target text information corresponding to the similarity values whose order meets a preset number as the searched text information.
[0123] Furthermore, the device further comprises:
[0124] The retrieval module retrieves the recommended text information pre-configured in the search field and outputs it as auxiliary search text content if the calculated similarity value is less than a preset similarity threshold.
[0125] Furthermore, the device further comprises: an output module,
[0126] The extraction module is further configured to extract an output link for outputting the text information, wherein the output link is connected to an output text box pre-configured in the front-end interface;
[0127] The output module is configured to output the text information in a scrolling manner in the output text box via the output link.
[0128] An embodiment of the present application provides a text information search method based on artificial intelligence. Compared with the prior art, the embodiment of the present application obtains a target word to be searched and determines at least one target text information matching the target word from the global text information; multiplies the first weight vector of the target word and the second weight vector of the target text information with the subject word vector respectively to obtain a first weighted subject vector and a second weighted subject vector, wherein the subject word vector is a vector content obtained by extracting multiple subject words from the global text information through a search extraction model that has completed model training; and determines the text information obtained as the search based on the similarity value between the first weighted subject vector and the second weighted subject vector, thereby expanding the search scope of the word and greatly improving the accuracy and efficiency of the word search, thereby meeting the diverse search needs of users.
[0129] According to one embodiment of the present application, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer executable instruction can execute the artificial intelligence-based text information search method in any of the above method embodiments.
[0130] Figure 6 A schematic structural diagram of a computer device provided according to an embodiment of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the computer device.
[0131] like Figure 6 As shown, the computer device may include: a processor (processor) 602 , a communication interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .
[0132] The processor 602 , the communication interface 604 , and the memory 606 communicate with each other via a communication bus 608 .
[0133] The communication interface 604 is used to communicate with other devices such as clients or other servers.
[0134] The processor 602 is configured to execute the program 610 , and specifically to execute the relevant steps in the embodiment of the above-mentioned text information search method based on artificial intelligence.
[0135] Specifically, the program 610 may include program codes, which include computer operation instructions.
[0136] Processor 602 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in a computer device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0137] The memory 606 is used to store the program 610. The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0138] The program 610 may be specifically configured to enable the processor 602 to perform the following operations:
[0139] Acquire a target word to be searched, and determine at least one target text information matching the target word from the global text information;
[0140] A first weighted topic vector and a second weighted topic vector are obtained by multiplying the first weight vector of the target word, the second weight vector of the target text information, and the topic vector, respectively. The topic vector is a vector content obtained by extracting multiple topic words from the global text information using a search extraction model that has completed model training;
[0141] The text information obtained as the search result is determined based on the similarity value between the first weighted topic vector and the second weighted topic vector.
[0142] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into separate integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0143] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Persons skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A text information search method based on artificial intelligence, characterized in that: include: Acquire a target word to be searched, and determine at least one target text information matching the target word from the global text information; A first weighted topic vector and a second weighted topic vector are obtained by multiplying the first weight vector of the target word, the second weight vector of the target text information, and the topic vector, respectively. The topic vector is a vector content obtained by extracting multiple topic words from the global text information using a search extraction model that has completed model training; determining text information obtained as a result of the search based on a similarity value between the first weighted topic vector and the second weighted topic vector; Before obtaining the target word to be searched and determining at least one target text information matching the target word from the global text information, the method further includes: Obtaining global text information, wherein the global text information is all text content within a search field; Extracting a keyword from the global text information based on a search extraction model that has completed model training, where the keyword includes a plurality of words; Constructing a subject word vector for the subject word, wherein the subject word vector is composed of weight values of multiple words in the global text information; Before the first weight vector of the target word and the second weight vector of the target text information are multiplied by the subject word vector respectively, the method further includes: Extracting a first weight vector of the target word from the global text information based on a first word vector model, where the first weight vector is a distribution weight of the target word in the global text information; A second weight vector of the target text information is extracted from the global text information based on a second word vector model, where the second weight vector is a distribution weight of the target text information in the global text information.
2. The method according to claim 1, characterized in that The determining of target text information matching the target word from the global text information includes: Obtaining a preset word-text association relationship, wherein the preset word-text association relationship includes a weight mapping relationship between different words and different text information; Based on the matrix value of the first weight vector, target text information matching the target word is found from the preset word text association relationship.
3. The method according to claim 1, characterized in that The determining of the text information obtained by the search based on the similarity value between the first weighted topic vector and the second weighted topic vector includes: Performing reduction processing on the first weighted topic vector and the second weighted topic vector based on a vector reduction algorithm; Calculating similarity values between the first weighted topic vector and the second weighted topic vector after the reduction process, and sorting the similarity values; The target text information corresponding to the similarity values whose order meets the preset number is determined as the searched text information.
4. The method according to claim 3, characterized in that The method further comprises: If the calculated similarity value is less than a preset similarity threshold, the recommended text information pre-configured in the search field is retrieved and output as auxiliary search text content.
5. The method according to any one of claims 1 to 4, characterized in that After determining the text information obtained by the search based on the similarity value between the first weighted topic vector and the second weighted topic vector, the method further includes: Extracting an output link for outputting the text information, wherein the output link is connected to an output text box pre-configured in the front-end interface; The text information is output in a scrolling manner in the output text box through the output link.
6. A text information search device based on artificial intelligence, characterized in that: include: An acquisition module, configured to acquire a target word to be searched, and determine at least one target text information matching the target word from the global text information; a processing module that multiplies the first weight vector of the target word, the second weight vector of the target text information, and the subject word vector to obtain a first weighted subject vector and a second weighted subject vector, wherein the subject word vector is a vector content obtained by extracting multiple subject words from the global text information using a search extraction model that has completed model training; a determination module, configured to determine text information obtained as a result of the search based on a similarity value between the first weighted topic vector and the second weighted topic vector; The device further comprises: an extraction module, a construction module, The acquisition module is further used to acquire global text information, which is all text content within a search field; The extraction module is configured to extract a keyword from the global text information based on a search extraction model for which model training has been completed, wherein the keyword includes a plurality of words; The construction module is used to construct a subject word vector for the subject word, wherein the subject word vector is composed of weight values of multiple words in the global text information; The extraction module is further configured to extract a first weight vector of the target word from the global text information based on a first word vector model, where the first weight vector is a distribution weight of the target word in the global text information; The extraction module is further configured to extract a second weight vector of the target text information from the global text information based on a second word vector model, where the second weight vector is a distribution weight of the target text information in the global text information.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the artificial intelligence-based text information search method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the text information search method based on artificial intelligence as claimed in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Search result processing method and device
CN112347339A
System, computer-implemented method and computer program product for information retrieval
US20190370273A1