Semantic extraction method and device, computer equipment and storage medium

By extracting semantic-center features and query features in the problem text and weighted to generate global semantic-center features, the problem of insufficient robustness of the extracted question-and-answer model when facing problems with different formats but the same semantics is solved, which significantly improves the accuracy and performance of the system.

CN119903846APending Publication Date: 2025-04-29PING AN TECH (SHENZHEN) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510038415.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The existing extracted question-and-answer model has the problem of insufficient robustness when facing problems with the same semantics but different formats.

Method used

By obtaining the reference text and query problems in the problem text, multiple semantic center features and query features are extracted respectively, and global semantic center features are generated through the weighting mechanism, and target semantic information is determined based on the query features.

Benefits of technology

It significantly improves the robustness of the language model to problem format changes, enhances the accuracy and performance of the extracted question-and-answer system, and performs excellently especially when dealing with semantic equivalent problems with variable formats.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903846A_ABST
    Figure CN119903846A_ABST
Patent Text Reader

Abstract

The invention relates to the field of semantic analysis, and discloses a semantic extraction method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining a question text, carrying out the feature extraction of a reference text in the question text, and generating a plurality of semantic center features; performing feature extraction on the query problem in the problem text to obtain query features; weighting the plurality of semantic center features to obtain a global semantic center feature; and determining target semantic information according to the global semantic center feature and the query feature. According to the method, the query is calibrated from the semantic level, the robustness and accuracy of the extraction type question-answering system are remarkably improved, and especially when the semantic equivalence problem with changeable formats is processed, the outstanding advantages are shown.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of semantic analysis, and is applicable to the financial field and the medical field, and in particular to a semantic extraction method, device, computer equipment and storage medium. Background Art

[0002] With the rapid development of natural language processing (NLP) technology, machine reading comprehension (MRC) has become an important research direction in the field of artificial intelligence. In particular, extractive question answering (EQA), as a typical application scenario, has been widely used in various practical tasks, such as intelligent customer service, intelligent medical consultation, information retrieval, legal document analysis, etc. In these applications, the system needs to answer questions raised by users based on a given text paragraph, and usually requires the system to extract the most relevant answer fragments from the text.

[0003] Among the current extractive question answering models, encoder-based models (such as BERT, RoBERTa, etc.) have become the most mainstream solutions due to their powerful representation capabilities and pre-training features. These models, through deep neural network architectures, are able to capture complex information at the semantic level and accurately extract answers relevant to the question in a given text. However, although these models perform well in processing standard question formats, they still face significant challenges when faced with questions with the same semantics but different formats. Summary of the invention

[0004] Based on this, it is necessary to provide a semantic extraction method, apparatus, computer equipment and storage medium to address the above technical problems, so as to improve the robustness of the language model to changes in question format.

[0005] A semantic extraction method, comprising: Obtaining a question text, performing feature extraction on a reference text in the question text, and generating a plurality of semantic center features; Extracting features of the query question in the question text to obtain query features; Weighting the multiple semantic center features to obtain a global semantic center feature; Target semantic information is determined according to the global semantic center feature and the query feature.

[0006] Optionally, the step of extracting features from the reference text in the question text to generate a plurality of semantic center features includes: Preprocessing the reference text to obtain a preprocessed text; Performing topic analysis on the preprocessed text to obtain multiple semantic centers; constructing a subspace according to the semantic center; The preprocessed text is processed into a multi-dimensional information vector, and the multi-dimensional information vector is mapped in each of the subspaces respectively to generate the multiple semantic center features.

[0007] Optionally, extracting features from the query question in the question text to obtain query features includes: Performing text segmentation on the query question to obtain multiple phrases, and creating a vocabulary based on the multiple phrases; Calculating the frequency of each word group in the vocabulary; Performing syntactic analysis on the query question to obtain syntactic features; Performing named entity recognition on the query question to obtain entity information; Performing sentiment analysis on the query question to obtain sentiment information; The query feature is generated according to the vocabulary, the word frequency, the syntactic feature, the entity information and the sentiment information.

[0008] Optionally, weighting the multiple semantic center features to obtain a global semantic center feature includes: Processing the query features through a first attention mechanism to obtain a weight distribution coefficient; The multiple semantic center features are weighted according to the weight distribution coefficient to obtain the global semantic center feature.

