Method, device, system, electronic device and storage medium for processing text
By combining dense and sparse vectors, the matching degree between the summary text and the original text is determined, which solves the problem that the summary text is concise but inaccurate, and realizes accurate verification and backtracking of the summary text.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU SHIYUAN ELECTRONICS CO LTD
- Filing Date
- 2024-12-03
- Publication Date
- 2026-06-05
AI Technical Summary
The meeting summary texts generated by existing technologies are too formal and concise, lacking accuracy and failing to effectively verify their match with the original text.
By acquiring the original text and summary text of the conference media content, and using a combination of dense and sparse vector methods, the similarity between each viewpoint statement in the summary text and each text statement in the original text is determined, thereby achieving the matching of viewpoint statements and text statements.
Accurately identifying the text statements in the original text that best match the various viewpoints in the summary text verifies the accuracy of the summary text and improves its reliability and comprehensiveness.
Smart Images

Figure CN122154681A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic device technology, and more specifically, to methods, apparatus, systems, electronic devices, and storage media for processing text in the field of electronic device technology. Background Technology
[0002] A meeting is an organized, led, and purposeful deliberation activity conducted at a defined time and place, following a specific procedure. Meetings play an extremely important role in modern enterprise production and operation. Typically, electronic devices use artificial intelligence (AI) technology to generate summary texts of the meeting recordings, allowing users to understand the core content of the meeting based on the summary text.
[0003] However, the summary text is a highly condensed version of the original meeting recording. Compared to the original meeting recording, the summary text tends to be more formal and clear.
[0004] Therefore, there is an urgent need for a method to process text in order to verify summary texts. Summary of the Invention
[0005] This application provides a method, apparatus, system, electronic device, and storage medium for processing text. The method can accurately identify the text statements that best match the viewpoints in the summary text from the original text.
[0006] Firstly, a method for processing text is provided, comprising: acquiring original text and summary text corresponding to conference media content, wherein the conference media content is audio or video, and the original text is obtained by speech recognition of the conference media content; determining a first target vector for each viewpoint statement in the summary text, and determining a second target vector for each text statement in the original text, wherein the first target vector includes a first dense vector and a first sparse vector, and the second target vector includes a second dense vector and a second sparse vector; and determining text statements that match each viewpoint statement in the summary text from the original text based on the similarity between the first target vector and the second target vector.
[0007] In the above technical solution, the method obtains the original text and summary text corresponding to the conference media content, and determines the first target vector for each viewpoint statement in the summary text and the second target vector for each text statement in the original text. The first target vector includes a first dense vector and a first sparse vector, and the second target vector includes a second dense vector and a second sparse vector. The dense vector of a statement can indicate the overall semantics of the statement, while the sparse vector of a statement indicates the semantics of multiple word segments within the statement. Thus, the similarity between the first target vector and the second target vector in this method can reflect the similarity between the text statements and viewpoint statements at both the statement semantic level and the word segment semantic level. This allows for accurate determination of the text statements in the original text that best match each viewpoint statement in the summary text based on similarity, and enables the verification of the summary text.
[0008] In conjunction with the first aspect, in some possible implementations, determining the first target vector of each opinion statement in the summary text includes: for any opinion statement, determining the sentence vector of the opinion statement as the first dense vector of the opinion statement, which is used to represent the semantic information of the opinion statement; and determining the word vectors of multiple words in the opinion statement as the first sparse vector of the opinion statement, whereby the word vector of each word is used to represent the semantic information of each word.
[0009] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, the method further includes: serializing the opinion statement to obtain a text sequence of the opinion statement; embedding and encoding the text sequence of the opinion statement to obtain an embedding vector of the text sequence; encoding the embedding vector through an attention mechanism to obtain the text semantic features of the text sequence; performing a linear transformation on the text semantic features to determine multiple hidden state vectors of the text sequence; determining the first hidden state vector among the multiple hidden state vectors as the sentence vector of the opinion statement; and determining the other hidden state vectors among the multiple hidden state vectors, excluding the first hidden state vector, as word vectors of multiple word segments in the opinion statement.
[0010] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, the method further includes: taking any one of the multiple word segments in the opinion statement as the target word; linearly combining the word vector of the target word with the word vectors of the other multiple word segments (excluding the target word) through a preset fully connected layer to obtain a first output vector of the target word in the opinion statement; performing a non-linear transformation on the first output vector of the target word through a preset activation function to obtain a second output vector of the target word; and determining the weight corresponding to the target word based on the second output vector of the target word, wherein the weight corresponding to the target word is used to indicate the importance of the target word in the opinion statement.
[0011] Combining the first aspect and the above implementation methods, in some possible implementation methods, based on the similarity between the first target vector and the second target vector, determining text statements from the original text that match each viewpoint statement in the summary text includes: for any viewpoint statement in the summary text, determining multiple first similarities between the first dense vector of the viewpoint statement and the second dense vectors of each text statement; determining multiple second similarities between the first sparse vector of the viewpoint statement and the second sparse vectors of each text statement; based on the first coefficient and the second coefficient, performing a weighted summation of each first similarity and the corresponding second similarity to determine multiple mixed similarities, where the first coefficient indicates the contribution of the first similarity in determining the mixed similarities, and the second coefficient indicates the contribution of the second similarity in the process; and determining text statements from the original text that match the viewpoint statement based on the multiple mixed similarities.
[0012] In combination with the first aspect and the above implementation methods, in some possible implementation methods, based on the multiple mixed similarities, determining the text statement that matches the opinion statement from the original text includes: determining at least one similarity greater than a preset similarity from the multiple mixed similarities; and determining the text statement corresponding to the at least one similarity from the original text as the text statement that matches the opinion statement.
[0013] Combining the first aspect and the above implementation methods, in some possible implementation methods, determining multiple first similarities between the first dense vector of the viewpoint statement and the second dense vectors of each text statement includes: determining the multiple first similarities as the dot product between the first dense vector of the viewpoint statement and the second dense vectors of each text statement; and determining multiple second similarities between the first sparse vector of the viewpoint statement and the second sparse vectors of each text statement includes: for any text statement, determining multiple groups of words from multiple word segments in the viewpoint statement and multiple word segments in the text statement, each group of word segments in the multiple groups of word segments includes at least one first word segment and at least one second word segment, the first word segment originating from the viewpoint statement, the second word segment originating from the text statement, and the first word segment and the second word segment being the same; determining the second similarity between the first sparse vector of the viewpoint statement and the second sparse vector of the text statement based on the weights corresponding to at least one first word segment and at least one second word segment in each group of word segments, so as to obtain the multiple second similarities.
[0014] Combining the first aspect and the above implementation methods, in some possible implementation methods, based on the weights corresponding to at least one first word and at least one second word in each subgroup of word segments, the second similarity between the first sparse vector of the viewpoint statement and the second sparse vector of the text statement is determined, including: for any subgroup of word segments, determining the product between the weights corresponding to each first word and the weights corresponding to each second word in at least one first word in the subgroup of word segments, obtaining multiple product values; the product of the sum of the multiple product values and the number of word groups is determined as the third similarity; the sum of the third similarities corresponding to the multiple subgroups of word segments is determined as the second similarity.
[0015] Secondly, an apparatus for processing text is provided, comprising: an acquisition module for acquiring original text and summary text corresponding to conference media content, wherein the conference media content is audio or video, and the original text is obtained by speech recognition of the conference media content; and a determination module for: determining a first target vector for each viewpoint statement in the summary text, and determining a second target vector for each text statement in the original text, wherein the first target vector includes a first dense vector and a first sparse vector, and the second target vector includes a second dense vector and a second sparse vector; and determining text statements from the original text that match each viewpoint statement in the summary text based on the similarity between the first target vector and the second target vector.
[0016] In conjunction with the second aspect, in some possible implementations, the determining module is specifically used to: for any opinion statement, determine the sentence vector of the opinion statement as the first dense vector of the opinion statement, which is used to represent the semantic information of the opinion statement; and determine the word vectors of multiple words in the opinion statement as the first sparse vector of the opinion statement, whereby the word vector of each word is used to represent the semantic information of each word.
[0017] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the device further includes: a serialization module, used to serialize the opinion statement to obtain a text sequence of the opinion statement; an encoding module, used to: perform embedding encoding on the text sequence of the opinion statement to obtain an embedding vector of the text sequence; encode the embedding vector through an attention mechanism to obtain the text semantic features of the text sequence; a linear transformation module, used to perform a linear transformation on the text semantic features to determine multiple hidden state vectors of the text sequence; the determining module is further used to: determine the first hidden state vector among the multiple hidden state vectors as the sentence vector of the opinion statement; and determine the other hidden state vectors among the multiple hidden state vectors other than the first hidden state vector as word vectors of multiple word segments in the opinion statement.
[0018] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the device further includes: a linear combination module, used to take any one of the multiple word segments in the opinion statement as the target word, and linearly combine the word vector of the target word with the word vectors of the other multiple word segments besides the target word through a preset fully connected layer to obtain a first output vector of the target word in the opinion statement; the linear transformation module is further used to perform a nonlinear transformation on the first output vector of the target word through a preset activation function to obtain a second output vector of the target word; the determination module is further used to determine the weight corresponding to the target word based on the second output vector of the target word, and the weight corresponding to the target word is used to indicate the importance of the target word in the opinion statement.
[0019] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is further configured to: for any opinion statement in the summary text, determine multiple first similarities between the first dense vector of the opinion statement and the second dense vectors of each text statement; determine multiple second similarities between the first sparse vector of the opinion statement and the second sparse vectors of each text statement; based on the first coefficient and the second coefficient, perform a weighted summation of each first similarity and the corresponding second similarity to determine multiple mixed similarities, wherein the first coefficient is used to indicate the contribution of the first similarity in determining the mixed similarities, and the second coefficient is used to indicate the contribution of the second similarity in the process; and based on the multiple mixed similarities, determine the text statement that matches the opinion statement from the original text.
[0020] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is further configured to: determine at least one similarity greater than a preset similarity from the plurality of mixed similarities; and determine the text statement corresponding to the at least one similarity from the original text as the text statement that matches the opinion statement.
[0021] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is further specifically used to determine the multiple first similarities by the dot product between the first dense vector of the opinion statement and the second dense vectors of each text statement; and the determining module is further specifically used to: for any text statement, determine multiple groups of words from multiple word segments in the opinion statement and multiple word segments in the text statement, each group of word segments in the multiple groups of word segments includes at least one first word segment and at least one second word segment, the first word segment originates from the opinion statement, the second word segment originates from the text statement, and the first word segment and the second word segment are the same; based on the weights corresponding to at least one first word segment and at least one second word segment in each group of word segments, determine the second similarity between the first sparse vector of the opinion statement and the second sparse vector of the text statement, so as to obtain the multiple second similarities.
[0022] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the determining module is specifically used to: for any group of word segments, determine the product between the weights corresponding to each first word in at least one first word in the group of word segments and the weights corresponding to each second word, to obtain multiple product values; determine the product of the sum of the multiple product values and the number of word groups as the third similarity; and determine the sum of the third similarities corresponding to the multiple groups of word segments as the second similarity.
[0023] Thirdly, a text processing system is provided, comprising: a server and a client; the server is used for:
[0024] Receive the target request sent by the client. The target request includes meeting media content. The target request is used to request the determination of text statements that match the viewpoint statements in the meeting summary text corresponding to the meeting media content from the original meeting text corresponding to the meeting media content. The meeting media content is audio or video.
[0025] The original text and summary text corresponding to the media content of the meeting are determined. The original text is obtained by speech recognition of the media content of the meeting. Each text statement has a corresponding identifier, which is used to indicate the position of the text statement in the original text.
[0026] Determine the first target vector of each viewpoint statement in the summary text, and determine the second target vector of each text statement in the original text. The first target vector includes a first dense vector and a first sparse vector, and the second target vector includes a second dense vector and a second sparse vector.
[0027] Based on the similarity between the first target vector and the second target vector, text statements that match the viewpoint statements in the summary text are determined from the original text.
[0028] Send the original text, each opinion statement, the text statements matching each opinion statement, and the identifiers corresponding to the text statements to the client.
[0029] Fourthly, an electronic device is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the electronic device to perform the methods of the first aspect or any possible implementation thereof.
[0030] Fifthly, a computer-readable storage medium is provided that stores executable program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description
[0031] Figure 1 This is a schematic diagram illustrating a scenario of using an electronic device, as provided in an embodiment of this application.
[0032] Figure 2 This is a schematic flowchart illustrating a method for processing text provided in an embodiment of this application;
[0033] Figure 3 This is a schematic block diagram illustrating a method for determining matching text statements for various viewpoint statements, as provided in an embodiment of this application.
[0034] Figure 4 This is a schematic diagram of the structure of a text processing device provided in an embodiment of this application;
[0035] Figure 5 This is a schematic diagram of the structure of a text processing system provided in an embodiment of this application;
[0036] Figure 6 This is a schematic block diagram illustrating a method for tracing back viewpoints in text statements based on viewpoint statements, as provided in an embodiment of this application.
[0037] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0038] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0039] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0040] Figure 1 This is a schematic diagram of a scenario using an electronic device, provided in an embodiment of this application.
[0041] It should be understood that meetings play an extremely important role in the production and operation of modern enterprises. For example, such as... Figure 1 As shown, electronic device A acquires the meeting media content (audio or video) recorded during the meeting and converts it into original text (i.e., a text-based audio file) using speech recognition technology. To enable users to quickly understand the core content of the meeting, electronic device A generates a summary text of the meeting media content using AI technology.
[0042] However, the summary text mentioned above is a highly condensed version of the original text. Compared to the original text, the summary text is more formal and concise. Therefore, it is necessary to verify the accuracy of the summary text.
[0043] To address the aforementioned issues, this application proposes a text processing method that backtracks the original text through a summary text (a method used in information retrieval to identify viewpoints in the summary text), determining the text statements from the original text that best match each viewpoint statement in the summary text. This enables the verification of the summary text. Specifically, the detailed implementation process of this text processing method can be found in [link to relevant documentation]. Figure 2 .
[0044] Figure 2 This is a schematic flowchart illustrating a method for processing text provided in an embodiment of this application.
[0045] It should be understood that the text processing method provided in this application embodiment can be applied to, for example, Figure 1 The electronic device shown (e.g., electronic device A).
[0046] For example, such as Figure 2As shown, the method 200 includes:
[0047] Step 201: The electronic device acquires the original text and summary text corresponding to the conference media content. The conference media content is audio or video, and the original text is obtained by speech recognition of the conference media content.
[0048] It should be understood that the “meeting media content” in step 201 above is obtained by auditory or perceptual (auditory and visual) recording of the meeting process, and the form of the meeting media content (audio or video) corresponds to these recordings.
[0049] It should also be understood that the “original text” in step 201 above is the text obtained by speech recognition of the speech content of the participants in the conference media content.
[0050] It should also be understood that the "summary text" in step 201 above is a text obtained by extracting and summarizing the speeches of the participants in the conference media content. The summary text in this application was determined using AI technology.
[0051] Step 202: The electronic device determines a first target vector for each viewpoint statement in the summary text and a second target vector for each text statement in the original text. The first target vector includes a first dense vector and a first sparse vector, and the second target vector includes a second dense vector and a second sparse vector.
[0052] It should be understood that, typically, meeting participants deliver lengthy speeches. Therefore, the text obtained after speech recognition of the participants' speeches is usually a multi-sentence text, meaning the original text includes multiple sentences; similarly, the text obtained after extracting and summarizing the speech content is usually a multi-sentence text, meaning the summary text includes multiple viewpoint statements.
[0053] It should also be understood that in step 202 above, "each text statement" corresponds to one statement (i.e., one sentence), and "each viewpoint statement" corresponds to at least one statement; that is, one viewpoint can correspond to one or more statements. Furthermore, multiple viewpoint statements can be obtained by segmenting the summary text into viewpoints, and multiple text statements can be obtained by segmenting the original text into sentences.
[0054] It should also be understood that both the "opinion statement" and the "text statement" in step 202 above have dense and sparse vectors. Specifically, the dense and sparse vectors of the opinion statement are the first dense vector and the first sparse vector, respectively, while the dense and sparse vectors of the text statement are the second dense vector and the second sparse vector, respectively. The "first dense vector" in step 202 refers to a fixed-length vector with a high density of non-zero elements, transformed from the opinion statement. This first dense vector is typically used to indicate the overall semantics of the opinion statement. The "first sparse vector" in step 202 refers to a vector where most elements of the opinion statement are zero, with only a few non-zero elements. The non-zero elements in this first sparse vector are typically used to indicate the presence of certain word segments in the opinion statement, which tend to be of high importance within the opinion statement. Furthermore, the "second dense vector" refers to a fixed-length vector with a high density of non-zero elements, transformed from the text statement. This second dense vector is typically used to indicate the overall semantics of the text statement. The "second sparse vector" in step 202 above refers to a vector that converts a text statement into a vector where most elements are zero and only a few are non-zero. The non-zero elements in this second sparse vector are typically used to indicate the presence of certain words in the text statement, which are often of high importance in the text statement.
[0055] It should also be understood that the "multiple tokens in the opinion statement" mentioned above refers to the tokens obtained after serializing the opinion statement using a vocabulary defined in the language model and then performing tokenization. These multiple tokens can be regarded as "tokens". In some embodiments, after tokenizing the opinion statement "I think this solution is reasonable", the multiple tokens obtained include "I", "think", "this", "solution", "very", and "reasonable". In addition, in some embodiments, the tokens with higher importance include "solution", "very", and "reasonable".
[0056] The process of determining "the first dense vector and the first sparse vector included in the first target vector" is explained below.
[0057] In one possible implementation, the electronic device in step 202 determines the first target vector of each opinion statement in the summary text, including: for any opinion statement, the electronic device determines the sentence vector of the opinion statement as the first dense vector of the opinion statement, which is used to represent the semantic information of the opinion statement; the electronic device determines the word vectors of multiple words in the opinion statement as the first sparse vector of the opinion statement, which is used to represent the semantic information of each word.
[0058] It should be understood that the "sentence vector of the opinion statement" in the above scheme is a vector represented as a continuous vector in a high-dimensional space, which can capture the deep semantic information of the opinion statement. Therefore, this method determines the sentence vector of the opinion statement as the dense vector of the opinion statement.
[0059] It should also be understood that the importance of each word in an opinion statement varies. Some words may contribute more to the overall semantics of the opinion statement, while others may contribute less. When combining the word vectors of these words, the word vector elements that contribute less to the overall semantics appear close to zero in the combined vector (word vectors of multiple words), thus making the word vectors of multiple words sparse. Therefore, this method determines the word vectors of multiple words in an opinion statement as the sparse vector of that opinion statement. Furthermore, the word vectors of the words are used to indicate the semantic information of the words.
[0060] It should also be understood that electronic devices can determine the first dense vector and the first sparse vector of the opinion statement through a semantic vector model. In some embodiments, the semantic vector model is the BGE-M3 model, which is an extension of the Bidirectional Encoder Representations from Transformers (BERT) model, supporting versatility, multilingualism, and multi-granularity, and is suitable for generating both dense and sparse vectors.
[0061] In the above technical solution, the electronic device determines the sentence vector of the opinion statement as a dense vector of the opinion statement. This enables the capture of the deep semantic information of the opinion statement. Furthermore, the electronic device determines the word vectors of multiple words in the opinion statement as a sparse vector of the opinion statement. This allows the determination of the importance of each word in the opinion statement, enabling a more granular understanding of the opinion statement. Thus, this method can achieve a more comprehensive understanding of the opinion statement from multiple different granular levels. Therefore, the first dense vector and the first sparse vector can be further combined to construct a more powerful and flexible opinion backtracking system, improving the accuracy and comprehensiveness of opinion backtracking.
[0062] In one possible implementation, the method 200 further includes: the electronic device serializing the opinion statement to obtain a text sequence of the opinion statement; the electronic device embedding and encoding the text sequence of the opinion statement to obtain an embedding vector of the text sequence; the electronic device encoding the embedding vector through an attention mechanism to obtain the text semantic features of the text sequence; the electronic device performing a linear transformation on the text semantic features to determine multiple hidden state vectors of the text sequence; the electronic device determining the first hidden state vector among the multiple hidden state vectors as the sentence vector of the opinion statement; and the electronic device determining the other hidden state vectors among the multiple hidden state vectors, excluding the first hidden state vector, as word vectors of multiple word segments in the opinion statement.
[0063] It should be understood that, in some embodiments, the text sequence corresponding to the opinion statement "I think this solution is reasonable" is: {"I", "think", "this", "solution", "very", "reasonable"}. This text sequence contains multiple word segments, meaning that the opinion statement contains multiple word segments.
[0064] It should also be understood that the "embedding encoding" in the above scheme refers to encoding each word and its corresponding position in the text sequence, which can remember the positional information of each word. The "multiple hidden state vectors of the text sequence" in the above scheme include a first hidden state vector and other hidden state vectors besides this first hidden state vector. The first hidden state vector is the hidden state vector at the starting position among the multiple hidden state vectors, which can be regarded as the CLS position. The hidden state vector at the CLS position is used to indicate the semantic information of the opinion statement. The other hidden state vectors include multiple vectors, where the i-th vector is the word vector of the i-th word among the multiple words in the text sequence, and i is a positive integer greater than 1. Furthermore, for any other hidden state vector, it integrates the feature vector of the corresponding word and the feature vectors of the words preceding and following it.
[0065] It should also be understood that sentence vectors can capture the deep semantic information of opinion statements. Therefore, this method determines the hidden state vector at the CLS position as the sentence vector of the opinion statement.
[0066] In the above technical solution, the text sequence of opinion statements is embedded and encoded to obtain an embedding vector for the text sequence. This allows the opinion statement to be represented by a fixed-length embedding vector, from which the position of each word in the opinion statement can be derived, facilitating computer processing. Furthermore, an attention mechanism is used to encode the embedding vector to generate the text semantic features of the text sequence. This helps to focus on important information and reduce the influence of irrelevant information, resulting in more accurate text semantic features. Moreover, a linear transformation is performed on the text semantic features, which changes the representation form of the text semantic features, mining vectors at multiple positions in the text sequence in the form of hidden state vectors. Finally, the first hidden state vector and the other hidden state vectors besides the first hidden state vector are obtained from the multiple hidden state vectors. This accurately determines the sentence vector of the opinion statement and the word vectors of multiple words in the opinion statement, providing a foundation for the subsequent process of determining the similarity between the opinion statement and the text statement.
[0067] In some embodiments, the electronic device encodes the embedding vector using an attention mechanism to obtain the text semantic features of the text sequence, including: the electronic device multiplies the embedding vector by the query weight, key weight, and value weight in the language model respectively to obtain the query vector, key vector, and value vector corresponding to the text sequence; the electronic device determines the product between the query vector and the key vector as the attention score of the text sequence; the electronic device normalizes the attention score to obtain a probability value; and the electronic device multiplies the probability value by the value vector to obtain the text semantic features of the text sequence.
[0068] It should be understood that the above scheme transforms the embedding vector into three types of vectors: query vector, key vector, and value vector, which can capture different aspects of the opinion statement. In this application, the embedding vector is encoded into a higher-dimensional vector. This encoding process allows the capture of semantic similarity between multiple word segments in the opinion statement. The query vector is used to indicate the content that should be focused on in the opinion statement; the key vector is used to indicate the key of the word segment, that is, the content that should be focused on by other word segments in the opinion statement besides this word; and the value vector is used to indicate the information contributed by the word to the semantic features of the output text.
[0069] It should also be understood that the "normalization of attention scores to obtain probability values" in the above scheme can be achieved through the Softmax function.
[0070] In one possible implementation, the method 200 further includes: the electronic device taking any one of the multiple words in the opinion statement as the target word, and linearly combining the word vector of the target word with the word vectors of the other multiple words in the multiple words except the target word through a preset fully connected layer to obtain a first output vector of the target word in the opinion statement; the electronic device performing a nonlinear transformation on the first output vector of the target word through a preset activation function to obtain a second output vector of the target word; and the electronic device determining the weight corresponding to the target word based on the second output vector of the target word, wherein the weight corresponding to the target word is used to indicate the importance of the target word in the opinion statement.
[0071] It should be understood that in the above scheme, the nonlinear transformation of the first output vector of the target word segmentation by the preset activation function is to transform the values of the elements in the first output vector of the target word segmentation into values within a preset range.
[0072] It should also be understood that the above scheme uses the target word among multiple word segments in the statement as an example to describe the process of determining the weights corresponding to the word segments. The process of determining the weights corresponding to other word segments is similar to the above scheme and will not be repeated here.
[0073] In the above technical solution, by linearly combining the word vectors of the target word with the word vectors of multiple word segments other than the target word from a preset fully connected layer, the hidden state vector corresponding to the target word can be transformed into a high-level feature vector, i.e., the first output vector of the target word. Furthermore, a preset activation function is used to perform a non-linear transformation on the first output vector of the target word, which reduces the influence of linearity on the weights corresponding to the target word. Ultimately, this makes the weights determined based on the second output vector of the target word more accurate.
[0074] In some embodiments, the activation function is the ReLU function. Specifically, the second output vector of the target word is obtained by linearly transforming the first output vector of the target word using the ReLU function, including: the electronic device adjusts the elements less than zero in the first output vector of the target word to zero, and keeps the elements greater than or equal to zero in the first output vector of the target word unchanged, thus obtaining the second output vector of the target word.
[0075] In some embodiments, the electronic device determines the weight corresponding to the target word based on the second output vector of the target word, including any of the following: the electronic device determines the average value of multiple elements in the second output vector of the target word as the weight corresponding to the target word; the electronic device determines the maximum element in the second output vector of the target word as the weight corresponding to the target word.
[0076] The process of determining "the second dense vector and the second sparse vector included in the second target vector" will be discussed below.
[0077] In some embodiments, the electronic device in step 202 determines the second target vector of each text statement in the original text, including: for any text statement, the electronic device determines the sentence vector of the text statement as the second dense vector of the text statement, the sentence vector being used to characterize the semantic information of the text statement; the electronic device determines the word vectors of multiple words in the text statement as the second sparse vector of the text statement, the word vector of each word being used to characterize the semantic information of each word.
[0078] It should be understood that the "sentence vector of the text statement" in the above scheme is a vector represented as a continuous vector in a high-dimensional space, which can capture the deep semantic information of the text statement. Therefore, this method determines the sentence vector of the text statement as the dense vector of the text statement. Here, a continuous vector means that the elements in the vector are continuous, and the elements can take any real value.
[0079] It should also be understood that the importance of each word in a text sentence varies. Some words may contribute more to the overall semantics of the text sentence, while others may contribute less. When combining the word vectors of these words, the word vector elements that contribute less to the overall semantics appear close to zero in the combined vector (word vectors of multiple words), thus making the word vectors of multiple words sparse. Therefore, this method determines the word vectors of multiple words in a text sentence as the sparse vector of that text sentence. Furthermore, the word vectors of the words are used to indicate the semantic information of the words.
[0080] In some embodiments, the method 200 further includes: the electronic device serializing the text statement to obtain a text sequence of the text statement; the electronic device embedding and encoding the text sequence of the text statement to obtain an embedding vector of the text sequence; the electronic device encoding the embedding vector through an attention mechanism to obtain text semantic features of the text sequence; the electronic device performing a linear transformation on the text semantic features to determine multiple hidden state vectors of the text sequence; the electronic device determining the first hidden state vector among the multiple hidden state vectors as the sentence vector of the text statement; and the electronic device determining the other hidden state vectors among the multiple hidden state vectors, excluding the first hidden state vector, as word vectors of multiple word segments in the text statement.
[0081] It should be understood that, in some embodiments, the text statement "I think this solution is reasonable" corresponds to the text sequence: {"I", "think", "this", "solution", "very", "reasonable"}. This text sequence contains multiple word segments, meaning the text statement contains multiple word segments.
[0082] Step 203: Based on the similarity between the first target vector and the second target vector, the electronic device determines the text statements that match the viewpoint statements in the summary text from the original text.
[0083] It should be understood that the “each viewpoint statement” in step 203 above matches at least one text statement.
[0084] In one possible implementation, step 203 includes: for any opinion statement in the summary text, the electronic device determines multiple first similarities between a first dense vector of the opinion statement and a second dense vector of each text statement; the electronic device determines multiple second similarities between a first sparse vector of the opinion statement and a second sparse vector of each text statement; the electronic device, based on a first coefficient and a second coefficient, performs a weighted summation of each first similarity and the corresponding second similarity to determine multiple mixed similarities, wherein the first coefficient indicates the contribution of the first similarity in determining the mixed similarities, and the second coefficient indicates the contribution of the second similarity in the process; and the electronic device, based on the multiple mixed similarities, determines the text statement that matches the opinion statement from the original text.
[0085] It should be understood that the number of "first similarity", "second similarity" and mixed similarity in the above scheme are the same, which is the same as the number of sentences in the original text.
[0086] It should also be understood that, for any first similarity, the electronic device, based on a first coefficient and a second coefficient, performs a weighted summation of each of the multiple first similarities and the corresponding second similarities to determine the corresponding mixed similarity. Here, the first similarity refers to the similarity between the first dense vector of any opinion statement and the second dense vector of any text statement; the "second similarity corresponding to the first similarity" refers to the similarity between the first sparse vector of the opinion statement and the second sparse vector of the text statement, specifically the similarity between the opinion statement and the text statement on the sparse vectors when determining the first similarity.
[0087] In the above technical solution, for any opinion statement in the summary text, the method comprehensively considers both the dense similarity (first similarity) between the opinion statement and each text statement, and the sparse similarity (second similarity) between the opinion statement and each text statement. This reduces the impact of the vector's singularity (density or sparsity) on opinion backtracking. Furthermore, based on the first and second coefficients, a weighted summation of the first similarities and their corresponding second similarities is performed to obtain a mixed similarity, which can search for the text statement in the original text that best matches the opinion statement. In other words, the opinion statement strongly corresponds to at least one matching text statement.
[0088] The determination process of "multiple first similarities" and "multiple second similarities" is explained below in several ways.
[0089] The first method
[0090] In some embodiments, the electronic device determines multiple first similarities between a first dense vector of the opinion statement and second dense vectors of each text statement, including: the electronic device determining the linear distance between the first dense vector and the second dense vectors of each text statement as the multiple first similarities; or, the electronic device determining the cosine value of the angle between the first dense vector and the second dense vectors of each text statement as the multiple first similarities; and the electronic device determines multiple second similarities between a first sparse vector of the opinion statement and the second sparse vectors of each text statement, including: the electronic device correcting the first sparse vector of the opinion statement to obtain a first corrected sparse vector, and correcting the second sparse vectors of each text statement to obtain a second corrected sparse vector; the electronic device determining the linear distance between the first corrected sparse vector and the second corrected sparse vectors of each text statement as the multiple second similarities; or, the electronic device determining the cosine value of the angle between the first corrected sparse vector and the second corrected sparse vectors of each text statement as the multiple second similarities.
[0091] It should be understood that in the above scheme, the "first dense vector" and the "second dense vector" have the same dimension. The "first sparse vector" and the "second sparse vector" have the same dimension. The "first modified sparse vector" and the "second modified sparse vector" have the same dimension.
[0092] In some embodiments, the electronic device corrects the first sparse vector of the opinion statement to obtain a first corrected sparse vector, including: the electronic device performs a weighted summation of the word vectors of multiple words in the opinion statement based on the weights corresponding to the multiple words in the opinion statement to obtain the first corrected sparse vector.
[0093] It should be understood that the process of "correcting the second sparse vector of each text statement to obtain the second corrected sparse vector" in the above scheme is similar to the process of "correcting the first sparse vector of the viewpoint statement to obtain the first corrected sparse vector", and will not be repeated here.
[0094] The second method
[0095] In one possible implementation, the electronic device determines multiple first similarities between the first dense vector of the opinion statement and the second dense vectors of each text statement, including: the electronic device determines the multiple first similarities by the dot product between the first dense vector of the opinion statement and the second dense vectors of each text statement; and the electronic device determines multiple second similarities between the first sparse vector of the opinion statement and the second sparse vectors of each text statement, including: for any text statement, the electronic device determines multiple groups of words from multiple word segments in the opinion statement and multiple word segments in the text statement, each group of word segments in the multiple groups of word segments including at least one first word and at least one second word, the first word originating from the opinion statement, the second word originating from the text statement, and the first word and the second word being the same; the electronic device determines the second similarity between the first sparse vector of the opinion statement and the second sparse vector of the text statement based on the weights corresponding to at least one first word and at least one second word in each group of word segments, to obtain the multiple second similarities.
[0096] It should be understood that the first and second segment words within each subgroup of the "multi-group segmentation" in the above scheme are the same; however, the first and second segment words differ between the multiple subgroups. In some embodiments, the first subgroup segment words include three instances of "I" from the opinion statement and one instance of "I" from the text statement; the second subgroup segment words include two instances of "like" from the opinion statement and one instance of "like" from the text statement.
[0097] It should also be understood that the above scheme identifies multiple sets of identical segmentations from multiple segmentations in the opinion statement and multiple segmentations in the text statement. When multiple segmentations are identical, the weights corresponding to these segmentations contribute to the second similarity. The weights corresponding to the segmentations are used to indicate the importance of the segmentation in the statement (opinion statement or text statement). The product of the weights corresponding to the identical segmentations is used to reflect the synergistic relationship of the importance of these segmentations in their respective statements (opinion statement and text statement). A larger product indicates that these segmentations are relatively important in their respective statements and play a significant role in constructing the overall semantics of their respective statements. The two types of statements (opinion statement and text statement) are relatively similar in the semantic dimensions represented by these segmentations. Therefore, for any text statement, this method can determine the second similarity between the first sparse vector of the opinion statement and the second sparse vector of the text statement based on the weights corresponding to at least one first segmentation and at least one second segmentation in any group of identical segmentations.
[0098] In the above technical solution, the first dense vector is used to indicate the overall semantics of the opinion statement, and the second dense vector is used to indicate the overall semantics of the text statement. That is, the two dense vectors in this method represent two statements at the semantic level, and the dot product can accurately represent the similarity (first similarity) between the opinion statement and each text statement. For the second similarity, for any text statement, this method determines multiple sets of identical word segments from multiple word segments in both the opinion statement and the text statement. The vectors corresponding to identical word segments are similar. Therefore, this method determines the similarity (second similarity) between the opinion statement and the text statement based on the weights corresponding to at least one first word and at least one second word in each group of word segments. The above method determines sparse similarity through weighting, which is simpler and can reduce the consumption of computing resources on electronic devices to some extent.
[0099] In one possible implementation, the electronic device determines a second similarity between the first sparse vector of the viewpoint statement and the second sparse vector of the text statement based on the weights corresponding to at least one first segment and at least one second segment in each sub-group of word segments. This includes: for any sub-group of word segments, the electronic device determines the product between the weights corresponding to each first segment and the weights corresponding to each second segment in at least one first segment in the sub-group of word segments, obtaining multiple product values; the electronic device determines the product of the sum of the multiple product values and the number of word groups as a third similarity; and the electronic device determines the sum of the third similarities corresponding to the multiple sub-groups of word segments as the second similarity.
[0100] It should be understood that in the above scheme, the number of first segment words in the opinion statement and the number of second segment words in the text statement may be different. In order to determine the second similarity more accurately, this method considers the weights corresponding to each first segment word and the weights corresponding to each second segment word.
[0101] In the above technical solution, for any opinion statement and any text statement, in determining the second similarity between the first sparse vector of the opinion statement and the second sparse vector of the text statement, this method considers the weights of each first word and each second word in the multi-group word segmentation of both statements, as well as the influence of the number of word groups on the second similarity. This can accurately measure the similarity between opinion statements and text statements in terms of common elements.
[0102] In some embodiments, taking the opinion statement "I like novels" and the text statement "I like historical novels and science fiction novels" as an example, the process of determining the second similarity is described.
[0103] Specifically, after the electronic device performs word segmentation on the opinion statements and the text statements respectively, it obtains:
[0104] The text sequence of opinion statements is: {“I”, “like”, “novel”}, with corresponding weights of {1 / 4, 1 / 4, 1 / 2};
[0105] The text sequence of the text statement is: {"I", "like", "history", "novel", "and", "science fiction", "novel"}, with corresponding weights of {1 / 4, 1 / 4, 1 / 12, 1 / 8, 1 / 12, 1 / 12, 1 / 8};
[0106] The electronic device determines multiple groups of word segments from multiple word segments in the text sequence of opinion statements and multiple word segments in the text sequence of text statements. The number of word segments is 3, specifically: the first group of word segments {opinion statement: "I"; text statement: "I"}; the second group of word segments {opinion statement: "like"; text statement: "like", "like"}; the third group of word segments {opinion statement: "novel"; text statement: "novel", "novel"}.
[0107] For the first group of word segmentation, the electronic device determines the first product value as 1 / 16 based on 1 / 4 * 1 / 4, and the third similarity as 3 / 16 (3 * (1 / 16)). For the second group of word segmentation, the electronic device determines the second product value as 1 / 16 based on 1 / 4 * 1 / 4, and the third similarity as 3 / 16 (3 * (1 / 16)). For the third group of word segmentation, the electronic device determines the third product value as 1 / 16 based on 1 / 2 * 1 / 8, and the fourth product value as 1 / 16 based on 1 / 2 * 1 / 8, and the third similarity as 6 / 16 (3 * ((1 / 16) + (1 / 16))). The electronic device sums the multiple third similarities and determines the second similarity as 12 / 16 ((3 / 16) + (3 / 16) + (6 / 16)). That is, the similarity between the first sparse vector of the opinion statement and the second sparse vector of the text statement is 12 / 16.
[0108] In one possible implementation, the electronic device determines a text statement that matches the opinion statement from the original text based on the plurality of mixed similarities, including: the electronic device determining at least one similarity greater than a preset similarity from the plurality of mixed similarities; and the electronic device determining the text statement corresponding to the at least one similarity from the original text as the text statement that matches the opinion statement.
[0109] It should be understood that "at least one text statement corresponding to the similarity" in the above scheme refers to the text statement used to determine the at least one similarity with the opinion statement.
[0110] It should also be understood that the dense vector of a statement indicates the overall semantics of the statement, while the sparse vector of a statement indicates the semantics of multiple word segments within the statement.
[0111] In the above technical solution, when the similarity between the first target vector of the opinion statement and the second target vector of at least one text statement is large, it indicates that at least one text statement is very similar to the opinion statement at both the statement semantic level and the word segmentation semantic level. Therefore, the method determines at least one text statement as the text statement that matches the opinion statement.
[0112] In some embodiments, the preset similarity is 60%.
[0113] Figure 3 This is a schematic block diagram illustrating a method for determining matching text statements for various viewpoint statements, as provided in an embodiment of this application.
[0114] For example, such as Figure 3As shown, the electronic device acquires the original text corresponding to the conference media content and determines the summary text corresponding to the conference media content through speech recognition. The electronic device segments the summary text into multiple viewpoint statements and represents each viewpoint statement with a vector to obtain a first dense vector and a first sparse vector (i.e., a first target vector). The electronic device segments the original text into multiple text statements and represents each text statement with a vector to obtain a second dense vector and a second sparse vector (i.e., a second target vector). For any viewpoint statement, the electronic device determines multiple first similarities between the first dense vector of the viewpoint statement and the second dense vectors of each text statement, and multiple second similarities between the first sparse vector of the viewpoint statement and the second sparse vectors of each text statement, and determines multiple mixed similarities between these multiple first similarities and the corresponding second similarities. Based on the multiple mixed similarities, the electronic device determines the text statements matching each viewpoint statement from the original text. Specifically, the electronic device determines at least one similarity greater than a preset similarity from the multiple mixed similarities, and determines the text statement corresponding to the at least one similarity from the original text as the text statement matching the viewpoint statement.
[0115] Figure 4 This is a schematic diagram of the structure of a text processing device provided in an embodiment of this application.
[0116] For example, such as Figure 4 As shown, the device 400 includes:
[0117] The acquisition module 401 is used to acquire the original text and summary text corresponding to the conference media content. The conference media content is audio or video, and the original text is obtained by speech recognition of the conference media content.
[0118] Determine module 402, used for:
[0119] Determine the first target vector of each viewpoint statement in the summary text, and determine the second target vector of each text statement in the original text. The first target vector includes a first dense vector and a first sparse vector, and the second target vector includes a second dense vector and a second sparse vector.
[0120] Based on the similarity between the first target vector and the second target vector, text statements that match the viewpoint statements in the summary text are determined from the original text.
[0121] Optionally, the determining module 402 is specifically used to: for any opinion statement, determine the sentence vector of the opinion statement as the first dense vector of the opinion statement, the sentence vector being used to represent the semantic information of the opinion statement; and determine the word vectors of multiple words in the opinion statement as the first sparse vector of the opinion statement, the word vector of each word being used to represent the semantic information of each word.
[0122] Optionally, the device 400 further includes: a serialization module for serializing the opinion statement to obtain a text sequence of the opinion statement; an encoding module for: embedding and encoding the text sequence of the opinion statement to obtain an embedding vector of the text sequence; encoding the embedding vector through an attention mechanism to obtain the text semantic features of the text sequence; a linear transformation module for performing a linear transformation on the text semantic features to determine multiple hidden state vectors of the text sequence; the determining module is further configured to: determine the first hidden state vector among the multiple hidden state vectors as the sentence vector of the opinion statement; and determine the other hidden state vectors among the multiple hidden state vectors, excluding the first hidden state vector, as word vectors of multiple word segments in the opinion statement.
[0123] Optionally, the device 400 further includes: a linear combination module, used to take any one of the multiple words in the opinion statement as the target word, and linearly combine the word vector of the target word with the word vectors of the other multiple words in the multiple words except the target word through a preset fully connected layer to obtain a first output vector of the target word in the opinion statement; the linear transformation module is further used to perform a nonlinear transformation on the first output vector of the target word through a preset activation function to obtain a second output vector of the target word; the determination module 402 is further used to determine the weight corresponding to the target word based on the second output vector of the target word, and the weight corresponding to the target word is used to indicate the importance of the target word in the opinion statement.
[0124] Optionally, the determining module 402 is further configured to: for any opinion statement in the summary text, determine multiple first similarities between the first dense vector of the opinion statement and the second dense vectors of each text statement; determine multiple second similarities between the first sparse vector of the opinion statement and the second sparse vectors of each text statement; based on the first coefficient and the second coefficient, perform a weighted summation of each first similarity and the corresponding second similarity to determine multiple mixed similarities, wherein the first coefficient is used to indicate the contribution of the first similarity in determining the mixed similarities, and the second coefficient is used to indicate the contribution of the second similarity in the process; and based on the multiple mixed similarities, determine the text statement that matches the opinion statement from the original text.
[0125] Optionally, the determining module 402 is further configured to: determine at least one similarity greater than a preset similarity from the plurality of mixed similarities; and determine the text statement corresponding to the at least one similarity from the original text as the text statement that matches the opinion statement.
[0126] Optionally, the determining module 402 is further configured to determine the dot product between the first dense vector of the opinion statement and the second dense vectors of each text statement as the plurality of first similarities; and the determining module 402 is further configured to: for any text statement, determine multiple groups of words from multiple word segments in the opinion statement and multiple word segments in the text statement, each group of word segments in the multiple groups of word segments including at least one first word and at least one second word, the first word originating from the opinion statement, the second word originating from the text statement, and the first word and the second word being the same; and determine the second similarity between the first sparse vector of the opinion statement and the second sparse vector of the text statement based on the weights corresponding to at least one first word and at least one second word in each group of word segments, so as to obtain the plurality of second similarities.
[0127] Optionally, the determining module 402 is further configured to: for any group of word segments, determine the product between the weights of each first word in at least one first word in the group of word segments and the weights of each second word, to obtain multiple product values; determine the product of the sum of the multiple product values and the number of word segments as the third similarity; and determine the sum of the third similarities of the multiple groups of word segments as the second similarity.
[0128] Figure 5 This is a schematic diagram of the structure of a text processing system provided in an embodiment of this application.
[0129] For example, such as Figure 5 As shown, the system 500 includes: a server 501 and a client 502; the server 501 is used for:
[0130] The client 502 receives a target request, which includes meeting media content. The target request is used to request the determination of text statements that match the viewpoint statements in the meeting summary text corresponding to the meeting media content from the original meeting text corresponding to the meeting media content. The meeting media content is audio or video.
[0131] The original text and summary text corresponding to the media content of the conference are determined. The original text is obtained by speech recognition of the media content of the conference. Each text statement has a corresponding identifier, which is used to indicate the position of the text statement in the original text. The first target vector of each viewpoint statement in the summary text is determined, and the second target vector of each text statement in the original text is determined. The first target vector includes a first dense vector and a first sparse vector, and the second target vector includes a second dense vector and a second sparse vector.
[0132] Based on the similarity between the first target vector and the second target vector, text statements that match the viewpoint statements in the summary text are determined from the original text.
[0133] Send the original text, each opinion statement, and the text statements that match each opinion statement, along with the identifiers corresponding to the text statements, to the client via 502.
[0134] It should be understood that the identifiers corresponding to each text statement in the above scheme can be the position index of the text statement in the original text, that is, which statement the text statement is in the original text.
[0135] In some embodiments, the target request may be constructed based on WebSocket.
[0136] Figure 6 This is a schematic block diagram illustrating a method for tracing back viewpoints in text statements based on viewpoint statements, as provided in an embodiment of this application.
[0137] For example, such as Figure 6As shown, the client requests a WebSocket connection with the server via a WebSocket handshake request. Upon receiving the handshake request, the server verifies the connection and responds with a status code indicating a successful connection. Once the handshake is successful, the connection is upgraded to a WebSocket connection, and subsequent communication will be conducted over the WebSocket protocol. The client sends a target request to the server through the viewpoint backtracking module. This target request includes the conference media content and is used to request the determination of text statements matching the viewpoint statements in the conference summary text corresponding to the conference media content. After receiving the target request, the server determines the original text and viewpoint text corresponding to the conference media content and sends the viewpoint text corresponding to the conference media content to the client. The server determines the first target vector (first dense vector and first sparse vector) for each viewpoint statement in the viewpoint text through the vector representation module, and the second target vector (second dense vector and second sparse vector) for each text statement in the original text through the vector representation module. Each text statement has a corresponding identifier, which indicates the position of the text statement in the original text. The server uses a hybrid similarity calculation module to determine multiple first-level and second-level similarities between any opinion statement and various text statements, and then determines multiple hybrid similarities. Based on these hybrid similarities, the server uses an opinion backtracking module to identify text statements from the original text that match each opinion statement in the summary text, and sends the original text, the matching text statements, and their corresponding identifiers to the client. The client then sends a WebSocket disconnect request to the server to terminate the WebSocket connection. Upon receiving the disconnect request, the server verifies it and responds, indicating a successful disconnection.
[0138] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0139] For example, such as Figure 7 As shown, the electronic device 700 includes a memory 701 and a processor 702, wherein the memory 701 stores executable program code 703, and the processor 702 is used to call and execute the executable program code 703 to perform a method for processing text.
[0140] Furthermore, embodiments of this application also protect an apparatus that may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to perform a text processing method provided in embodiments of this application.
[0141] This embodiment can divide the device into functional modules based on the above method example. For example, each module can correspond to a separate function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0142] When each functional module is divided according to its corresponding function, the device may further include an acquisition module, a determination module, an encoding module, a linear transformation module, and a linear combination module. It should be noted that all relevant content in the above method embodiments can be referenced from the functional descriptions of the corresponding functional modules, and will not be repeated here.
[0143] It should be understood that the apparatus provided in this embodiment is used to perform the above-described text processing method, and therefore can achieve the same effect as the above-described implementation method.
[0144] When using integrated units, the device may include a processing module and a storage module. When applied to an electronic device, the processing module can be used to control and manage the operation of the electronic device. The storage module can be used to support the execution of relevant executable program code by the electronic device.
[0145] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits shown in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.
[0146] In addition, the apparatus provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute a text processing method provided in the above embodiments.
[0147] This embodiment also provides a computer-readable storage medium storing executable program code. When the executable program code is run on a computer, the computer performs the aforementioned method steps to implement the text processing method provided in the above embodiment.
[0148] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement a text processing method provided in the above embodiment.
[0149] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0150] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0151] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0152] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for processing text, characterized in that, The method includes: Obtain the original text and summary text corresponding to the conference media content, wherein the conference media content is audio or video, and the original text is obtained by speech recognition of the conference media content. Determine a first target vector for each viewpoint statement in the summary text, and determine a second target vector for each text statement in the original text. The first target vector includes a first dense vector and a first sparse vector, and the second target vector includes a second dense vector and a second sparse vector. Based on the similarity between the first target vector and the second target vector, text statements that match the viewpoint statements in the summary text are determined from the original text.
2. The method according to claim 1, characterized in that, Determining the first target vector for each viewpoint statement in the summary text includes: For any opinion statement, the sentence vector of the opinion statement is determined as the first dense vector of the opinion statement, and the sentence vector is used to represent the semantic information of the opinion statement; The word vectors of multiple words in the opinion statement are determined as the first sparse vector of the opinion statement, and the word vectors of each word are used to represent the semantic information of each word.
3. The method according to claim 2, characterized in that, The method further includes: The opinion statements are serialized to obtain a text sequence of the opinion statements; The text sequence of the opinion statement is embedded and encoded to obtain the embedding vector of the text sequence; The text semantic features of the text sequence are obtained by encoding the embedding vector through an attention mechanism; A linear transformation is performed on the semantic features of the text to determine multiple hidden state vectors of the text sequence; The first hidden state vector among the plurality of hidden state vectors is determined as the sentence vector of the viewpoint statement; The hidden state vectors other than the first hidden state vector among the multiple hidden state vectors are determined as word vectors of multiple words in the opinion statement.
4. The method according to claim 3, characterized in that, The method further includes: Take any one of the multiple word segments in the opinion statement as the target word segment, and linearly combine the word vector of the target word segment with the word vectors of the other multiple word segments (excluding the target word segment) through a preset fully connected layer to obtain the first output vector of the target word segment in the opinion statement. The first output vector of the target word is nonlinearly transformed by a preset activation function to obtain the second output vector of the target word. Based on the second output vector of the target word, the weight corresponding to the target word is determined, and the weight corresponding to the target word is used to indicate the importance of the target word in the opinion statement.
5. The method according to claim 1, characterized in that, The step of determining text statements from the original text that match the various viewpoint statements in the summary text based on the similarity between the first target vector and the second target vector includes: For any opinion statement in the summary text, determine multiple first similarities between the first dense vector of the opinion statement and the second dense vectors of each of the text statements; Determine multiple second similarities between the first sparse vector of the opinion statement and the second sparse vectors of each of the text statements; Based on the first coefficient and the second coefficient, a weighted sum is performed on each of the plurality of first similarities and the second similarity corresponding to each of the first similarities to determine a plurality of mixed similarities. The first coefficient is used to indicate the degree of contribution of the first similarity in the process of determining the mixed similarity, and the second coefficient is used to indicate the degree of contribution of the second similarity in the process. Based on the multiple mixed similarity scores, text statements that match the opinion statement are determined from the original text.
6. The method according to claim 5, characterized in that, The step of determining the text statement matching the opinion statement from the original text based on the multiple mixed similarity scores includes: Determine at least one similarity greater than a preset similarity from the plurality of mixed similarities; The text statements corresponding to at least one similarity in the original text are determined as text statements that match the opinion statement.
7. The method according to claim 5, characterized in that, The determination of multiple first similarities between the first dense vector of the opinion statement and the second dense vectors of each of the text statements includes: The dot product between the first dense vector of the opinion statement and the second dense vector of each of the text statements is determined as the plurality of first similarities; And, determining multiple second similarities between the first sparse vector of the opinion statement and the second sparse vectors of each of the text statements includes: For any text statement, multiple groups of words are determined from multiple words in the opinion statement and multiple words in the text statement. Each group of words in the multiple groups of words includes at least one first word and at least one second word. The first word comes from the opinion statement and the second word comes from the text statement. The first word and the second word are the same. Based on the weights corresponding to at least one first segment and at least one second segment in each group of segmented words, a second similarity is determined between the first sparse vector of the opinion statement and the second sparse vector of the text statement, so as to obtain the plurality of second similarities.
8. The method according to claim 7, characterized in that, The determination of the second similarity between the first sparse vector of the opinion statement and the second sparse vector of the text statement, based on the weights corresponding to at least one first segment and at least one second segment in each group of segmented words, includes: For any group of word segments, determine the product between the weights of each first word in at least one first word in the group of word segments and the weights of each second word in the group of word segments, and obtain multiple product values; The product of the sum of the multiple product values and the number of word segments is determined as the third similarity. The sum of the third similarities corresponding to the multi-group words is determined as the second similarity.
9. An apparatus for processing text, characterized in that, The device includes: The acquisition module is used to acquire the original text and summary text corresponding to the conference media content. The conference media content is audio or video, and the original text is obtained by speech recognition of the conference media content. The determination module is used for: Determine a first target vector for each viewpoint statement in the summary text, and determine a second target vector for each text statement in the original text. The first target vector includes a first dense vector and a first sparse vector, and the second target vector includes a second dense vector and a second sparse vector. Based on the similarity between the first target vector and the second target vector, text statements that match the viewpoint statements in the summary text are determined from the original text.
10. A system for processing text, characterized in that, The system includes: a server and a client; The server is used for: The system receives a target request sent by the client. The target request includes conference media content. The target request is used to request the determination of text statements that match the viewpoint statements in the conference summary text corresponding to the conference media content from the original conference text corresponding to the conference media content. The conference media content is audio or video. The original text and summary text corresponding to the conference media content are determined. The original text is obtained by speech recognition of the conference media content. Each text statement has a corresponding identifier, which is used to indicate the position of the text statement in the original text. Determine a first target vector for each viewpoint statement in the summary text, and determine a second target vector for each text statement in the original text. The first target vector includes a first dense vector and a first sparse vector, and the second target vector includes a second dense vector and a second sparse vector. Based on the similarity between the first target vector and the second target vector, text statements that match the viewpoint statements in the summary text are determined from the original text. The original text, each opinion statement, and the text statements matching each opinion statement, along with the identifiers corresponding to the text statements, are sent to the client.
11. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the electronic device to perform the method as described in any one of claims 1 to 8.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores executable program code that, when executed, implements the method as described in any one of claims 1 to 8.