Theme determination method and device and electronic equipment
By applying phrase extraction, vectorized representation and multi-layer attention feature extraction models for treating indexed text, combined with the similarity evaluation of word vectors and semantic vectors, the problem of low topic correlation in the prior art is solved, and higher topic correlation and indexing effects are achieved.
Patent Information
- Application Number
- CN202510030190.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-04-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the refining method of document topics leads to discrete and isolated topics, low correlation, and inability to meet actual needs.
By applying phrase extraction, vectorized representation and multi-layer attention feature extraction models for the text to be cited, combined with the similarity evaluation of word vectors and semantic vectors, topics with high semantic correlation with the text to be cited are determined from candidate phrases.
It improves the correlation between topics, improves the effect of topic indexing, and meets actual needs.
Smart Images

Figure CN119849478A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a subject determination method, device, electronic device and computer-readable storage medium. Background Art
[0002] With the development of science and technology, researchers in the corresponding fields will publish relevant literature based on their research. In order to quickly obtain information from the literature, it is usually necessary to refine the subject of the literature before studying or citing the literature.
[0003] In the related art, in the process of refining the subject of a document, after extracting words from the document, the words with the highest corresponding statistical information are usually determined as the subject of the document based on statistical information such as the word frequency in the document. However, the themes determined by this method are discrete and isolated, and may have low relevance to the document itself, which cannot meet actual needs. Summary of the invention
[0004] The embodiment of the present application provides a topic determination method to solve the problem in the related art that the determined topics are discrete and isolated, have low relevance to the document itself, and cannot meet actual needs.
[0005] Correspondingly, the embodiments of the present application also provide a theme determination device, an electronic device and a computer-readable storage medium to ensure the implementation and application of the above method.
[0006] On the one hand, an embodiment of the present application provides a method for determining a topic, the method comprising: Perform phrase extraction operation on the indexed text to obtain candidate phrases; Vectorize the candidate phrases and determine the word vectors corresponding to the candidate phrases; By using the trained multi-layer attention feature extraction model, the attention feature extraction operation is performed on at least two levels of the word level, sentence level and text structure level on the text to be indexed, so as to obtain the semantic vector corresponding to the text to be indexed; According to the similarity between the word vector and the semantic vector, the topic corresponding to the text to be indexed is determined from the candidate phrases.
[0007] On the other hand, an embodiment of the present application provides a theme determination device, the device comprising: A phrase extraction module is used to perform a phrase extraction operation on the indexed text to obtain candidate phrases; A first vector determination module, used to vectorize the candidate phrase and determine the word vector corresponding to the candidate phrase; The second vector determination module is used to perform attention feature extraction operations on at least two levels of the text to be indexed, namely, the word level, the sentence level, and the text structure level, through the trained multi-layer attention feature extraction model, to obtain a semantic vector corresponding to the text to be indexed; The topic screening module is used to determine the topic corresponding to the to-be-indexed text from the candidate phrases according to the correlation evaluation result between the above word vectors and the above semantic vectors.
[0008] On the other hand, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the processor and the memory are connected to each other; The memory is used to store computer programs; The above-mentioned processor is configured to execute the subject determination method provided in the embodiment of the present application when calling the above-mentioned computer program.
[0009] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the subject determination method provided by the embodiment of the present application.
[0010] On the other hand, an embodiment of the present application provides a computer program product, which includes a computer program. When the above computer program is executed by a processor, it implements the subject determination method provided by the embodiment of the present application.
[0011] In an embodiment of the present application, a phrase extraction operation is performed on the text to be indexed to obtain candidate phrases; the candidate phrases are vectorized to represent the word vectors corresponding to the candidate phrases, and the word vectors corresponding to the candidate phrases are determined; by using a trained multi-layer attention feature extraction model, the attention feature extraction operation is performed on the text to be indexed at at least two levels, namely, the word level, the semantic level, and the text structure level, so that the semantics of the text to be indexed can be deeply extracted to obtain the semantic vector corresponding to the text to be indexed; based on the correlation evaluation result between the word vector and the semantic vector, the subject corresponding to the text to be indexed is determined from the candidate phrases; in this way, by combining the deep semantic vector of the text to be indexed and the semantic vector corresponding to the candidate phrases, the subject of the document to be indexed is screened from the candidate phrases, and a subject with a high degree of semantic association with the text to be indexed can be obtained, thereby further improving the correlation between the obtained subjects, improving the subject indexing effect, and meeting actual needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0013] Figure 1 A schematic diagram of a system architecture for implementing a method for determining a subject provided in an embodiment of the present application is shown; Figure 2 One of the flow charts of the subject determination method provided in the embodiment of the present application is shown; Figure 3 The second flowchart of the subject determination method provided in the embodiment of the present application is shown; Figure 4 The third flowchart of the subject determination method provided in the embodiment of the present application is shown; Figure 5 A fourth flowchart of the subject determination method provided in an embodiment of the present application is shown; Figure 6 A schematic diagram showing the structure of a subject determination device provided in an embodiment of the present application is shown; Figure 7 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0015] The subject of the subject determination method provided in the embodiment of the present application may be a subject determination device. The subject determination device may be any electronic device, including but not limited to a terminal or a server. The subject determination method may also be implemented by a processor calling a computer-readable instruction stored in a memory.
[0016] Figure 1 FIG. 2 shows a schematic diagram of the architecture of a theme determination system applicable to an embodiment of the present application. Figure 1 As shown, the topic determination system may include a terminal 101, an application server 102, and a training server 103, wherein the terminal 101 and the application server 102 may be directly or indirectly connected via a wired or wireless communication, which is not limited in the embodiment of the present application. The application server 102 and the training server 103 may be directly or indirectly connected via a wired or wireless communication, which is not limited in the embodiment of the present application.
[0017] See also Figure 1In the topic determination system, the training server 103 is used to train the initial neural network model according to the sample text in the training data set to obtain a trained multi-layer attention feature extraction model, and send the trained multi-layer attention feature extraction model to the application server 102. The terminal 101 can send a topic determination request to the application server 102 according to the received text to be indexed. The application server 102 deploys the multi-layer attention feature extraction model received from the training server 103, responds to the topic determination request sent by the user terminal 101, performs a phrase extraction operation on the text to be indexed, and obtains a candidate phrase; vectorizes the selected phrase to determine the word vector corresponding to the candidate phrase; performs an attention feature extraction operation on the text to be indexed at least two levels of the word level, sentence level and text structure level through the trained multi-layer attention feature extraction model to obtain the semantic vector corresponding to the text to be indexed; determines the topic corresponding to the text to be indexed from the candidate phrase according to the correlation evaluation result between the word vector of the candidate phrase and the semantic vector of the text to be indexed, and sends the determined topic to the terminal 101.
[0018] Optionally, the terminal 101 (also referred to as user equipment (UE)) may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a wearable electronic device (such as a smart watch), a vehicle-mounted terminal, a smart home appliance (such as a smart TV), an AR (Augmented Reality) / VR (Virtual Reality) device, etc., but is not limited thereto.
[0019] Optionally, the above-mentioned application server 102 and training server 103 can be independent physical servers, or a server cluster or distributed system composed of multiple physical servers. They can also be cloud servers or server clusters that provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms and other cloud computing services, but are not limited to these.
[0020] Those skilled in the art should understand that the above-mentioned terminals or servers are only examples, and other existing or future terminals or servers that are applicable to the present application should also be included in the protection scope of the present application and are included here by reference.
[0021] The subject determination method provided in the embodiment of the present application may be directly executed through the terminal 101 , or may be implemented through the interaction between the terminal 101 and the application server 102 . Figure 1The illustrated theme determination system is described by taking the example of implementing the theme determination method through the interaction between the terminal 101 and the application server 102. The following description is given by taking the example of directly executing the theme determination method through the terminal 101.
[0022] The subject refers to a standardized word or concept that can summarize the main content of the document and has certain description rules (for example, word type standard, meaning standard, synonyms, etc.). "Topic" is also called "subject concept", "subject word", "descriptive word", which is a dynamic word or phrase with a combination function that is selected from natural language and standardized based on concepts.
[0023] Subject indexing is an effective means of organizing digital resources. The quality of indexing directly affects the quality and utilization of digital resources, and is also one of the key issues that need to be addressed in knowledge-based services. Subject indexing operations can be specifically applied to data mining, automatic indexing, and scientific and technological intelligence analysis.
[0024] When conducting subject indexing (also known as word assignment indexing, vocabulary indexing, concept indexing, etc.), external resources such as post-controlled vocabulary lists (including synonyms, hyponyms, related words, etc.), thesauri, ontologies, etc. can be used to convert the automatic word assignment process into a subject concept process, or to convert the keywords of the text into subject terms or subject concepts. In this way, the search barriers caused by synonyms and near-synonyms can be eliminated, and the accuracy and efficiency of the search can be improved. At the same time, the resources such as synonyms, hyponyms, related words in the vocabulary can be used to build richer search strategies to meet different search needs. This has important significance and benefits in promoting information organization and classification, improving natural language processing performance, and reducing the cost of manual indexing.
[0025] In some embodiments, when performing subject indexing, word frequency statistics, syntactic analysis and other means can be used to select appropriate vocabulary phrases from the text to be indexed as the subject of indexing. The basic process is: candidate term extraction, standard concept mapping and concept selection. In the candidate term extraction step, at least one of the following word extraction techniques may be used to extract candidate terms from the text to be indexed to obtain candidate terms. The word extraction techniques include but are not limited to: methods based on statistical learning, methods based on language analysis, hybrid methods based on statistics and language analysis, methods based on machine learning and artificial intelligence, etc.
[0026] In the standard concept mapping step, standard concept mapping can be performed based on the vocabulary. Optionally, the prototype of the candidate term can be determined; the prototype of the candidate term is matched with the prototype of the standard term in the vocabulary to determine the standard term corresponding to the candidate term; according to the correspondence between the terms and concepts established in the vocabulary, the mapping of the standard term to the standard concept is realized to obtain the standard concept set.
[0027] In the concept selection step, the weight corresponding to each candidate term (i.e., the weight of the standard concept corresponding to the candidate term) can be calculated based on statistical features and linguistic rules such as the source location of the term, the frequency of the candidate term in the text to be indexed (i.e., the extraction frequency of the candidate term); the strength of the association between the candidate concept and the text to be indexed can be determined based on the weight of the standard concept; and the concept words that are ultimately used to index the text to be indexed, i.e., the subject concept, can be determined from the candidate concepts by setting weight thresholds, indexing depth thresholds, etc. In addition, before determining the subject concept, concepts with low association strength in the candidate concepts can be pre-filtered through banned word lists, common word lists, etc., to reduce the impact of noise such as common concepts on the indexing results.
[0028] However, in the above concept selection steps, some concepts that are weakly related to the text subject content or even irrelevant may be determined as the main concept. The indexed subject concepts lack the quality control means at the semantic level. When text retrieval is performed based on the indexed subject, the recall rate and precision rate of the text retrieval are affected, as well as the utilization rate and effective dissemination of the indexed text. In addition, based on the current subject indexing mechanism, subject indexing is mainly performed for a single language, and cross-language subject indexing is not possible. In addition, the indexed subject concepts are discrete and isolated, lacking semantic associations.
[0029] In summary, how to solve the cross-language subject indexing method and how to further improve the semantic relevance between the indexing results and the text to be indexed, and improve the quality of subject indexing, have become technical problems that need to be solved urgently in this field.
[0030] In view of one or more of the above problems, the present application provides a method for determining a topic. Through the topic indexing method provided in the present application, cross-language topic indexing can be achieved, and new technologies such as natural language processing and deep learning can be used based on the knowledge organization system to further improve the semantic relevance between the indexing results and the text to be indexed, thereby improving the quality of topic indexing.
[0031] Specifically, see Figure 2 , the topic determination method includes: Step 201: perform phrase extraction operation on the text to be indexed to obtain candidate phrases.
[0032] Optionally, the texts to be indexed can be divided into books, journals, reports, patent documents, etc. according to the publication form of the texts; the texts to be indexed can be divided into literary texts, scientific texts, news texts, legal texts, etc. according to the fields of the texts, which are not limited in the present embodiment of the application. For example, the texts to be indexed can be scientific documents.
[0033] Optionally, when performing a phrase extraction operation on the text to be indexed, the phrase extraction operation can be performed on the entire text in the text to be indexed, or on a portion of the text in the text to be indexed, and the embodiment of the present application does not limit this. When performing a phrase extraction operation on a portion of the text to be indexed, compared with performing a phrase extraction operation on the entire text in the text to be indexed, the operation time required is shorter.
[0034] Optionally, based on the different text structures of the text to be indexed, the text information corresponding to the text to be indexed can be selected according to the text structure of the text to be indexed (for example, the title, abstract, keywords, introduction, body, etc. of the text to be indexed), and the phrase extraction operation is performed on the selected text. Optionally, when determining the text information of the text to be indexed, the necessary text information of the text to be indexed and the optional text information of the text to be indexed can also be determined based on the importance of the text information contained in the different text structures of the text to be indexed, so as to improve the extraction speed of the phrase extraction operation while taking into account the effectiveness of the phrase extraction.
[0035] It should be understood that the richer the types of text information of the text to be indexed, the more accurate the final indexed subject will be.
[0036] For example, taking the text to be indexed as a document as an example, the title, abstract, keywords, language information, classification number, and technical field of the text to be indexed can be selected as the text information of the text to be indexed, and the title and abstract of the text to be indexed are determined as necessary text information, and the keywords, language information, classification number, and technical field of the text to be indexed are determined as optional text information. The language information of the text to be indexed can include the language field in the text to be indexed.
[0037] Optionally, when performing a phrase extraction operation on the text to be indexed, the phrase extraction operation may be performed based on linguistic rules, dictionaries, and statistical information.
[0038] In some embodiments, in order to improve the standardization and application generalization of the extracted candidate phrases (for example, the generalization of the references of the to-be-indexed text), the candidate phrases may also be mapped to standard concepts.
[0039] Optionally, the candidate phrases can be mapped to standardized concepts based on existing authoritative knowledge organization tools (e.g., "Super English Science and Technology Word List (STKOS, Science and Technology Knowledge Organization System, a word list for English scientific and technological literature information organization and retrieval)", "Chinese Thesaurus", etc.). Specifically, First, the candidate phrases are prototyped (wherein, for English literature, the prototype transformation methods may include but are not limited to tense prototype, voice prototype and number prototype, for example, prototyping the past tense into the present tense, prototyping the plural into the singular, etc.), and the prototypes of the candidate phrases are matched with the standard term prototypes in the authoritative knowledge organization tool (including but not limited to string-based exact matching and fuzzy matching) to obtain the standard term corresponding to the candidate phrase.
[0040] Then, according to the established correspondence between terms and concepts in the authoritative knowledge organization tool, the standard terms are mapped to standard concepts (i.e., candidate concepts) to obtain the standard concept set corresponding to the text to be indexed.
[0041] In some embodiments, for some candidate phrases, their corresponding candidate concepts may be the same, and by determining the candidate concepts, it is also possible to remove duplicate candidate phrases.
[0042] Step 202: vectorize the candidate phrase to determine the word vector corresponding to the candidate phrase.
[0043] Optionally, a neural network language model based on deep learning can be used to vectorize the candidate phrases.
[0044] It is understandable that, referring to the above, the candidate phrase may be mapped to the candidate concept. Therefore, when the candidate phrase is mapped to the candidate concept, the candidate concept can be directly vectorized and the determined word vector can be used as the word vector corresponding to the candidate phrase.
[0045] Step 203, using the trained multi-layer attention feature extraction model, performs attention feature extraction operations on at least two levels of the word level, sentence level and text structure level on the text to be indexed, and obtains a semantic vector corresponding to the text to be indexed.
[0046] Optionally, attention features are extracted at the word level for the text to be indexed, that is, attention features are extracted for each word in the text to be indexed; attention features are extracted at the sentence level for the text to be indexed, that is, attention features are extracted for each sentence in the text to be indexed; attention features are extracted at the text structure level for the text to be indexed, that is, in combination with the text structure of the text to be indexed, attention features are extracted for each part of the text to be indexed corresponding to the text structure.
[0047] Optionally, the text structure of the text to be indexed includes title, abstract, keywords, introduction, review, research methods, research results, discussion, conclusion, references, etc. When semantically expressing the text to be indexed, a multi-layer attention feature extraction model, i.e., a text semantic expression model, can be constructed based on the characteristics of the text structure of the text to be indexed.
[0048] When determining the semantic vector corresponding to the text to be indexed through the trained multi-layer attention feature extraction model, we can consider the importance of words, sentences and the importance of the hierarchical structure of the text structure itself, perform attention weighting at three levels, and combine the importance of the different granularities of the content of the text to be indexed and the different structures of the text to be indexed to achieve semantic expression of the text to be indexed.
[0049] Step 204: Determine the topic corresponding to the text to be indexed from the candidate phrases according to the correlation evaluation result between the word vector and the semantic vector.
[0050] Optionally, the subject corresponding to the text to be indexed may also be referred to as a "subject concept", "subject word", "descriptive word", etc., which is not limited in the embodiments of the present application.
[0051] Optionally, the correlation between the candidate phrase and the text to be indexed can be evaluated based on the similarity between the word vector corresponding to the candidate phrase and the semantic vector corresponding to the text to be indexed, and based on the correlation evaluation result, the topic corresponding to the text to be indexed is determined from the candidate phrase.
[0052] It can be understood that, referring to the above, the candidate phrases may be mapped to candidate concepts. Therefore, when the candidate phrases are mapped to candidate concepts, the correlation between the candidate phrases and the text to be indexed can be evaluated based on the similarity between the word vector corresponding to the candidate concept and the semantic vector corresponding to the text to be indexed.
[0053] Optionally, based on the correlation evaluation result between the word vector corresponding to the candidate phrase and the semantic vector corresponding to the text to be indexed, the candidate phrases can be sorted according to the correlation between the candidate phrases and the text to be indexed, and the candidate phrases with the highest ranking can be determined as the topic of the text to be indexed.
[0054] In an embodiment of the present application, deep semantic extraction of the text to be indexed can be achieved, and the deep semantic vector of the text to be indexed and the semantic vector corresponding to the candidate phrases can be combined to screen the subject of the text to be indexed from the candidate phrases, so that subjects with a high degree of semantic association with the text to be indexed can be obtained, and the correlation between the obtained subjects can be further improved, thereby improving the subject indexing effect and meeting actual needs.
[0055] In some embodiments, the above-mentioned phrase extraction operation on the text to be indexed to obtain candidate phrases may include: Determining the language of the text to be indexed according to the language information of the text to be indexed and / or a preset language determination method; According to the phrase extraction rules corresponding to the above languages, a phrase extraction operation is performed on the indexed text to obtain candidate phrases.
[0056] Optionally, the language information of the text to be indexed may include a language field of the text to be indexed, and the language field may include a source data identifier, source information, a document identifier, etc. Different languages correspond to different language fields, and the language of the text to be indexed can be determined based on the language field of the text to be indexed.
[0057] Optionally, the preset language determination method may include, but is not limited to, a language recognition algorithm, by which the text to be indexed is recognized to determine the language of the text to be indexed.
[0058] Optionally, candidate phrases may be extracted from the text to be indexed based on linguistic rules and dictionaries. The first phrase may be extracted from the text to be indexed in combination with the language of the text to be indexed (for example, when the text to be indexed is a scientific document, the first phrase may be a candidate phrase representing a scientific knowledge object).
[0059] Among them, when the text to be indexed is an English text (that is, the language of the text to be indexed is English), noun phrases and indefinite repetitive phrases (that is, phrases that appear repeatedly at irregular intervals in the text to be indexed) in the text to be indexed are extracted; when the text to be indexed is a Chinese text (that is, the language of the text to be indexed is Chinese), n-grams (for example, CLM, Chinese Language Model) are used to perform phrase extraction operations in the text to be indexed.
[0060] Optionally, after extracting the first phrase from the text to be indexed based on the language of the text to be indexed, the candidate phrases can be screened from the first phrase in combination with linguistic rules and statistical information (for example, phrase position, phrase length, TF-IDF (term frequency–inverse document frequency, a commonly used weighting technology for information retrieval and data mining. TF is term frequency, IDF is inverse document frequency), etc.). The screened candidate phrases need to meet at least one of the following conditions: Condition 1: There are no more than 6 tokens (words) in the phrase; Condition 2: The phrase cannot exceed 18 characters; Condition 3: The number of function words in a phrase cannot exceed the preset number of function words (for example, the preset number of function words can be 1); among them, function words can include four categories: prepositions, conjunctions, auxiliary words, and interjections. For example, function words can include since, because of, about, and, or, if, only, of, ah, etc.; Condition 4: The phrase needs to comply with the phrase rules. The phrase rules may include, but are not limited to: the first and last words in the phrase (i.e., the first and last words in the phrase) cannot be function words or stop words; the end of the phrase cannot be a verb, etc. For example, when using step (1) to extract phrases from the sentence "Use minimally invasive concepts to improve the pterional surgical approach and reduce the trauma of aneurysm surgery", if the first phrase extracted is "with minimally invasive", when candidate phrases are screened in combination with the phrase rules, it can be determined that "with" in the first phrase is a function word and "with minimally invasive" is a verb, which does not comply with the phrase rules. Therefore, "with minimally invasive" cannot be used as a candidate phrase.
[0061] Condition 5: The number of stop words in a phrase cannot exceed the preset number of stop words (for example, the preset number of stop words can be 1); Condition 6: Phrases need to meet actual requirements. For example, according to actual requirements, it can be set that the phrase does not contain impurity symbols, and the phrase does not contain words that do not meet actual requirements. If impurity symbols and words that do not meet actual requirements appear, they should be deleted. For example, when using step (1) to extract phrases from the sentence "The author used 10^-5mol / L all-trans retinoic acid to induce human lung adenocarcinoma cells...", if the first phrase extracted is "10^-5mol / L", if the quantity of the substance is set as an impurity symbol, "10^-5mol / L" cannot be used as a candidate phrase.
[0062] In an embodiment of the present application, by determining the language of the text to be indexed, adopting the phrase extraction rules corresponding to the language of the text to be indexed, performing phrase extraction operations on the text to be indexed, and obtaining candidate phrases, cross-language candidate phrase extraction can be achieved, thereby paving the way for subsequent cross-language subject indexing operations.
[0063] In some embodiments, the vectorization of the candidate phrases and determination of the word vectors corresponding to the candidate phrases may include: Performing semantic expansion operations on candidate phrases to determine a candidate phrase set; wherein the candidate phrase set may include: at least one of the candidate phrase, a synonym of the candidate phrase, and a near synonym of the candidate phrase; Perform feature extraction of at least one dimension on each phrase in the candidate phrase set to obtain a phrase vector corresponding to each phrase in the candidate phrase set; Pooling operation is performed on the phrase vectors corresponding to all phrases in the candidate phrase set to obtain the above word vectors.
[0064] Optionally, a standard concept library of an authoritative knowledge organization tool may be used to semantically expand the candidate phrases and determine a set of candidate phrases.
[0065] Optionally, as mentioned above, after determining the candidate concepts corresponding to the candidate phrases, the candidate phrase set may include: the candidate concepts and their corresponding expanded concepts.
[0066] Optionally, a trained word vector model may be used to vectorize each phrase in the candidate phrase set. When vectorizing each phrase in the candidate phrase set (i.e., extracting features of at least one dimension for each phrase in the candidate phrase set to obtain a phrase vector corresponding to each phrase in the candidate phrase set; and performing a pooling operation on the phrase vectors corresponding to all phrases in the candidate phrase set to obtain the above-mentioned word vector), the following may be included: By referring to the pooling operation in deep neural networks, the value of the candidate phrase in each dimension is determined; according to the value of the candidate phrase in each dimension, the word vector corresponding to the candidate phrase is obtained.
[0067] Formula (1) in, , is the candidate phrase itself, Candidate phrases A collection of synonyms and antonyms of Candidate phrases Synonyms or near synonyms of Candidate phrases The total number of synonyms and near-synonyms of .
[0068] In the candidate phrase When performing semantic vectorization, we can refer to the pooling operation in deep neural networks to determine the feature values of candidate phrases in each dimension. In this way, the word vector corresponding to the candidate phrase The feature value in each dimension is the value of the candidate phrase The corresponding word vector and candidate phrase All synonyms and antonyms of The value of the corresponding word vector after pooling operation.
[0069] Optionally, in order to more clearly and detailedly represent the word vector corresponding to the candidate phrase , the semantics of the candidate phrases can be better described and revealed. The average pooling method can be used to obtain the word vector corresponding to the final synthesized candidate phrase , as shown in formula (1). Represents the candidate phrases obtained from the word vector space The word vector itself, Represents candidate phrases Synonyms or near synonyms of The word vector itself.
[0070] Optionally, the neural network model may be trained in advance using sample phrases in the sample text to obtain a trained word vector model (for example, the above formula (1)), so that the word vector corresponding to the input phrase can be output through the word vector model, and the word vector can realize the semantic expression of the phrase.
[0071] In an embodiment of the present application, by considering synonyms, near-synonyms, etc. of candidate phrases when vectorizing candidate phrases, the meaning of the candidate phrases can be made clearer, and a higher-level, generalized semantic expression can be made for the candidate phrases, thereby enhancing the universality of the vectorized representation of the phrases, and being able to be generalized and applied to different texts, so that the candidate phrases after vectorization have better semantic performance; avoiding the situation in which the different words used by different authors to express phrases with the same meaning in the process of text creation (i.e., the semantic similarity expression of multiple words with the same meaning) cannot be accurately identified, and different words corresponding to the same meaning are regarded as words with different meanings.
[0072] In some embodiments, the above-mentioned attention feature extraction operation is performed on at least two levels of the word level, sentence level and text structure level on the text to be indexed to obtain the semantic vector corresponding to the text to be indexed, which may include: Perform attention feature extraction on the words in the text to be indexed to obtain the first vector corresponding to the word; The first vectors corresponding to all words in each sentence of the indexed text are summed to obtain the second vector corresponding to the sentence; all the second vectors are weighted averaged according to the weight value corresponding to the position information of each sentence in the paragraph to which it belongs to obtain the third vector; According to the weight value corresponding to the text structure, at least one of the first vector, the second vector and the third vector corresponding to different text structures is weighted averaged to obtain the above semantic vector.
[0073] Optionally, a weight value corresponding to the position information of each sentence in the to-be-indexed text in the corresponding paragraph may be set according to actual needs.
[0074] Optionally, referring to the above description of text structure, the text structure of the text to be indexed includes title, abstract, keywords, introduction, review, research methods, research results, discussion, conclusion, references, etc.
[0075] Different text structures of the text to be indexed may only include words, sentences or paragraphs. Therefore, after determining the first vector corresponding to each word in the text to be indexed, the second vector corresponding to each sentence in the text to be indexed, and the third vector corresponding to each paragraph in the text to be indexed, the text structure of the text to be indexed can be combined, and the vector corresponding to the largest text unit (paragraph> sentence> word) corresponding to the text structure can be used as the vector corresponding to the text structure. In combination with the weight values corresponding to different text structures, the vectors corresponding to each text structure are weighted averaged to obtain the semantic vector of the text to be indexed.
[0076] Optionally, it should be understood that when determining the vector corresponding to the text structure, the largest text unit corresponding to the text structure may be used as a unit, and all vectors corresponding to the unit and the text structure may be summed to obtain the vector corresponding to the text structure.
[0077] As an example, assuming that the text to be indexed includes a title, abstract, and keywords, the multi-layer attention feature extraction model includes three levels of attention weighting, which respectively considers the importance of words, sentences, and the importance of the hierarchical structure of the text itself, and combines the importance of the content of different granularities and the different structures of the text to achieve semantic expression of text information. Specifically, the following steps can be divided into: (1) Word Attention Weighting Optionally, TF-IDF technology can be used to extract attention features for each word (token) in the indexed text and determine the word vector of each word (token) Among them, the total number of words in the text information is , that is .
[0078] (2) Sentence Attention Weighting Treat the word vector corresponding to each word in the indexed text title Perform context feature extraction to obtain the vector corresponding to the title of the text to be indexed .
[0079] Since the form and ideas of text summaries are relatively fixed, they generally include the background significance of text research, text research methods, and text research conclusions. They briefly explain what the text studies, why the text studies the problem, the solutions and ideas proposed for the problem, and the findings and conclusions of the research. From a semantic level, the contribution of each part of the text summary to the theme of the text is different.
[0080] In order to better determine the weight corresponding to the summary of the text to be indexed, the functional semantics of each sentence in the summary of the text to be indexed can be used to segment the sentences in the summary of the text to be indexed, and different weights can be assigned to different functional semantics. The specific examples are as follows:
[0081] in, is the number of sentences in the text summary to be indexed, For the The sentence is represented by a vector weighted by word attention. The word vector corresponding to each word in the research background and meaning sentence in the abstract (usually the first sentence in the abstract) Context feature extraction is performed to obtain the sentence vector corresponding to the research background and the meaningful sentence. The word vector corresponding to each word in the research method process sentence in the abstract (usually the middle sentence in the abstract) Perform context feature extraction to obtain the sentence vector corresponding to the research method process sentence. The word vector corresponding to each word in the research conclusion sentence in the abstract (usually the last sentence in the abstract) Context feature extraction is performed to obtain the sentence vector corresponding to the research conclusion sentence. Among them, expert opinions and experience values can be combined to determine , and The weights of are 2, 1 and 2, respectively. , and Perform weighted averaging to obtain the weighted results of attention of text information at the sentence level .
[0082] (3) Text structure attention weighting Optionally, considering that the three levels of title, abstract, and keywords have different emphases in content expression (for example, the title can usually express the text theme most succinctly, the abstract usually elaborates the main information of the research in more detail, and the keywords are usually words given by the author of the text to reflect the core content and theme of the text), different levels have different importance in representing the text theme, and attention weighting can be performed on these three structures separately.
[0083] The word vector corresponding to each keyword in the text keyword Add and get the vector corresponding to the text keyword .
[0084] Optionally, the weights of these three structures can be determined by combining expert opinions and experience. , and They are 2 (corresponding to the title), 1 (corresponding to the abstract) and 2 (corresponding to the keyword), so as to perform weighted average on the vectors corresponding to the title, abstract and keyword respectively to obtain the semantic vector of the text information , as follows:
[0085] In an embodiment of the present application, by performing attention feature extraction operations on at least two levels of the text to be indexed, namely, the word level, the sentence level, and the text structure level, a semantic vector corresponding to the text to be indexed is obtained, thereby achieving deep semantic extraction of the text to be indexed.
[0086] In some embodiments, the determining of the topic corresponding to the to-be-indexed text from the candidate phrases according to the correlation evaluation result between the word vector and the semantic vector may include: Determine a phrase weight value corresponding to the candidate phrase according to at least one of position information, linguistic rule information, and statistical information of the candidate phrase in the text to be indexed; According to the similarity between the word vector and the semantic vector, the semantic weight value corresponding to the candidate phrase is determined; According to the sum of the phrase weight value and the semantic weight value, the candidate phrases are sorted by weight value, and the obtained weight value sorting result is determined as the above-mentioned relevance evaluation result; According to the weight value sorting results, the subject corresponding to the text to be indexed is determined.
[0087] Optionally, the weight value corresponding to each item of the candidate phrase can be determined based on at least one of the position information, linguistic rule information and statistical information of the candidate phrase in the text to be indexed, and the product of all weight values can be determined as the phrase weight value corresponding to the candidate phrase.
[0088] Optionally, the cosine similarity between the word vector and the semantic vector may be used to evaluate the correlation between the word vector and the semantic vector, and the cosine similarity may be determined as the similarity between the word vector and the semantic vector.
[0089] As an example, suppose the text to be indexed is D, and the semantic vector corresponding to the text to be indexed D is , the candidate phrase set corresponding to the text to be indexed D is C=( ),in, is the number of candidate phrases in the candidate phrase set, each candidate phrase The corresponding word vector is , then the word vector corresponding to the candidate phrase The semantic vector corresponding to the text D to be indexed The similarity between It can be expressed as: Formula (2) in, represents the dimension of the vector, express In the The value under the dimension, express In the The value under the dimension.
[0090] Optionally, when determining the subject corresponding to the text to be indexed according to the weight value sorting results, the subject of the text to be indexed can be determined by screening from the weight value sorting results according to a preset subject determination rule.
[0091] Optionally, a preset topic determination rule may be set according to actual needs, and the present application embodiment does not limit this. For example, the preset topic determination rule may include but is not limited to: determining candidate phrases with weights greater than or equal to a preset value (also referred to as a semantic relevance threshold) as the topic of the text to be indexed; determining a set number (for example, the set number may be 3) of candidate phrases with larger weights as the topic of the text to be indexed; ...
[0092] In an embodiment of the present application, the deep semantic vector of the text to be indexed and the semantic vector corresponding to the candidate phrases can be combined to screen the topics of the text to be indexed from the candidate phrases, so as to obtain topics with a high degree of semantic relevance to the text to be indexed, further improve the correlation between the obtained topics, improve the topic indexing effect, and meet actual needs.
[0093] In some embodiments, determining the semantic weight value corresponding to the candidate phrase according to the similarity between the word vector and the semantic vector may include: The above similarity is weighted according to a preset semantic weight factor to obtain the above semantic weight value.
[0094] Optionally, the importance of the semantics of the text to be indexed to determining the subject of the text to be indexed may be determined according to actual needs, and a preset semantic weight factor may be set according to the importance.
[0095] Optionally, continue with the above example and assume that the phrase weight value corresponding to the candidate phrase is , the similarity between word vector and semantic vector is , the semantic weight value corresponding to the determined candidate phrase can be expressed as: Formula (3) In an embodiment of the present application, the importance of the semantics of the text to be indexed determined according to actual needs to determine the subject of the text to be indexed can be combined with the deep semantic vector of the text to be indexed and the semantic vector corresponding to the candidate phrases, and the subject of the text to be indexed can be screened from the candidate phrases. This can obtain subjects with a high degree of semantic association with the text to be indexed, further improve the correlation between the obtained subjects, improve the subject indexing effect, and meet actual needs.
[0096] In some embodiments, determining the phrase weight value corresponding to the candidate phrase according to at least one of the position information, linguistic rule information, and statistical information of the candidate phrase in the text to be indexed may include: According to the statistical information of each word in the candidate phrase in the text to be indexed, the statistical weight value corresponding to each word is determined; the statistical weight values corresponding to all words in the candidate phrase are summed up to obtain the statistical weight value of the candidate phrase; According to the part-of-speech information of each word in the candidate phrase, determine the part-of-speech weight value corresponding to each word; sum the part-of-speech weight values corresponding to all words in the candidate phrase to obtain the part-of-speech weight of the candidate phrase; Determining a length weight value of the candidate phrase according to the length information of the candidate phrase; Determine the position weight value of the candidate phrase according to the position information of the candidate phrase in the text to be indexed; The product of the statistical weight value, the part-of-speech weight value, the length weight value and the position weight value of the candidate phrase is determined as the above phrase weight value.
[0097] Optionally, TF-IDF technology can be used to determine the statistical information of each word (token) in the candidate phrase in the text to be indexed, and then determine the statistical weight of each token in the candidate phrase, and the cumulative sum of the statistical weights of each token in the candidate phrase is determined as the statistical weight value (i.e., basic weight) corresponding to the candidate phrase.
[0098] Optionally, in combination with the phrase part-of-speech combination weight dictionary, the part-of-speech weight value corresponding to each word in the candidate phrase is determined according to the part-of-speech information of each word; and the cumulative sum of the part-of-speech weight values corresponding to all words in the candidate phrase is determined as the part-of-speech weight of the candidate phrase.
[0099] Optionally, a length weight corresponding to the candidate phrase is determined according to the number of tokens and the number of chars in the candidate phrase.
[0100] Optionally, a position weight corresponding to the candidate phrase is determined according to position information of the candidate phrase in the text to be indexed (for example, the position information may include but is not limited to title, ABS (the first sentence of the abstract), ABM (amiddle sentence in the abstract), KW (key word), etc.).
[0101] Optionally, the phrase weight w_ph of the candidate phrase = (basic weight × part-of-speech weight × length weight × position weight), which realizes the dynamic weighted representation of the word vector of the candidate phrase.
[0102] Optionally, when determining the phrase weight of a candidate phrase, the token, char, etc. in the candidate phrase are all information before prototype, that is, the phrase weight of the candidate phrase is the phrase weight corresponding to the "original text" of the text to be indexed.
[0103] Optionally, as mentioned above, in some embodiments, for some candidate phrases, their corresponding candidate concepts may be the same, and when screening the subject of the text to be indexed from the candidate concepts, the same candidate concept cannot participate in multiple screenings at the same time. Therefore, the phrase weights of multiple candidate phrases corresponding to the same candidate concept can be summed up to obtain the weight corresponding to the candidate concept (as shown in formula (4)), and the weight of the candidate concept is used to screen the subject of the text to be indexed from the candidate concepts.
[0104] Formula (4) in, is the weight of the candidate concept, n is the number of candidate phrases corresponding to the candidate concept, is the phrase weight of a candidate term corresponding to the candidate concept.
[0105] The following takes the text to be indexed as the document to be indexed, specifically the scientific document to be indexed, and takes the example of indexing the topic that is close to the content of the article from the scientific document to illustrate the topic determination method provided in the embodiment of the present application. Figure 3 , the topic determination method includes: S10, obtaining document information of the document to be indexed.
[0106] The document information may include, but is not limited to, the document title, document abstract, document keywords, document language information, document classification number, technical field to which the document belongs, etc. Optionally, the document title and document abstract of the document to be indexed are required information, and the document keywords, document language information, document classification number, technical field to which the document belongs, etc. of the document to be indexed are optional information.
[0107] S20, preprocessing the document information of the document to be indexed.
[0108] The language of the document to be indexed can be determined, and the document information of the document to be indexed can be preprocessed using a document preprocessing method corresponding to the language. Specifically, the following steps may be included: 1. Determine the language of the document to be indexed.
[0109] 2. Use the document preprocessing method corresponding to the language to preprocess the document information of the document to be indexed.
[0110] S30, extracting candidate phrases from the document information of the document to be indexed based on linguistic rules, dictionaries, and statistical information.
[0111] S40, based on the existing authoritative knowledge organization tools, the candidate terms are mapped to the standard concepts: the candidate phrases are converted into prototypes, and the prototypes of the candidate phrases are matched with the standard term prototypes in the authoritative knowledge organization tools to obtain the standard terms corresponding to the candidate phrases; based on the established correspondence between terms and concepts in the authoritative knowledge organization tools, the standard terms are mapped to standard concepts (i.e., candidate concepts) to obtain the standard concept set corresponding to the document to be indexed.
[0112] S50, using a neural network language model based on deep learning, vectorizes the document information of the candidate concepts and the documents to be indexed, and then evaluates the semantic relevance between the candidate concepts and the documents to be indexed.
[0113] See also Figure 4 , S50 may include the following steps: S501, semantically vectorize the candidate concept and determine the word vector corresponding to the candidate concept.
[0114] S502, semantically express the document information of the document to be indexed through a multi-layer attention weighted document semantic expression model to obtain a semantic vector corresponding to the document to be indexed.
[0115] Among them, see Figure 5 , S502 may include the following steps: S5021, perform word attention weighting on each word in the indexed document.
[0116] S5022, perform sentence attention weighting on each sentence in the indexed document.
[0117] S5023: Perform text structure attention weighting for each text structure of the document to be indexed.
[0118] S503, evaluating the correlation between the word vector corresponding to each candidate concept and the semantic vector corresponding to the document information of the document to be indexed.
[0119] Step 60, sorting and selecting the candidate concepts according to the weights of the candidate concepts and the correlation between the word vector corresponding to each candidate concept and the semantic vector corresponding to the document information of the document to be indexed, and determining the subject concept corresponding to the document to be indexed. Specifically, the following steps may be included: (1) Determine the phrase weight w_ph corresponding to the candidate phrase = (basic weight × part-of-speech weight × length weight × position weight).
[0120] (2) Determine the first weight of each candidate concept. The first weight of the candidate concept can be determined by summing the phrase weights of all candidate phrases corresponding to the candidate concept. .
[0121] (3) Determine the second weight corresponding to each candidate concept based on the first weight corresponding to each candidate concept and the similarity between the word vector corresponding to the candidate concept and the semantic vector corresponding to the document information of the document to be indexed. , which can also be called the topic semantic strength weight.
[0122] (4) Sort the second weights of the candidate concepts, sort and select the candidate concepts according to the preset subject concept determination rules, and determine the candidate concepts with larger second weights as the subject concepts corresponding to the documents to be indexed.
[0123] In the embodiment of the present application, by considering the subject semantic relevance of each candidate concept to the document to be indexed, the subject concept is selected from the candidate concepts, which can be selected semantically, thereby enhancing the global semantic control ability and the indexing accuracy of the subject concept.
[0124] Based on the same principle as the theme determination method provided in the embodiment of the present application, a theme determination device is also provided in the embodiment of the present application.
[0125] See also Figure 6 , Figure 6 60 is a schematic diagram of the structure of the theme determination device provided in the embodiment of the present application. The theme determination device 60 provided in the embodiment of the present application may include: A phrase extraction module 601 is used to perform a phrase extraction operation on the indexed text to obtain candidate phrases; A first vector determination module 602, used to vectorize the candidate phrase and determine the word vector corresponding to the candidate phrase; The second vector determination module 603 is used to perform attention feature extraction operations on at least two levels of the word level, sentence level and text structure level on the text to be indexed through the trained multi-layer attention feature extraction model to obtain a semantic vector corresponding to the text to be indexed; The topic screening module 604 is used to determine the topic corresponding to the to-be-indexed text from the candidate phrases according to the correlation evaluation result between the above word vectors and the above semantic vectors.
[0126] In some embodiments, the second vector determination module 603 performs an attention feature extraction operation on the text to be indexed at at least two levels of word level, sentence level and text structure level to obtain a semantic vector corresponding to the text to be indexed, which may include: Perform attention feature extraction on the words in the text to be indexed to obtain the first vector corresponding to the word; The first vectors corresponding to all words in each sentence of the indexed text are summed to obtain the second vector corresponding to the sentence; all the second vectors are weighted averaged according to the weight value corresponding to the position information of each sentence in the paragraph to which it belongs to obtain the third vector; According to the weight value corresponding to the text structure, at least one of the first vector, the second vector and the third vector corresponding to different text structures is weighted averaged to obtain the above semantic vector.
[0127] In some embodiments, the topic screening module 604 determines the topic corresponding to the to-be-indexed text from the candidate phrases according to the correlation evaluation result between the word vector and the semantic vector, which may include: Determine a phrase weight value corresponding to the candidate phrase according to at least one of position information, linguistic rule information, and statistical information of the candidate phrase in the text to be indexed; According to the similarity between the word vector and the semantic vector, the semantic weight value corresponding to the candidate phrase is determined; According to the sum of the phrase weight value and the semantic weight value, the candidate phrases are sorted by weight value, and the obtained weight value sorting result is determined as the above-mentioned relevance evaluation result; According to the weight value sorting results, the subject corresponding to the text to be indexed is determined.
[0128] In some embodiments, the topic screening module 604 determines the phrase weight value corresponding to the candidate phrase according to at least one of the position information, linguistic rule information and statistical information of the candidate phrase in the text to be indexed, which may include: According to the statistical information of each word in the candidate phrase in the text to be indexed, the statistical weight value corresponding to each word is determined; the statistical weight values corresponding to all words in the candidate phrase are summed up to obtain the statistical weight value of the candidate phrase; According to the part-of-speech information of each word in the candidate phrase, determine the part-of-speech weight value corresponding to each word; sum the part-of-speech weight values corresponding to all words in the candidate phrase to obtain the part-of-speech weight of the candidate phrase; Determining a length weight value of the candidate phrase according to the length information of the candidate phrase; Determine the position weight value of the candidate phrase according to the position information of the candidate phrase in the text to be indexed; The product of the statistical weight value, the part-of-speech weight value, the length weight value and the position weight value of the candidate phrase is determined as the above phrase weight value.
[0129] In some embodiments, the topic screening module 604 determines the semantic weight value corresponding to the candidate phrase according to the similarity between the word vector and the semantic vector, which may include: The above similarity is weighted according to a preset semantic weight factor to obtain the above semantic weight value.
[0130] In some embodiments, the first vector determination module 602 vectorizes the candidate phrase to determine the word vector corresponding to the candidate phrase, which may include: Performing semantic expansion operations on candidate phrases to determine a candidate phrase set; wherein the candidate phrase set may include: at least one of the candidate phrase, a synonym of the candidate phrase, and a near synonym of the candidate phrase; Perform feature extraction of at least one dimension on each phrase in the candidate phrase set to obtain a phrase vector corresponding to each phrase in the candidate phrase set; Pooling operation is performed on the phrase vectors corresponding to all phrases in the candidate phrase set to obtain the above word vectors.
[0131] In some embodiments, the phrase extraction module 601 performs a phrase extraction operation on the indexed text to obtain candidate phrases, which may include: Determining the language of the text to be indexed according to the language information of the text to be indexed and / or a preset language determination method; According to the phrase extraction rules corresponding to the above languages, a phrase extraction operation is performed on the indexed text to obtain candidate phrases.
[0132] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.
[0133] Based on the same principles as the methods and devices provided in the embodiments of the present application, an electronic device (such as a server) is also provided in the embodiments of the present application. The electronic device may include a memory, a processor, and a computer program stored in the memory. The processor executes the above-mentioned computer program to implement the method provided in any optional embodiment of the present application.
[0134] See also Figure 7 , Figure 7 FIG. 1 shows a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device 700 in this embodiment may include: a processor 701, a network interface 704 and a memory 705. In addition, the above-mentioned electronic device 700 may also include: an object interface 703, and at least one bus 702. Among them, the bus 702 is used to realize the connection and communication between these components. Among them, the object interface 703 may include a display screen (Display), a keyboard (Keyboard), and the object interface 703 may optionally include a standard wired interface and a wireless interface. The network interface 704 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 705 may be a high-speed RAM memory, or it may be a non-volatile memory (NVM), such as at least one disk storage. The memory 705 may optionally also be at least one storage device located away from the aforementioned processor 701. As Figure 7 As shown, the memory 705 as a computer-readable storage medium may include an operating system, a network communication module, an object interface module, and a device control application program.
[0135] exist Figure 7 In the electronic device 700 shown, the network interface 704 can provide a network communication function; the object interface 703 is mainly used to provide an input interface for the object; and the processor 701 can be used to call the device control application stored in the memory 705 to achieve: Perform phrase extraction operation on the indexed text to obtain candidate phrases; Vectorize the candidate phrases and determine the word vectors corresponding to the candidate phrases; By using the trained multi-layer attention feature extraction model, the attention feature extraction operation is performed on at least two levels of the word level, sentence level and text structure level on the text to be indexed, so as to obtain the semantic vector corresponding to the text to be indexed; According to the similarity between the word vector and the semantic vector, the topic corresponding to the text to be indexed is determined from the candidate phrases.
[0136] It should be understood that in some feasible implementations, the processor 701 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0137] In some feasible implementations, bus 702 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 702 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0138] The memory 705 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage medium, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.
[0139] The memory 705 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 701. The processor 701 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.
[0140] Among them, electronic devices include but are not limited to: displays, image acquisition devices, cameras, antennas, etc.
[0141] In a specific implementation, the electronic device 700 can execute the above-mentioned functions through its built-in functional modules. Figures 2 to 5 For the implementation methods provided in each step, please refer to the implementation methods provided in the above steps for details, which will not be repeated here.
[0142] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program and can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor. For details, please refer to the implementation methods provided in the above steps, which will not be repeated here.
[0143] The computer-readable storage medium may be an internal storage unit of the device or electronic device provided in any of the aforementioned embodiments, such as a hard disk or memory of an electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device. The computer-readable storage medium may also include a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. Further, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0144] The embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.
[0145] The terms "first", "second" and the like in the claims, the specification and the drawings of the present application are used to distinguish different objects rather than to describe a specific order.
[0146] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.
[0147] In addition, those skilled in the art will understand that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. The terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or electronic device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or electronic devices.
[0148] Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. Displaying the phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments. The term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0149] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0150] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0151] The above is only an optional implementation method for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.
Claims
1. A method for determining a topic, characterized in that: The method comprises: Perform phrase extraction operation on the indexed text to obtain candidate phrases; Vectorize the candidate phrase to determine the word vector corresponding to the candidate phrase; By using the trained multi-layer attention feature extraction model, the attention feature extraction operation is performed on the text to be indexed at at least two levels of word level, sentence level and text structure level to obtain the semantic vector corresponding to the text to be indexed; According to the correlation evaluation result between the word vector and the semantic vector, the topic corresponding to the text to be indexed is determined from the candidate phrases.
2. The method according to claim 1, characterized in that The step of performing an attention feature extraction operation on the text to be indexed at at least two levels of a word level, a sentence level, and a text structure level to obtain a semantic vector corresponding to the text to be indexed includes: Performing attention feature extraction on the words in the text to be indexed to obtain a first vector corresponding to the words; The first vectors corresponding to all words in each sentence of the text to be indexed are summed to obtain a second vector corresponding to the sentence; and all the second vectors are weighted averaged according to the weight value corresponding to the position information of the sentence in the paragraph to which it belongs to obtain a third vector; According to the weight value corresponding to the text structure, at least one of the first vector, the second vector and the third vector corresponding to different text structures is weighted averaged to obtain the semantic vector.
3. The method according to claim 1 or 2, characterized in that: The step of determining the topic corresponding to the text to be indexed from the candidate phrases according to the correlation evaluation result between the word vector and the semantic vector includes: Determining a phrase weight value corresponding to the candidate phrase according to at least one of position information, linguistic rule information, and statistical information of the candidate phrase in the text to be indexed; Determining a semantic weight value corresponding to the candidate phrase according to the similarity between the word vector and the semantic vector; sorting the candidate phrases by weight value according to the sum of the phrase weight value and the semantic weight value, and determining the obtained weight value sorting result as the relevance evaluation result; According to the weight value sorting result, the subject corresponding to the text to be indexed is determined.
4. The method according to claim 3, characterized in that The step of determining a phrase weight value corresponding to the candidate phrase according to at least one of position information, linguistic rule information, and statistical information of the candidate phrase in the text to be indexed includes: Determine the statistical weight value corresponding to each word in the candidate phrase according to the statistical information of each word in the to-be-indexed text; sum the statistical weight values corresponding to all words in the candidate phrase to obtain the statistical weight value of the candidate phrase; Determine the part-of-speech weight value corresponding to each word according to the part-of-speech information of each word in the candidate phrase; sum the part-of-speech weight values corresponding to all words in the candidate phrase to obtain the part-of-speech weight of the candidate phrase; Determining a length weight value of the candidate phrase according to the length information of the candidate phrase; Determining a position weight value of the candidate phrase according to position information of the candidate phrase in the text to be indexed; The product of the statistical weight value, the part-of-speech weight value, the length weight value and the position weight value of the candidate phrase is determined as the phrase weight value.
5. The method according to claim 3 or 4, characterized in that: The determining, according to the similarity between the word vector and the semantic vector, a semantic weight value corresponding to the candidate phrase comprises: The similarity is weighted according to a preset semantic weight factor to obtain the semantic weight value.
6. The method according to any one of claims 1 to 5, characterized in that The vectorizing the candidate phrase to determine the word vector corresponding to the candidate phrase includes: Performing a semantic expansion operation on the candidate phrase to determine a candidate phrase set; wherein the candidate phrase set includes at least one of the candidate phrase, a synonym of the candidate phrase, and a near synonym of the candidate phrase; Performing feature extraction of at least one dimension on each phrase in the candidate phrase set to obtain a phrase vector corresponding to each phrase in the candidate phrase set; A pooling operation is performed on phrase vectors corresponding to all phrases in the candidate phrase set to obtain the word vector.
7. The method according to any one of claims 1 to 5, characterized in that The phrase extraction operation is performed on the text to be indexed to obtain candidate phrases, including: Determining the language of the text to be indexed according to the language information of the text to be indexed and / or a preset language determination method; According to the phrase extraction rules corresponding to the language, a phrase extraction operation is performed on the text to be indexed to obtain the candidate phrases.
8. A theme determination device, characterized in that: The device comprises: A phrase extraction module is used to perform a phrase extraction operation on the indexed text to obtain candidate phrases; A first vector determination module, configured to vectorize the candidate phrase and determine a word vector corresponding to the candidate phrase; The second vector determination module is used to perform attention feature extraction operations on the text to be indexed at at least two levels of word level, sentence level and text structure level through the trained multi-layer attention feature extraction model to obtain the semantic vector corresponding to the text to be indexed; The topic screening module is used to determine the topic corresponding to the to-be-indexed text from the candidate phrases according to the correlation evaluation result between the word vector and the semantic vector.
9. An electronic device, characterized in that: comprising a processor and a memory, wherein the processor and the memory are connected to each other; The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 7 when calling the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Translation method integrating syntactic tree and statistical machine translation technology and translation device
CN103116578A
Method and device for automatically establishing classification rule for cross-language
CN103577498A
Text subject indexing method and device, electronic device and computer storage medium
CN110728135A
Dispute focus automatic identification method based on hierarchical attention neural network model
CN111143550A
Long text semantic similarity matching method and device, electronic equipment and storage medium
CN112183111A
Cited By
Mixed patent indexing method and device for self-adaptive patent field weight
CN121524354A