[0009] Optionally, determining the target semantic information according to the global semantic center feature and the query feature includes: Fusing the global semantic center feature and the query feature to obtain a fused feature; The fused features are processed through a second attention mechanism to obtain the target semantic information.

[0010] Optionally, after determining the target semantic information according to the global semantic center feature and the query feature, the method further includes: The target semantic information is processed through a preset output template to generate answer information for the question text.

[0011] A semantic extraction device, comprising: A semantic core feature parsing module is used to obtain a question text, extract features from a reference text in the question text, and generate a plurality of semantic core features; A query feature parsing module is used to extract features of the query question in the question text to obtain query features; A global feature module, used for weighting the multiple semantic center features to obtain a global semantic center feature; The semantic information determination module is used to determine target semantic information according to the global semantic center feature and the query feature.

[0012] Optionally, the semantic center feature parsing module includes: A preprocessing unit, used for preprocessing the reference text to obtain a preprocessed text; Constructing a semantic center unit for performing topic analysis on the preprocessed text to obtain multiple semantic centers; A subspace construction unit is used to construct a subspace according to the semantic center; A semantic center feature generating unit is used to process the preprocessed text into a multi-dimensional information vector, and map the multi-dimensional information vector in each of the subspaces to generate the multiple semantic center features.

[0013] A computer device comprises a memory, a processor and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the above-mentioned semantic extraction method when executing the computer-readable instructions.

[0014] One or more readable storage media storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the semantic extraction method as described above.

[0015] The above-mentioned semantic extraction method, device, computer equipment and storage medium can understand the user's query intention by parsing the question text to generate multiple semantic central features and query features. By weighting the multiple semantic central features to obtain a global semantic central feature, the semantic information of the reference text can be captured more accurately, and the performance and accuracy of the semantic recognition model can be improved. Determining the target semantic information based on the global semantic central feature and the query feature can more accurately calibrate the semantics of the query and reduce ambiguity. The present invention calibrates the query at the semantic level, significantly improving the robustness and accuracy of the extractive question-answering system, especially when dealing with semantic equivalence problems with varying formats, showing outstanding advantages. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0017] Figure 1is a schematic diagram of an application environment of a semantic extraction method according to an embodiment of the present invention; Figure 2 is a flow chart of a semantic extraction method according to an embodiment of the present invention; Figure 3 is a structural schematic diagram of a semantic extraction device in one embodiment of the present invention; Figure 4 is a schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0019] The semantic extraction method provided in this embodiment can be applied to Figure 1 In an application environment, a client communicates with a server. The client includes but is not limited to various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers.

[0020] In one embodiment, if Figure 2 As shown, a semantic extraction method is provided, which is applied in Figure 1 The server in is taken as an example to illustrate, including the following steps S10~S30. S10: Obtain a question text, perform feature extraction on a reference text in the question text, and generate a plurality of semantic core features.

[0021] Understandably, the question text includes query questions and reference text. In extractive question answering, query questions and reference text usually extract the most direct and relevant information from a longer text (such as an article or document) to answer a specific question. For example, the reference text is expressed as: A bond is a debt security that represents the issuer's (such as a government or a company) commitment to borrow money from investors and agrees to repay the principal at a certain point in the future and pay interest as agreed. The coupon rate of a bond refers to the fixed annual interest rate specified when the bond is issued, which determines the amount of interest payable to the bondholder each period. For example, if a bond has a face value of $1,000 and a coupon rate of 5%, $50 of interest will be paid each year. Query questions include: What is the coupon rate of a bond? In another example, the reference text is expressed as: Headache is a common symptom that may be caused by a variety of reasons, including stress, tension, dehydration, lack of sleep, eye problems, ear problems, sinus problems, high blood pressure, migraines, brain tumors, etc. Nausea may be a symptom associated with headaches or a sign of digestive system diseases. Query questions include: I always have headaches recently, and sometimes nausea, what's going on? Through semantic center learning, feature extraction can be performed on reference text to obtain multiple semantic center features. In some examples, text features can be extracted through word segmentation, part-of-speech tagging, stop word removal, stem extraction, part-of-speech restoration, named entity recognition, dependency syntactic analysis, phrase extraction, topic model, text clustering, etc., and then multiple semantic center features can be constructed based on these features.

[0022] Optionally, step S10, i.e., extracting features from the reference text in the question text to generate a plurality of semantic center features, comprises: S101, preprocessing the reference text to obtain a preprocessed text; S102, performing topic analysis on the preprocessed text to obtain multiple semantic centers; S103, constructing a subspace according to the semantic center; S104, processing the preprocessed text into a multi-dimensional information vector, and mapping the multi-dimensional information vector in each of the subspaces respectively to generate the multiple semantic center features.

[0023] Understandably, the reference text contains a collection of documents, paragraphs, or sentences that may contain answer information. In extractive question answering, the reference text is static and unchanging, and the system needs to find the answer fragments related to the question from it. The reference text can be preprocessed, such as word segmentation, removal of stop words, removal of punctuation, part-of-speech tagging, removal of special characters, etc., to form a preprocessed text.

[0024] The preprocessed text can be analyzed using a topic model or other natural language processing techniques to obtain multiple semantic centers. The topic model can be a Latent Dirichlet Allocation (LDA) model. Based on the results of the topic model, the keywords of each topic are determined, and these keywords constitute the semantic center. Each topic is defined by a set of keywords and their corresponding weights, which describe the main content of the topic. Use keywords to create a feature space, where each feature corresponds to a keyword, which is a subspace.

[0025] The preprocessed text can be processed into a multidimensional information vector by word embedding. The multidimensional information vector consists of high-dimensional features that encapsulate various semantic properties of the query. For the LDA model, since LDA has given the probability distribution of the reference text on each topic, these distributions can be directly regarded as the coordinates of the reference text in the corresponding subspace. In some examples, for each subspace, the mean of all vectors in the space can be calculated as the semantic center feature of the subspace.

[0026] In other examples, the multidimensional information vector is mapped into different subspaces. These subspaces can be based on specific semantic attributes, topics, entities, or any other distinguishing features. The mapping process can be implemented in many ways, such as using linear or nonlinear transformations, projection matrices, etc. In each subspace, the query and information vectors are merged to establish potential semantic centers. These semantic centers are key points in the subspace, which represent the common semantic properties of the query and information vector in the subspace. Semantic center features are features associated with semantic centers. The query question can be segmented into multiple phrases, and a vocabulary is constructed based on the segmented phrases, where each word in the vocabulary is unique. The term frequency of each phrase in the vocabulary can be calculated. Here, term frequency refers to the abbreviation of TF-IDF (Term Frequency-Inverse Document Frequency). TF-IDF is the abbreviation of term frequency-inverse document frequency, where term frequency (TF) represents the number of times a word appears in a single document; inverse document frequency (IDF) is a measure of the prevalence of a word.

[0027] It can parse the sentence structure of the query, identify sentence components, discover dependency relationships, and obtain syntactic features. Syntactic features include but are not limited to dependency labels, part-of-speech tags, sentence components, path features, and subtree features.

[0028] Important entities can be extracted from the query question and the identified entities can be classified into predefined categories to form entity information.

[0029] Sentiment analysis of query questions to obtain sentiment information can help understand the emotional tendencies expressed in the query questions. Sentiment analysis usually involves identifying positive, negative, or neutral sentiment in the query questions, and may be further subdivided into more specific emotion categories (such as happy, angry, sad, etc.).

[0030] Query features can be generated based on vocabulary, word frequency, syntactic features, entity information, and sentiment information. This step is a key step in building an efficient text analysis system. These features work together to significantly improve the model's ability to understand queries, thereby improving the performance of systems such as search, recommendation, and question-answering.

[0031] In steps S201 to S206, the query is segmented to obtain multiple phrases, and a vocabulary is created based on the multiple phrases. The query is segmented into smaller units (phrases or words) to provide a basis for understanding the query content. The vocabulary is created to ensure that all unique phrases can be identified and counted in subsequent processing. The frequency of each phrase in the vocabulary is calculated, wherein the calculation of the frequency helps to understand the important phrases in the query and which phrases appear frequently in the query. The frequency of the phrase can be used for weight allocation, keyword extraction, etc. The query is parsed to obtain syntactic features. The syntactic analysis reveals the grammatical structure in the query, such as the subject-predicate-object relationship, phrase structure, etc. The syntactic features help to understand the deep meaning of the sentence. The query is identified by named entity recognition to obtain entity information, which is used to identify specific entities in the query, such as names, places, organizations, etc. The entity information is very useful for understanding the context and intent of the query. The query is analyzed by sentiment analysis to obtain sentiment information. The sentiment analysis aims to identify the sentiment tendency in the query, and the sentiment information is very useful for understanding the user's emotional state and needs. The query feature is generated according to the vocabulary, the word frequency, the syntactic feature, the entity information and the sentiment information, and then all the above information is integrated to generate a comprehensive query feature representation, which can be used for a variety of downstream tasks and provides a multi-dimensional perspective, so that the system can understand and respond to user queries more accurately.

[0032] S30: Weighting the multiple semantic center features to obtain a global semantic center feature.

[0033] Understandably, each semantic center feature can be weighted through soft semantic feature selection, and then fused to form a global semantic center feature. Soft semantic feature selection means that instead of simply selecting features based on a fixed threshold or rule, the weight of the semantic center feature is dynamically adjusted based on the semantic importance and information content of the feature. In soft semantic feature selection, each semantic center feature is assigned a weight that reflects the importance of the semantic center feature in the overall semantics. Features with stronger semantics are assigned higher weights. Conversely, features with lower information content or weaker semantics are assigned lower weights. By weighting each semantic center feature to obtain a global semantic center feature, the semantic information of the reference text can be captured more accurately, improving the performance and accuracy of the semantic recognition model.

[0034] Optionally, step S30, namely, weighting the multiple semantic center features to obtain a global semantic center feature, includes: S301, processing the query feature through a first attention mechanism to obtain a weight distribution coefficient; S302: Weight the multiple semantic center features according to the weight distribution coefficient to obtain the global semantic center feature.

[0035] Understandably, in soft semantic feature selection, the first attention mechanism is used to identify the most informative semantic center features in the query. The first attention mechanism obtains weight distribution coefficients by learning query features. These weight distribution coefficients reflect the relative importance of features in expressing the query intent. Then, the weight distribution coefficients and semantic center features are combined and weighted to produce a robust latent semantic center feature, namely the global semantic center feature.

[0036] This embodiment cleverly captures the complex and high-dimensional semantics of the query by constructing a global semantic center feature, while reducing the noise introduced by input perturbations.

[0037] S40: Determine target semantic information according to the global semantic center feature and the query feature.

[0038] Understandably, after obtaining the global semantic center feature, the query semantic calibration can be combined with the query feature to obtain the target semantic information. The fused features are semantically calibrated using a calibration algorithm. The calibration algorithm can be an attention mechanism, a rule-based method, a machine learning method, or a deep learning method. The goal of calibration is to adjust the feature representation to make it closer to the true intent of the query. The target semantic information can be information that accurately responds to the query question, that is, the query answer.

[0039] In steps S10 to S40, the question text is obtained, and the reference text in the question text is feature extracted to generate multiple semantic center features to extract key information from the reference text part in the question text and identify the main semantic points or themes of the text. Feature extraction is performed on the query question in the question text to obtain query features, and then the query question itself is focused on, and its features are extracted to understand the user's query intent. The multiple semantic center features are weighted to obtain global semantic center features, which can more accurately capture the semantic information of the reference text and improve the performance and accuracy of the semantic recognition model. The target semantic information is determined based on the global semantic center features and the query features, so that the semantics of the query can be more accurately calibrated to reduce ambiguity. This embodiment calibrates the query at the semantic level, which significantly improves the robustness and accuracy of the extractive question-answering system, especially when dealing with semantic equivalence questions with varying formats. It shows outstanding advantages.

[0040] Optionally, step S40, i.e., determining target semantic information according to the global semantic center feature and the query feature, includes: S401, fusing the global semantic center feature and the query feature to obtain a fused feature; S402. Process the fused features through a second attention mechanism to obtain the target semantic information.

[0041] Understandably, the global semantic center feature is fused with the query feature to form a fused feature. This fusion can be a simple concatenation, weighted summation, or a more complex interaction. The fused feature can be processed using the second attention mechanism to obtain the target semantic information. During the second attention mechanism processing, the similarity or correlation between the query feature and the global semantic center feature is calculated, so as to assign a weight to each feature. These weights represent the importance of each feature for the semantic understanding of the query. Then, according to the calculated attention weights, the global semantic center feature is weighted summed to obtain a weighted feature representation. The result of the weighted summation can be regarded as a context vector that captures the key association between the query and the global semantic center. After being output by the fully connected layer, the target semantic information can be obtained.

[0042] This embodiment uses the second attention mechanism to process the fused features and obtain the target semantic information, thereby improving the processing efficiency and accuracy of the semantic recognition model.

[0043] Optionally, after step S40, that is, after determining the target semantic information according to the global semantic center feature and the query feature, the method further includes: S50: Process the target semantic information through a preset output template to generate answer information for the question text.

[0044] Understandably, it is understandable that the target semantic information can be processed by a preset output template and the answer information of the question text can be generated. The preset output template can be set according to actual needs, for example, Template 1: {attribute B} of {entity A} is {value C}. Template 2: Regarding {topic A}, some people think {viewpoint B}, while others think {viewpoint C}. Filling the extracted target semantic information into the preset output template, the answer information of the question text can be obtained.

[0045] This embodiment uses preset templates to ensure the consistency of response information, which is easy to maintain and can effectively convert structured semantic information into fluent natural language responses, thereby providing high-quality answers in the question-answering system.

[0046] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0047] In one embodiment, a semantic extraction device is provided, which corresponds one-to-one to the semantic extraction method in the above embodiment. Figure 3 As shown, the semantic extraction device includes a semantic center feature analysis module 10, a query feature analysis module 20, a global feature module 30 and a semantic information determination module 40. The functional modules are described in detail as follows: The semantic center feature analysis module 10 is used to obtain the question text, extract features from the reference text in the question text, and generate multiple semantic center features; A query feature analysis module 20 is used to extract features of the query question in the question text to obtain query features; A global feature module 30, configured to weight the plurality of semantic center features to obtain a global semantic center feature; The semantic information determination module 40 is used to determine target semantic information according to the global semantic center feature and the query feature.

[0048] Optionally, the semantic center feature parsing module 10 includes: A preprocessing unit, used for preprocessing the reference text to obtain a preprocessed text; Constructing a semantic center unit for performing topic analysis on the preprocessed text to obtain multiple semantic centers; A subspace construction unit is used to construct a subspace according to the semantic center; A semantic center feature generating unit is used to process the preprocessed text into a multi-dimensional information vector, and map the multi-dimensional information vector in each of the subspaces to generate the multiple semantic center features.

[0049] Optionally, the query feature parsing module 20 includes: A vocabulary creation unit is used to perform text segmentation on the query question to obtain multiple phrases, and create a vocabulary according to the multiple phrases; A word frequency calculation unit, used for calculating the word frequency of each word group in the vocabulary; A syntactic analysis unit, used to perform syntactic analysis on the query question to obtain syntactic features; An entity recognition unit, used to perform named entity recognition on the query question to obtain entity information; A sentiment analysis unit, used to perform sentiment analysis on the query question to obtain sentiment information; A query feature generating unit is used to generate the query feature according to the vocabulary, the word frequency, the syntactic feature, the entity information and the sentiment information.

[0050] Optionally, the global feature module 30 includes: A weight allocation coefficient unit, used for processing the query feature through a first attention mechanism to obtain a weight allocation coefficient; A weighting unit is used to weight the multiple semantic center features according to the weight distribution coefficient to obtain the global semantic center feature.

[0051] Optionally, the semantic information determination module 40 includes: A feature fusion unit, used for fusing the global semantic center feature and the query feature to obtain a fused feature; Determine a target semantic information unit, which is used to process the fused features through a second attention mechanism to obtain the target semantic information.

[0052] Optionally, the semantic extraction device further includes: The output module is used to process the target semantic information through a preset output template to generate answer information of the question text.

[0053] For the specific definition of the semantic extraction device, please refer to the definition of the semantic extraction method above, which will not be repeated here. The various modules in the above-mentioned semantic extraction device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0054] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The readable storage medium stores an operating system, computer-readable instructions and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The database of the computer device is used to store data involved in the semantic extraction method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, a semantic extraction method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0055] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor executes the computer-readable instructions to implement the following steps: Obtaining a question text, performing feature extraction on a reference text in the question text, and generating a plurality of semantic center features; Extracting features of the query question in the question text to obtain query features; Weighting the multiple semantic center features to obtain a global semantic center feature; Target semantic information is determined according to the global semantic center feature and the query feature.

[0056] In one embodiment, one or more computer-readable storage media storing computer-readable instructions are provided. The readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage media. The readable storage media store computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the following steps are implemented: Obtaining a question text, performing feature extraction on a reference text in the question text, and generating a plurality of semantic center features; Extracting features of the query question in the question text to obtain query features; Weighting the multiple semantic center features to obtain a global semantic center feature; Target semantic information is determined according to the global semantic center feature and the query feature.

[0057] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0058] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0059] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A semantic extraction method, characterized in that: include: Obtaining a question text, performing feature extraction on a reference text in the question text, and generating a plurality of semantic center features; Extracting features of the query question in the question text to obtain query features; Weighting the multiple semantic center features to obtain a global semantic center feature; Target semantic information is determined according to the global semantic center feature and the query feature.

2. The semantic extraction method according to claim 1, characterized in that: The feature extraction of the reference text in the question text to generate multiple semantic center features includes: Preprocessing the reference text to obtain a preprocessed text; Performing topic analysis on the preprocessed text to obtain multiple semantic centers; constructing a subspace according to the semantic center; The preprocessed text is processed into a multi-dimensional information vector, and the multi-dimensional information vector is mapped in each of the subspaces respectively to generate the multiple semantic center features.

3. The semantic extraction method according to claim 1, characterized in that: The step of extracting features from the query question in the question text to obtain query features includes: Performing text segmentation on the query question to obtain multiple phrases, and creating a vocabulary based on the multiple phrases; Calculating the frequency of each word group in the vocabulary; Performing syntactic analysis on the query question to obtain syntactic features; Performing named entity recognition on the query question to obtain entity information; Performing sentiment analysis on the query question to obtain sentiment information; The query feature is generated according to the vocabulary, the word frequency, the syntactic feature, the entity information and the sentiment information.

4. The semantic extraction method according to claim 1, characterized in that: The step of weighting the multiple semantic center features to obtain a global semantic center feature includes: Processing the query features through a first attention mechanism to obtain a weight distribution coefficient; The multiple semantic center features are weighted according to the weight distribution coefficient to obtain the global semantic center feature.

5. The semantic extraction method according to claim 1, characterized in that: The determining target semantic information according to the global semantic center feature and the query feature includes: Fusing the global semantic center feature and the query feature to obtain a fused feature; The fused features are processed through a second attention mechanism to obtain the target semantic information.

6. The semantic extraction method according to claim 1, characterized in that: After determining the target semantic information according to the global semantic center feature and the query feature, the method further includes: The target semantic information is processed through a preset output template to generate answer information for the question text.

7. A semantic extraction device, characterized in that: include: A semantic core feature parsing module is used to obtain a question text, extract features from a reference text in the question text, and generate a plurality of semantic core features; A query feature parsing module is used to extract features of the query question in the question text to obtain query features; A global feature module, used for weighting the multiple semantic center features to obtain a global semantic center feature; The semantic information determination module is used to determine target semantic information according to the global semantic center feature and the query feature.

8. The semantic extraction device according to claim 7, characterized in that: The semantic center feature parsing module includes: A preprocessing unit, used for preprocessing the reference text to obtain a preprocessed text; Constructing a semantic center unit for performing topic analysis on the preprocessed text to obtain multiple semantic centers; A subspace construction unit is used to construct a subspace according to the semantic center; A semantic center feature generating unit is used to process the preprocessed text into a multi-dimensional information vector, and map the multi-dimensional information vector in each of the subspaces to generate the multiple semantic center features.

9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executed on the processor, characterized in that: When the processor executes the computer-readable instructions, the semantic extraction method according to any one of claims 1 to 6 is implemented.

10. One or more readable storage media storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the semantic extraction method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Semantic matching method and device of question and answer text, medium and electronic equipment

    CN108846077A

  • Method and device for reading comprehension based on attention mechanism and electronic device

    CN109033068A

  • Intelligent data information rapid checking and question-answering system

    CN119149691A

  • System and method using a discriminative learning approach for question answering

    US20090070311A1