Statement segmentation, dialogue, conference summary generation and public opinion analysis methods and products
Through global and dynamic local adjustment methods, combined with sentence feature extraction and position-aware affinity propagation topic segmenter, the segmentation position is optimized, which solves the problem of low topic segmentation accuracy in the existing technology and achieves high-precision sentence topic segmentation.
Patent Information
- Application Number
- CN202510466359.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-09-23
AI Technical Summary
The existing topic segmentation method based on the global segmentation method of sentence similarity has low accuracy, resulting in low topic segmentation accuracy.
A global and dynamic local adjustment method is adopted to adjust the segmentation position to improve the segmentation accuracy through sentence feature extraction and position-aware affinity propagation topic segmenter combined with a dynamic topic boundary optimization module.
High-precision sentence topic segmentation is achieved, which improves the precision and accuracy of topic segmentation.
Smart Images

Figure CN120687553A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and specifically to a method and product for sentence segmentation, dialogue, meeting minutes generation, and public opinion analysis. Background Art
[0002] Topic segmentation aims to divide multiple sentences in a time sequence into multiple segments, where the sentences within each segment share similar topics. In other words, the sentences within each segment share the same topic, while the topics within different segments vary. Topic segmentation is crucial for downstream tasks in natural language processing, such as dialogue summarization, dialogue generation, response prediction, and question answering. Effective topic segmentation can improve the accuracy of these downstream tasks.
[0003] Currently, topic segmentation primarily involves calculating the similarity between sentences based on their features. This similarity is then used to identify the sentence segmentation boundaries, also known as segmentation locations. This globally segments multiple sentences into segments with multiple topics. However, this global segmentation approach based on sentence similarity is relatively crude, resulting in low precision in the identified segmentation boundaries and, consequently, in the segmented topics. Summary of the Invention
[0004] The embodiments of the present application provide a topic segmentation method, a model training method and related products. The embodiments of the present application obtain the segmentation position of the sentence with high precision through global and dynamic local adjustment, thereby improving the segmentation accuracy of the topic of the sentence.
[0005] In a first aspect, an embodiment of the present application provides a sentence segmentation method, comprising:
[0006] Acquiring time series data, wherein the time series data includes a plurality of statements;
[0007] Performing feature extraction on each of the multiple sentences to obtain features of each sentence;
[0008] Segmenting the plurality of sentences based on features of the plurality of sentences to obtain a plurality of segmentation positions;
[0009] For the i-th segmentation position among the multiple segmentation positions Based on the features of the first sentence, the segmentation position Adjust to get the split position The corresponding segmentation position b i , wherein the first sentence is the i-1th segmentation position among the multiple segmentation positions The corresponding segmentation position b i-1 and the i+1th split position The statements between .
[0010] In a second aspect, an embodiment of the present application provides a model training method, comprising:
[0011] Acquire a time series data sample, wherein the time series data sample includes a plurality of training sentences;
[0012] Inputting each of the plurality of training sentences into a first model for feature extraction to obtain features of each training sentence;
[0013] Segmenting the plurality of training sentences based on a feature of each training sentence to obtain a plurality of segmentation positions;
[0014] For the jth segmentation position among the multiple segmentation positions Based on the features of the first training sentence, the segmentation position Adjust to get the split position The corresponding segmentation position c j , wherein the first training sentence is the segmentation position c corresponding to the j-1th segmentation position among the multiple segmentation positions j-1 and the j+1th split position The sentences between
[0015] Based on the segmentation position c j and the plurality of training sentences, training the first model to obtain a second model.
[0016] In a third aspect, an embodiment of the present application provides a conversation method, including:
[0017] Get the user's question statement in the first round;
[0018] Acquire a dialogue sentence sequence, where the dialogue sentence sequence includes a plurality of dialogue sentences of a second round, where the second round and the first round belong to the same dialogue, and the second round precedes the first round;
[0019] Segmenting the multiple conversations using the method of the first aspect to obtain multiple first segmentation positions;
[0020] Determining a reply sentence corresponding to the question sentence based on the plurality of first segmentation positions and the question sentence;
[0021] The first round of dialogue is conducted with the user based on the reply statement.
[0022] In a fourth aspect, an embodiment of the present application provides a method for generating meeting minutes, including:
[0023] Acquire a conference text sequence, wherein the conference text sequence includes a plurality of spoken sentences;
[0024] Segmenting the plurality of spoken sentences using the method of the first aspect to obtain a plurality of second segmentation positions;
[0025] A meeting summary is generated based on the multiple second segmentation positions and the multiple spoken sentences.
[0026] In a fifth aspect, an embodiment of the present application provides a method for analyzing public opinion, including:
[0027] Obtaining a comment sequence of user-generated content, wherein the comment sequence includes a plurality of comment sentences;
[0028] Segmenting the plurality of comment sentences using the method described by the first party to obtain a plurality of third segmentation positions;
[0029] Based on the multiple third segmentation positions and the multiple comment statements, public opinion analysis is performed on the user-generated content.
[0030] In the sixth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory, so that the electronic device executes the method described in the first aspect to the fifth aspect.
[0031] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in aspects 1 to 5 is implemented.
[0032] In an eighth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method described in the first to fifth aspects.
[0033] The implementation of the embodiments of the present application has the following beneficial effects:
[0034] As can be seen, in the embodiment of the present application, multiple sentences are first segmented using the sentence features, namely semantic information, to achieve global segmentation of the multiple sentences and obtain multiple segmentation positions. Then, for each segmentation position, the sentences between the adjacent segmentation positions are used to locally adjust the segmentation position within the local range formed by the adjacent segmentation positions, thereby eliminating errors in the global segmentation and obtaining high-precision segmentation positions. Using this high-precision segmentation position, the sentences can be segmented into topics with high precision, thereby improving the accuracy of sentence topic segmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0036] Figure 1 A schematic diagram of a topic segmentation model provided in an embodiment of the present application;
[0037] Figure 2 A schematic diagram of another topic segmentation model provided in an embodiment of the present application;
[0038] Figure 3 A flowchart of a sentence segmentation method provided in an embodiment of the present application;
[0039] Figure 4 A flowchart of another sentence segmentation method provided in an embodiment of the present application;
[0040] Figure 5 A flowchart of a conversation method provided in an embodiment of the present application;
[0041] Figure 6 A diagram of a conversation in an intelligent customer service scenario provided in an embodiment of the present application;
[0042] Figure 7 A diagram of a conversation for an intelligent voice customer service scenario or intelligent outbound call provided in an embodiment of the present application;
[0043] Figure 8 A flowchart of a method for generating meeting minutes provided in an embodiment of the present application;
[0044] Figure 9 A schematic diagram of generating meeting minutes provided in an embodiment of the present application;
[0045] Figure 10 A flowchart of a public opinion analysis method provided in an embodiment of the present application;
[0046] Figure 11 A schematic diagram of public opinion analysis provided in an embodiment of the present application;
[0047] Figure 12 A schematic diagram of a model training method provided in an embodiment of the present application;
[0048] Figure 13 A schematic diagram of constructing a negative sample set provided in an embodiment of the present application;
[0049] Figure 14 A schematic diagram of a sentence segmentation device provided in an embodiment of the present application;
[0050] Figure 15 A schematic diagram of a model training device provided in an embodiment of the present application;
[0051] Figure 16 A schematic diagram of a conversation device provided in an embodiment of the present application;
[0052] Figure 17 A schematic diagram of a device for generating meeting minutes provided in an embodiment of the present application;
[0053] Figure 18 A schematic diagram of a public opinion analysis device provided in an embodiment of the present application;
[0054] Figure 19 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0056] The terms "first," "second," "third," and "fourth," etc., in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, rather than to describe a specific order. In addition, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0057] References herein to "embodiments" mean that a particular feature, result, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0058] In order to facilitate understanding of the technical solution of this application, the relevant terms involved in this application are first explained and illustrated.
[0059] Intelligent customer service: This service primarily relies on text interaction technology, using natural language processing and machine learning algorithms to understand user input and generate text responses. Intelligent customer service is typically integrated into websites, apps, or instant messaging tools, supporting multiple input methods such as text, emoticons, and images. It allows real-time conversations with users through a chat window, supports multiple rounds of conversation, and allows users to review conversation history at any time. It is commonly used to answer frequently asked questions, provide business inquiries, and provide self-service assistance.
[0060] Intelligent Voice Customer Service: This intelligent service converts user audio into text using speech recognition, generates text responses using natural language processing, and then uses speech synthesis to convert these responses into speech for user output. It is primarily used in hotlines, such as common IVR hotlines.
[0061] Smart outbound calling: An AI-powered automated calling method that automatically dials and interacts with users to complete specific tasks. It's commonly used in agent marketing (e.g., new product launches), customer service (e.g., customer return visits, satisfaction surveys), and debt collection (e.g., debt repayment reminders).
[0062] Affinity Propagation (AP) clustering algorithm: The basic idea of the AP clustering algorithm is to treat data as nodes in a network. By passing messages between data points, namely responsibility and availability, the number and location of cluster centers are continuously modified until the similarity of the entire data set is maximized. At the same time, high cluster centers are generated and the remaining points are assigned to corresponding clusters.
[0063] First, the subject segmentation process of this application is explained in conjunction with the model structure of this application.
[0064] See Figure 1 , Figure 1 This is a schematic diagram of a topic segmentation model provided in an embodiment of the present application. Figure 1 As shown, the topic segmentation model includes: a semantic feature extraction model and a topic segmentation module.
[0065] For example, for multiple statements in time series data (such as Figure 1 As shown in u1,u2,u3,…,u i ,…,u n ), the multiple statements u1,u2,u3,…,u i ,…,u n Input them into the semantic feature extraction model for feature extraction to obtain the features of each sentence, that is, h1, h2, h3, ..., h i,…,h n Then, the features of each sentence are input into the topic segmentation module for topic segmentation to obtain the final multiple segmentation positions. Figure 1 As shown, using h1,h2,h3,…,h i ,…,h n , for u1,u2,u3,…,u i ,…,u n Perform topic segmentation and obtain segmentation positions b1, b2 and b3. Then b1, b2 and b3 will convert u1, u2, u3, ..., u i ,…,u n It is divided into segments with four topics. Specifically, u1 corresponds to a topic, u2, u3 correspond to a topic, u4, ..., u i Corresponding to a topic, u i+1 ,…,u n Corresponding to a topic.
[0066] See Figure 2 , Figure 2 This is a schematic diagram of another topic segmentation model provided in the embodiment of the present application. Figure 2 As shown in Figure 2, the topic segmentation model includes: semantic feature extraction model, position-aware affinity propagation topic segmentor, and dynamic topic boundary optimization module. Figure 1 The semantic feature extraction model shown is the same and will not be described again. The location-aware affinity propagation topic segmenter and the dynamic topic boundary optimization module together constitute Figure 1 The topic segmentation module shown.
[0067] For example, multiple statements u1,u2,u3,…,u i ,…,u n Input them into the semantic feature extraction model for feature extraction to obtain the features of each sentence, that is, h1, h2, h3, ..., h i ,…,h n Then, the features of each sentence are input into the location-aware affinity propagation topic segmenter for topic segmentation, and multiple segmentation positions are obtained, namely the initial segmentation positions, such as Figure 2 Shown Then, multiple segmentation positions are input into the dynamic subject boundary optimization module, and each segmentation position is adjusted to obtain the final segmentation position. Figure 2 b1, b2 and b3 are shown.
[0068] Specifically, when adjusting the split position, the split position is adjusted locally, for example, Will be divided The corresponding segmentation position b i-1 and the i+1th split position Split position Adjust to get the split position The corresponding segmentation position b i Therefore, for the split position It can be split at position b0 and Adjust between them, where b0 is the starting position of multiple statements ( Figure 2 (not shown in the figure), the segmentation position b1 is obtained, where b1 is the The split position is obtained after adjustment. Can be in b1 and Adjust between The split position is obtained after adjustment. Can be used in b2 and Adjust between The segmentation position obtained after adjustment, The end position of multiple statements ( Figure 2 After obtaining the final segmentation position, multiple sentences can be segmented into segments with multiple topics. For example, u1 corresponds to a topic, u2, u3 correspond to a topic, u4, ..., u i Corresponding to a topic, u i+1 ,…,u n Corresponding to a topic.
[0069] See Figure 3 , Figure 3 A flow chart of a sentence segmentation method provided in an embodiment of the present application. The method is applied to the sentence segmentation device of the present application. The method includes but is not limited to the following steps:
[0070] 301: Acquire time series data, where the time series data includes multiple statements.
[0071] Among them, the statements in this application can also be called sentences or a sentence.
[0072] Exemplarily, the time series data can be any type of time series data, as long as it is time series data with temporal continuity, that is, time series data obtained at multiple consecutive time points, it meets the requirements of this application. Therefore, multiple statements are statements obtained at multiple consecutive time points.
[0073] Optionally, the above-mentioned time series data includes but is not limited to: conversation sequence, meeting text sequence, comment sequence, etc.
[0074] Exemplarily, the above-mentioned dialogue sequence can be a sequence of dialogue sentences in a multi-round dialogue. For example, dialogue sentences in each round of the multi-round dialogue are obtained, and then the dialogue sentences in each round of the dialogue are combined into the dialogue sequence in chronological order, where the dialogue sentences include questions and responses.
[0075] For example, the conference text sequence can be a sequence of speeches (i.e., speech content) of participants in a conference. For example, the speeches (i.e., speech content) of the participants in the conference are obtained and the speeches of the participants are organized into the conference text sequence in chronological order.
[0076] For example, the comment sequence may be a sequence of comment sentences on user-generated content. For example, the comment sentences for the user-generated content are obtained, and then the comment sentences are organized into the comment sequence in chronological order.
[0077] It should be noted that the user-generated content involved in this application can be any type of user-generated content, such as images, text, graphics or videos, etc. This application does not limit user-generated content.
[0078] For the convenience of description, this application mainly takes the above time series data as a dialogue sequence as an example, and assumes that the multiple sentences in the dialogue sequence are u1, u2, u3, ..., u i ,…,u n Take the example for explanation, where n is the number of multiple statements.
[0079] 302: Perform feature extraction on each of the multiple sentences to obtain features of each sentence.
[0080] Exemplarily, semantic feature extraction is performed on each sentence to obtain the features of each sentence, wherein the features of each sentence can be understood as feature representation or feature vector of each sentence.
[0081] Exemplarily, feature extraction is performed on each sentence using a semantic feature extraction model to obtain features of each sentence.
[0082] Optionally, the semantic feature extraction model can be the second model of the present application, that is, the second model is used to extract features from each sentence. The second model is trained by the first model. The process of training the second model will be described in detail later, so no further description is given here. Optionally, the semantic feature extraction model can be a traditional semantic feature extraction model, such as a traditional recurrent neural network or a transform network. The present application does not limit the type of semantic feature extraction model.
[0083] 303: Segment the multiple sentences based on the features of the multiple sentences to obtain multiple segmentation positions.
[0084] Among them, the segmentation of multiple sentences mentioned here is essentially the topic segmentation of multiple sentences.
[0085] Exemplarily, the semantic similarity between any two sentences in the plurality of sentences is determined based on the features of the two sentences. For example, the Euclidean distance between the features of the two sentences is calculated, and the semantic similarity between the two sentences is determined based on the Euclidean distance.
[0086] For example, the semantic similarity between the two sentences can be expressed by formula (1):
[0087] S(i,j)=-||h i -h j || Formula (1);
[0088] Among them, i and j are the i-th and j-th statements in multiple statements, h i represents the characteristics of the i-th sentence, h j represents the feature of the j-th sentence, and S(i,j) represents the similarity between the i-th sentence and the j-th sentence.
[0089] Then, based on the semantic similarity of the two sentences, the multiple sentences are clustered to obtain a first cluster center. Exemplarily, based on the semantic similarity of any two sentences, a similarity matrix of the multiple sentences is constructed. Then, based on the similarity matrix, the multiple sentences are clustered to obtain a plurality of first cluster centers.
[0090] Optionally, the positions of any two sentences are obtained, wherein the positions of the sentences are the positions of the sentences in the above time series data, wherein the positions of the sentences in the time series data can be represented by the numbers or serial numbers of the sentences in the time series data, and the numbers or serial numbers indicate the order of the sentences in the time series. For example, the above multiple dialogue sentences u1, u2, u3, ..., u i ,…,u nThe positions of any two sentences are 1, 2, 3, ..., i, ..., n respectively. Then, based on the positions of any two sentences, the positional similarity of the two sentences is determined. Exemplarily, based on the position of each sentence in a plurality of sentences, the positional encoding of each sentence is determined, for example, position encoding is performed based on the position of each sentence to obtain the positional encoding of each sentence. Then, based on the positional encoding of any two sentences, the positional similarity of the two sentences is obtained. For example, the Euclidean distance between the positional encodings of the two sentences is calculated, and based on the Euclidean distance, the positional similarity of the two sentences is determined.
[0091] For example, the position similarity of two sentences can be expressed by formula (2):
[0092] p(i,j)=||p i -p j || Formula (2);
[0093] Among them, p i represents the positional encoding of the i-th sentence, p j Represents the positional encoding of the j-th sentence.
[0094] Furthermore, based on the semantic similarity and positional similarity of any two sentences, the similarity between the two sentences is determined. For ease of distinction, this similarity can be referred to as the comprehensive similarity of the two sentences, i.e., a comprehensive similarity that includes both semantic similarity and positional similarity. For example, the positional similarity of the two sentences is used as a penalty term, and the semantic similarity is penalized to obtain the similarity between the two sentences.
[0095] For example, the similarity between two sentences can be expressed by formula (3):
[0096] S(i,j)=-||h i -h j ||-α*||p i -p j || Formula (3);
[0097] Among them, α is a preset parameter, which indicates the intensity of punishment.
[0098] Then, based on the similarity between any two sentences, multiple sentences are clustered to obtain the first cluster center.
[0099] Exemplarily, based on the similarity between any two sentences, a similarity matrix of multiple sentences is constructed; based on the similarity matrix, the multiple sentences are clustered to obtain multiple first cluster centers.
[0100] It should be noted that, generally speaking, due to the continuity of speech, the topics of sentences that are close to each other are close, that is, they are more similar, and the probability of belonging to the same topic is relatively high; while the probability of sentences that are far away from each other belonging to the same topic is relatively low. However, the semantic similarity between sentences (that is, considering whether similarity is only at the semantic level) is not limited by the influence of distance, and the semantics of sentences that are far away may also be relatively similar. Therefore, position similarity is added as a penalty term in formula (3). Even if the semantics are relatively similar, due to the penalty of distance similarity, sentences that are relatively far away are made as dissimilar as possible. In this way, in subsequent clustering, sentences that are relatively far away will not be clustered into one category, that is, they will not be attributed to the same topic, thereby ensuring the accuracy of topic segmentation. Moreover, due to the addition of position similarity, sentences that are relatively far apart will be made as dissimilar as possible, so that sentences belonging to the same topic are concentrated nearby. Then, the probability that the latter of two sentences belonging to the same topic is the next sentence of the previous sentence is relatively high, which ensures the continuity of sentences belonging to the same topic. There is no need to make separate judgments on the continuity of sentences, which simplifies the difficulty of position segmentation and improves the accuracy of topic segmentation.
[0101] Exemplarily, based on the similarity matrix, multiple statements are clustered to obtain multiple first cluster centers, including:
[0102] First, initialize the first responsibility matrix (Responsibility Matrix) and the first availability matrix (Availability Matrix). Then, based on the similarity matrices of multiple statements, perform the first iterative update on the first responsibility matrix and the first availability matrix to obtain the second responsibility matrix and the second availability matrix. Then, calculate the cluster center corresponding to each statement based on the second responsibility matrix and the second availability matrix. Based on the cluster center corresponding to each statement, determine the cluster center corresponding to the first iterative update. Then, perform the second iterative update on the second responsibility matrix and the second availability matrix to obtain the cluster center corresponding to the second iterative update. Repeat multiple cycles until the cluster center tends to be stable and no longer changes, and obtain multiple first cluster centers.
[0103] Finally, based on the first cluster center, the multiple segmentation positions are determined.
[0104] It is understood that the first cluster center is a statement among multiple statements, and the number of first cluster centers is one or more, that is, multiple statements can be clustered under one topic or multiple topics. For ease of description, this application mainly describes the number of first cluster centers as multiple.
[0105] Exemplarily, the sentence corresponding to each first cluster center in multiple sentences is determined, and based on the sentence corresponding to each first cluster center, the segmentation position corresponding to each first cluster center is determined to obtain the above-mentioned multiple segmentation positions. For example, the position between the sentence and the adjacent sentence of the sentence is used as the segmentation position corresponding to the first cluster center, wherein the adjacent sentence can be an adjacent sentence located before the sentence in multiple sentences, or a sentence located after the sentence in multiple sentences, and this application does not limit this. For the sake of unified description, this application mainly uses the example of the adjacent sentence being the adjacent sentence located after the sentence corresponding to the first cluster center for explanation.
[0106] For example, if the segmentation position is quantized, it can be represented by the position of the first cluster center, that is, the position of the first cluster center is used as the quantized value of the segmentation position corresponding to the first cluster center; or, for example, the position of the adjacent sentence of the first cluster center is used as the quantized value of the segmentation position corresponding to the first cluster center, which is not limited in this application. For the sake of convenience, this application mainly uses the position of the first cluster center as the quantized value of the segmentation position corresponding to the first cluster center as an example for explanation.
[0107] For example, for multiple statements u1,u2,u3,…,u i ,…,u n , if u2 and u are clustered i-1 、u i As the first cluster center, the position between u2 and u3 is used as a split position, and u i-1 and u i The position between them is used as a split position, and u i and u i+1 The position between u2 and u3 is used as a segmentation position to determine the segmentation position corresponding to each first cluster center. i-1 、u i The corresponding quantization values of the segmentation positions are: 2, i-1, i.
[0108] It should be noted that, in order to facilitate the adjustment of the sentence segmentation positions, the starting position and the ending position of multiple sentences are also used as two segmentation positions in this application. Therefore, after obtaining the segmentation position corresponding to each first cluster center, the starting position and the ending position can also be used as two segmentation positions, thereby obtaining the multiple segmentation positions mentioned in step 303. Therefore, the multiple segmentation positions mentioned above include the starting position and the ending position of multiple sentences. However, the two segmentation positions of the starting position and the ending position are not obtained based on the first cluster center, but are set.
[0109] It can be seen that when the existing technology uses the similarity between sentences to perform global topic segmentation, it will set the number of topics in advance and forcibly divide the topics of multiple sentences into the set number, which in turn leads to the topic segmentation being not fine and accurate. However, when clustering using the similarity between sentences in this application, there is no need to pre-set the number of topics. Instead, the clustering algorithm autonomously clusters the topics that the multiple sentences should have, thus ensuring the accuracy of topic segmentation during global segmentation.
[0110] For the sake of distinction, the present application may refer to the above-mentioned multiple segmentation positions as initial segmentation positions.
[0111] 304: For the i-th segmentation position among the multiple segmentation positions Based on the features of the first sentence, the segmentation position Adjust to get the split position The corresponding segmentation position b i , wherein the first sentence is the i-1th segmentation position among the multiple segmentation positions The corresponding segmentation position b i-1 and the i+1th split position The statements between .
[0112] For ease of description, use Indicates the above multiple split positions, then is the clustered segmentation position, and The starting and ending positions of the above statements are the starting and ending positions. When the starting and ending positions are also used as two split positions, when adjusting the split position, there is no need to adjust the split position represented by the starting and ending positions. Just change b0 and b m As and Therefore, i is an integer greater than 0 and less than m, where m is the number of the plurality of segmentation positions.
[0113] Secondly, the reason why this application adjusts the segmentation position is that when extracting semantic features from a sentence, it is impossible to guarantee that the subject of the sentence can be fully perceived, and thus the extracted features may not be able to accurately express the subject corresponding to the sentence, that is, there is noise in the semantic feature extraction process. Moreover, clustering ends when convergence is reached, and there is no 100% guarantee that the first cluster center is correct, nor can it be said that the segmentation position corresponding to the first cluster center is the precise subject segmentation position. In general, there will be noise in the clustering process.
[0114] In addition, although there will be noise in the clustering process, the noise content is relatively small. Therefore, this application believes that the segmentation positions clustered above have a certain degree of confidence, that is, even if there are errors in the initial segmentation positions clustered, they are only errors in the local area, that is, the error of each segmentation position is only limited to the local range formed by the two adjacent segmentation positions of the segmentation position. Therefore, when adjusting the segmentation position clustered, this application only adjusts the segmentation position within the local range formed by the two adjacent segmentation positions, that is, locally adjusts the segmentation position to eliminate the clustered errors, thereby finding the precise segmentation position, and then improving the accuracy of the sentence topic segmentation.
[0115] Furthermore, the present application adjusts the split positions in a sequential, cyclical manner, i.e., the split positions are adjusted sequentially from smallest to largest. Therefore, when the present application makes a local adjustment to the split positions, if the previous split position adjacent to the split position has already been adjusted, the split position will be adjusted within the local range formed by the new split position after the previous split position is adjusted and the next split position adjacent to the split position.
[0116] For example, for the i-th segmentation position among the multiple segmentation positions Based on the features of the first sentence, the segmentation position b i Adjust to get the split position The corresponding segmentation position b i , wherein the first sentence is the i-1th segmentation position among the multiple segmentation positions The corresponding segmentation position b i-1 and the i+1th split position The statement between them. Among them, the split position b i-1 For split position Adjusted split position. Therefore, according to the split position and split position The first statement in the local scope is split Make adjustments.
[0117] For example, based on the features of the second sentence and the features of the third sentence, the semantic similarity between the second sentence and the third sentence is determined to obtain the first similarity corresponding to the second sentence, that is, the semantic similarity is used as the first similarity corresponding to the second sentence. i-1 With the split position The third statement is an adjacent statement of the second statement, wherein the adjacent statement can be an adjacent statement located before the second statement or an adjacent statement located after the second statement, and this application does not limit this. For the sake of convenience, the adjacent statements of the statements mentioned in this application are not specifically explained, and are all illustrated by the adjacent statements located after the statement.
[0118] It should be noted that since the semantic similarity is calculated using the adjacent statement following the statement, the last statement in the local scope does not have the next adjacent statement, and thus the similarity corresponding to the statement cannot be calculated. Therefore, for the last statement in the local scope, it is not necessary to participate in the process of locally adjusting the segmentation position, or, in particular, use the previous adjacent statement to calculate the first similarity corresponding to the statement. For ease of description, this application mainly uses the example of using the previous adjacent statement to calculate the first similarity corresponding to the statement.
[0119] Optionally, the second sentence is used as an example to illustrate how to determine the segmentation position b. i-1 With the split position Therefore, for the fourth sentence, the fourth sentence is the segmentation position b i-1 and split position The sentence between the two is different from the sentence in the second sentence, which can also be understood as the split position b i-1 With the split position Therefore, the second similarity corresponding to the fourth sentence can be determined based on the first similarity corresponding to the second sentence, that is, the second similarity corresponding to the fourth sentence can be calculated in a similar way to the first similarity corresponding to the second sentence, so that the segmentation position b can be calculated. i-1 and split position The similarity between each sentence.
[0120] For example, still using Figure 1 and Figure 2 For example, if for but Right now is the starting position, b i-1 It is also the starting position. for At the starting position The statements between them, that is, the first statement includes u1, u2, u3, ..., u i-1 If the second statement is u2, then the third statement is u3, and the fourth statement includes u1, u3, ..., u i-1Therefore, based on the features of u2 and u3, the semantic similarity between u2 and u3 can be determined to obtain the first similarity corresponding to u2. Then, similar to the way of calculating the first similarity corresponding to u2, u1, u3, ..., u3 are calculated respectively. i-1 The corresponding second similarity.
[0121] Then, based on the first similarity and the second similarity corresponding to the fourth sentence, the segmentation position Make adjustments.
[0122] Exemplarily, the score of the second sentence is determined based on the first similarity and the second similarity corresponding to the fourth sentence.
[0123] Exemplarily, based on the first similarity, the segmentation position b is traversed in reverse order. i-1 With the split position In the sentences between, the second similarity corresponding to the fourth sentence located before the second sentence is obtained to obtain a third similarity, wherein the third similarity is the first second similarity greater than the first similarity.
[0124] Specifically, starting from the second statement, traverse in reverse order (i.e., traverse in chronological order) to split position b i-1 and split position The second similarity corresponding to the fourth sentence before the second sentence in the sentences between. When the second similarity greater than the first similarity is obtained in the first traversal, the second similarity is used as the third similarity.
[0125] It should be noted that if the second similarity corresponding to a fourth sentence is greater than the first similarity, that is, the second similarity is the first second similarity greater than the first similarity, then the second similarity is used as the third similarity and the traversal is stopped. Even if there are still fourth sentences that have not been traversed, the remaining fourth sentences that have not been traversed will not be traversed.
[0126] It should be noted that, in the process of reverse traversal, if all the fourth statements before the second statement are traversed and no second similarity is found that is greater than the first similarity, the first similarity corresponding to the second statement is used as the third similarity. i-1 With the split position The first sentence in the local scope, in this case, there is no sentence before the second sentence in the local scope, then it can also be understood that no second similarity greater than the first similarity is found, then the first similarity corresponding to the second sentence can be used as the above-mentioned third similarity.
[0127] For example, for the split position For b1, if the second statement is u3, during the reverse traversal, if the second similarity corresponding to u2 is greater than the first similarity corresponding to u3, then the second similarity corresponding to u2 is directly used as the third similarity, and the remaining fourth similarity, i.e., u1, is not traversed. If the second similarities corresponding to u2 and u1 are both less than the first similarity, then the first similarity corresponding to u3 is used as the third similarity. If the second statement is u1, then for u1, there is no fourth statement before u1, so the first similarity corresponding to u1 is used as the third similarity.
[0128] For example, based on the first similarity, the segmentation position b is traversed in positive order. i-1 With the split position In the sentences between, the second similarity corresponding to the fourth sentence located after the second sentence is obtained to obtain a fourth similarity, wherein the fourth similarity is the first second similarity greater than the first similarity.
[0129] Specifically, starting from the second statement, traverse in positive order (i.e., traverse in chronological order) to split position b i-1 and split position The second similarity corresponding to the fourth sentence after the second sentence in the sentences between. When the second similarity greater than the first similarity is obtained in the first traversal, the second similarity is used as the fourth similarity.
[0130] It should be noted that if the second similarity corresponding to a fourth sentence is greater than the first similarity, that is, the second similarity is the first second similarity greater than the first similarity, then the second similarity is used as the third similarity and the traversal is stopped. Even if there are still fourth sentences that have not been traversed, the remaining fourth sentences that have not been traversed will not be traversed.
[0131] It should be noted that, in the process of forward traversal, if all the fourth statements after the second statement are traversed and no second similarity is found that is greater than the first similarity, the first similarity corresponding to the second statement is used as the fourth similarity. i-1 With the split position The last statement in the local scope. In this case, there is no statement after the second statement in the local scope. It can also be understood that no second similarity greater than the first similarity is found. The first similarity corresponding to the second statement can be used as the third similarity.
[0132] For example, for the split position For b1, if the second sentence is u3, in the process of forward traversal, if the second similarity corresponding to u4 is greater than the first similarity corresponding to u3, then the second similarity corresponding to u4 is directly used as the fourth similarity mentioned above, and the remaining fourth sentences are no longer traversed, that is, u5, ..., u are no longer traversed. i-1 . If u4,...,u i-1 The corresponding second similarity is less than the first similarity of u3, then the first similarity of u3 is used as the fourth similarity. i-1 , then for u i-1 For example, in the local range u i-1 If there is no fourth statement, then u i-1 The corresponding first similarity is used as the fourth similarity.
[0133] Then, based on the first similarity, the third similarity, and the fourth similarity, a score of the second sentence is determined.
[0134] Exemplarily, based on the first similarity, the third similarity and the fourth similarity, the relative depth of the second sentence is determined, and the relative depth is used as the score of the second sentence. The score of the second sentence is used to characterize the semantic difference between the second sentence and the adjacent sentences. The larger the score, the greater the semantic difference between the second sentence and the adjacent sentences. Therefore, the larger the score, the greater the probability of using the second sentence as the segmentation position.
[0135] Exemplarily, a first difference between the third similarity and the first similarity, and a second difference between the fourth similarity and the first similarity are obtained; based on the first and second differences, the relative depth of the second sentence is determined, for example, by averaging the first and second differences to obtain the relative depth. The first difference can be considered as the relative depth of the left side of the second sentence, and the second difference can be considered as the relative depth of the right side. Therefore, the relative depth of the second sentence can be considered as a "V"-shaped depth. The deeper the "V"-shaped depth, the greater the semantic difference between the second sentence and the adjacent sentence.
[0136] For example, the score of the second sentence can be expressed by formula (4):
[0137] score(i)=1 / 2*(lflag(i)+rflag(i+1)-2*sim(ui,ui+1) Formula (4);
[0138] Among them, i represents the second sentence, lflag(i) is the third similarity, rflag(i+1) is the fourth similarity, sim(ui,ui+1) is the first similarity, and score(i) is the score of the second sentence.
[0139] Furthermore, based on the score of the second sentence, the segmentation position Make adjustments.
[0140] For example, based on the score of the second sentence, the segmentation position b is determined. i-1 With the split position The score of each sentence between is similar to the way of determining the score of the second sentence, and the split position b is determined respectively. i-1 With the split position Then, based on the split position b i-1 With the split position The score of each sentence between determines the split position b i-1 With the split position Based on the maximum score, the segmentation position Make adjustments.
[0141] For example, determine the sentence corresponding to the maximum score and split the sentence into After adjusting to the sentence, that is, adjusting to the sentence corresponding to the maximum score and the next sentence adjacent to the sentence, the split position is obtained. The corresponding segmentation position b i It is understandable that if the sentence corresponding to the maximum score is itself the split position The corresponding statement, then there is no need to split the position If you make adjustments, the split position and split position b i are the same.
[0142] Furthermore, by adjusting the split position In a similar way, the split positions can be Adjust to get the split position The corresponding segmentation positions are b1, b2, b3, ..., b i ,……,b m-1 It should be noted that and They are the starting position and the ending position of multiple statements respectively. These two split positions do not need to be adjusted. The adjusted split positions b0 and b m ,in, is the same as b0, and b m are the same, they are only distinguished in form for the convenience of distinction and description. In essence, they are the starting and ending positions of multiple statements. After adjustment, multiple adjusted segmentation positions b0, b1, b2, b3, ..., b i ,……,b m .
[0143] It is understandable that the above segmentation of multiple sentences is based on the topic. Therefore, the above segmentation positions b0, b1, b2, b3, ..., b i ,……,b m The above multiple sentences can be divided into multiple topics, that is, divided into multiple different topics. Optionally, the division positions b0, b1, b2, b3, ..., b i ,……,b m The topics of the sentences between two adjacent segmentation positions are the same and are one of the above multiple topics.
[0144] Therefore, further, based on the segmentation position b i , dividing the multiple sentences into multiple topics, that is, dividing them into multiple different topics, wherein the multiple sentences are located at the segmentation position b i-1 and the split position b i The subject of the sentences between is the same and is one of the above multiple topics. Here, multiple sentences are divided into multiple topics, not by performing topic division again, but by using the above division positions b0, b1, b2, b3, ..., b i ,……,b m , split the positions b0, b1, b2, b3, ..., b i ,……,b m The sentences between the adjacent segmentation positions in the shard are divided into one topic, and multiple topics corresponding to the above multiple sentences are obtained. i , dividing the multiple sentences into multiple topics, which can also be understood as based on the segmentation position b i , dividing the multiple sentences into multiple topics.
[0145] It should be noted that the multiple topics divided in this application only divide multiple sentences into multiple topics. However, it is not clear what each topic is, that is, what the corresponding content of each topic is or what the specific content of each topic is. Moreover, this application does not care, and it is not necessary to pay attention to what the specific content of each topic is. It is only necessary to know which sentences have the same topic, that is, to divide sentences with the same topic together, or to divide them into one segment.
[0146] For example, still using Figure 2For example, there are five split positions after adding the start position and the end position, then multiple sentences can be divided into four topics. For the sake of simplicity, these four topics can be called topic 1, topic 2, topic 3 and topic 4, that is, u1 is divided into topic 1, u2 and u3 are divided into topic 2, and u4~u i Divided into topic 3, u i+1 ~u n Divide into Topic 4. However, at this time, it is not clear what the corresponding contents of Topic 1, Topic 2, Topic 3 and Topic 4 are, and there is no need to care about what the corresponding contents of Topic 1, Topic 2, Topic 3 and Topic 4 are.
[0147] In one embodiment of the present application, when the segmentation position When making local adjustments, The planned local range is not necessarily accurate, so it is impossible to find the most correct position for each split position. For example, adjusting the split position The split position is used when For split position Planning local scope, due to the split location There may be errors in itself, so it is the split position The planned local range may be wrong, so the adjusted split position b i Therefore, the present application can adjust the split position multiple times and calculate the position fluctuation after each round of adjustment. If the position fluctuation is relatively small, there is no benefit in continuing the adjustment and the adjustment can be stopped.
[0148] Therefore, based on the segmentation position b i Before segmenting the multiple sentences into multiple topics, based on the segmentation position and the split position b i , determine the segmentation position with The corresponding position deviation.
[0149] For example, the split position and split position b i The square of the difference between The corresponding position deviation. Similarly, the calculation of the segmentation position The corresponding position deviation is similar, except for the split position among multiple split positions The corresponding position deviations can also be calculated for other segmentation positions other than , thereby obtaining the position deviation corresponding to each segmentation position in the plurality of segmentation positions. Finally, based on the position deviation corresponding to each segmentation position in the plurality of segmentation positions, a first position deviation is determined. Optionally, the position deviations corresponding to each segmentation position are summed or averaged to obtain the first position deviation, wherein the first position deviation is used to characterize the adjusted segmentation positions b0, b1, b2, b3, ..., b i ,……,b m Relative to the split position before adjustment position fluctuations.
[0150] Furthermore, based on the first position deviation and the segmentation position b i , dividing the multiple sentences into the multiple topics.
[0151] For example, if the first position deviation is less than or equal to the first threshold, it means that the segmentation positions b0, b1, b2, b3, ..., b i ,……,b m Relative to split position The fluctuation of the segmentation position is relatively small, which means that the segmentation position b0, b1, b2, b3, ..., b i ,……,b m Relative to split position The overall change of the position is relatively small, the split position has tended to be stable, and further adjustment of the split position will not change much. The benefit of further adjustment is relatively small, so you can i , dividing the multiple sentences into the multiple topics, that is, dividing the sentences between adjacent segmentation positions into the same topic, then the sentences at the segmentation position b in the multiple sentences i-1 and split position b i The subject of the sentences between the two is the same and is one of the above multiple subjects. Specifically, the split positions b0, b1, b2, b3, ..., b i ,……,b m As the final segmentation position, and based on the segmentation positions b0, b1, b2, b3, ..., b i ,……,b m Divide the above multiple sentences into multiple topics (m topics), that is, divide the sentences between b0 and b1 into one topic, divide the sentences between b1 and b2 into one topic, and so on. m-1 、b m The sentences between them are divided into one topic, thus obtaining the above multiple topics.
[0152] For example, if the first position deviation is greater than the first threshold, it means that the segmentation positions b0, b1, b2, b3, ..., b i ,……,b m Relative to split position The position fluctuation is relatively large. In the case of large position fluctuation, it is not certain that the segmentation positions b0, b1, b2, b3, ..., b i ,……,b m It is a more accurate segmentation position, so it is necessary to segment the positions b0, b1, b2, b3, ..., b i ,……,b m Continue to adjust. Therefore, for b0, b1, b2, b3, ..., b i ,……,b m The i-th split position b in i , based on the characteristics of the fifth sentence, the segmentation position b i Adjust to get the split position The corresponding new segmentation position b i , wherein the fifth sentence is the i-1th segmentation position among the multiple segmentation positions The corresponding new segmentation position b i-1 and the i+1th split position The corresponding segmentation position b i+1 The statements between .
[0153] Among them, based on the feature pair of the fifth sentence, the segmentation position b i The adjustment process is based on the characteristics of the first sentence, and the segmentation position b i The adjustment process is similar and will not be described again.
[0154] Then, based on the segmentation position b i and the new split position b i , determine the new first position deviation, that is, calculate the new segmentation position b0, b1, b2, b3, ..., b i ,……,b m and the split positions b0, b1, b2, b3, ..., b i ,……,b m The position deviation between them is used to obtain a new first position deviation. If the new first position deviation is still greater than the first threshold, the segmentation position will continue to be adjusted until the new first position deviation is less than or equal to the first threshold, and the new segmentation positions b0, b1, b2, b3, ..., b1 corresponding to the new first position deviation less than or equal to the first threshold are adjusted. i ,……,b m As the final segmentation position, and based on the new segmentation position bi , the above multiple sentences are divided into the multiple topics, that is, the sentences between the new adjacent segmentation positions are divided into one topic, then the sentences at the new segmentation position b in the multiple sentences are divided into the multiple topics. i-1 and the new split position b i The subject of the sentences between the two is the same, and the subject is one of the above multiple subjects. Specifically, based on the new segmentation position b0, b1, b2, b3, ..., b i ,……,b m Split multiple sentences into multiple topics, that is, split multiple sentences into segments with multiple topics. Figure 2 In the example shown, the sentence between the new b0 and b1 corresponds to a topic, the sentence between the new b1 and b2 corresponds to a topic, and so on. m-1 、b m The sentences between correspond to a topic.
[0155] It can be seen that in this embodiment, the segmentation position is adjusted multiple times by calculating the position deviation until the adjusted segmentation position no longer fluctuates or the fluctuation is relatively small relative to the segmentation position before adjustment. Only then will the adjusted segmentation position be used as the final segmentation position, thereby making the determined segmentation position more accurate, and using these segmentation positions to segment the sentence into different topics, thereby further improving the segmentation accuracy of the sentence topic.
[0156] It should be noted that in actual applications, position deviation may not be considered, and the segmentation position may be adjusted only a first preset number of times. After the first preset number of adjustments, the latest segmentation position obtained is used as the final segmentation position, and the final segmentation position is used to perform topic segmentation on multiple sentences. Optionally, the first preset number of times may be 1, 5, 10, or other values, and this application does not limit the first preset number of times.
[0157] As can be seen, in the embodiment of the present application, the sentences are first segmented using their features, i.e., semantic information, to achieve global segmentation of the sentences and obtain multiple segmentation positions. Then, for each segmentation position, the sentences between adjacent segmentation positions are used to locally adjust the segmentation position within the local range formed by the adjacent segmentation positions, thereby eliminating errors in the global segmentation, making the determined segmentation positions more accurate, and thus improving the accuracy of topic segmentation.
[0158] In one embodiment of the present application, after dividing multiple sentences into the above-mentioned multiple topics, the sentences corresponding to each topic in the multiple sentences can be obtained, and based on the sentences corresponding to each topic, the corresponding content or specific content of each topic can be determined, that is, the specific content of each topic can be determined. Exemplarily, topic generation is performed based on the sentences corresponding to each topic, thereby obtaining the corresponding content or specific content of each topic. Furthermore, after obtaining the corresponding content or specific content of each topic, multiple segmentation positions (final segmentation positions) and the corresponding content or specific content of each topic can be displayed.
[0159] It should be noted that if the semantic feature extraction of each sentence in this application is implemented by using the second model of this application, since the second model trained in this application itself has the ability to perceive the subject, the second model will include the subject information in the features of the sentence when extracting the semantic features, thereby extracting relatively similar features for sentences under the same subject. Then, in the clustering process, the clustering will be more accurate, and sentences with the same subject can be clustered into one category. The clustering results can be fully trusted without dynamically adjusting the segmentation position, and there is no need to execute the content of step 304. Multiple sentences can be directly segmented based on multiple segmentation positions, which can also improve the accuracy of segmentation of the subject of the sentence.
[0160] See Figure 4 , Figure 4 This is a flow chart of another sentence segmentation method provided in the embodiment of the present application. Figure 3 The repeated contents in the illustrated embodiment will not be described here again. The method includes but is not limited to the following steps:
[0161] 401: Acquire time series data, where the time series data includes multiple statements.
[0162] 402: Input each of the multiple sentences into the second model for feature extraction to obtain features of each sentence.
[0163] 403: Segment the multiple sentences based on the features of the multiple sentences to obtain multiple segmentation positions.
[0164] For the implementation of steps 401 to 403, please refer to Figure 3 The implementation method in the corresponding method embodiment will not be described again.
[0165] Then, based on the multiple segmentation positions, the multiple sentences may be segmented into multiple topics.
[0166] It should be noted that Figure 3The difference between the corresponding method embodiments is that in this embodiment, the second model is directly used to extract features from sentences. Since the second model is relatively robust and has topic awareness and topic perception capabilities, the features of each sentence extracted by the second model itself contain information about the topic to which each sentence belongs. Therefore, when clustering using the features of sentences with topic information, sentences of the same topic will be clustered together, making the accuracy of the clustered segmentation positions relatively high. Therefore, when the multiple segmentation positions clustered by the clustering algorithm are used as the final segmentation positions and these segmentation positions are used to perform topic segmentation on multiple sentences, the accuracy of the topic segmentation of the sentences can be improved.
[0167] The following will be combined with the accompanying drawings and Figure 3 、 Figure 4 The method embodiments shown describe the application scenarios of the present application.
[0168] See Figure 5 , Figure 5 This is a flow chart of a conversation method provided in an embodiment of the present application. The method is applied to a conversation device. The conversation device can be the above-mentioned sentence segmentation device or an independent device. This application does not limit the conversation device.
[0169] First of all, it should be noted that the dialogue mentioned in this embodiment is a human-computer dialogue, that is, a dialogue between a physical person and a robot, and the human-computer dialogue can be a dialogue in intelligent customer service, a dialogue in intelligent voice customer service, or a dialogue in intelligent outbound calls. This application does not limit the scenario of the dialogue.
[0170] The method includes but is not limited to the following steps:
[0171] 501: Get the user's question statement in the first round.
[0172] The first round is the current round in the conversation, and the question statement is the user's question in the current round.
[0173] Alternatively, as Figure 6 As shown, if the dialogue is a dialogue in intelligent customer service, the question statement is the question statement entered by the user in the dialogue window in the first round, that is, Question m: xxx.
[0174] Alternatively, as Figure 7 As shown, if the conversation is a conversation in intelligent voice customer service, the question statement is obtained by converting the user's question audio in the first round. The user's question audio in the first round is obtained, and then the question audio is converted into text to obtain the question statement, that is, Question m: xxx.
[0175] 502: Acquire a dialogue sentence sequence, wherein the dialogue sentence sequence includes a plurality of dialogue sentences of a second round, the second round and the first round belong to the same dialogue, and the second round is located before the first round.
[0176] For example, the second round can be understood as the user's historical rounds in the conversation, that is, the historical rounds of the first round. Optionally, the second round can be part of the historical rounds in the conversation, or it can be all the historical rounds. For ease of description, this application mainly uses all historical rounds as an example for explanation.
[0177] Exemplarily, the multiple dialogue sentences include dialogue sentences from each historical round. Optionally, the dialogue sentences from each historical round include: dialogue sentences from the robot in that historical round and / or dialogue sentences from the user in that historical round. The dialogue sentences from each historical round are then combined in chronological order to obtain the dialogue sentence sequence.
[0178] Optionally, if the conversation is a conversation with an intelligent customer service representative, the conversation sentences of each historical round include: the user's questions and the robot's answers. For example, Figure 6 As shown, the dialogue sentences of the first historical round include: User's Question 1: xxx and the robot's Answer 1: xxx, and the dialogue sentences of the second historical round include User's Question 2: xxx and the robot's Answer 2: xxx.
[0179] Optionally, if the conversation is an intelligent voice customer service or intelligent outbound call conversation, the conversation sentences of each historical round are the conversation sentences of the robot in that historical round; or, the user's questions and the robot's answers. Figure 7 As shown, the dialogue sentences in the first historical round include: the machine's opening remarks and the robot's introduction to the product; the second historical round includes: the user's Question 1: xxx and the robot's Answer 1: xxx; the dialogue sentences in the third historical round include: the user's Question 2: xxx and the robot's Answer 2: xxx.
[0180] 503: Sentence segmentation is performed on the multiple dialogues to obtain multiple first segmentation positions.
[0181] Optionally, the sentence segmentation method in the above-mentioned sentence segmentation method embodiment can be used to perform sentence segmentation on multiple dialogue sentences to obtain multiple first segmentation positions, which will not be described again.
[0182] For example, Figure 6 As shown, multiple dialogue sentences are divided into dialogue topic 1, dialogue topic 2, dialogue topic...
[0183] For example, Figure 7 As shown, multiple dialogue sentences are divided into dialogue topic 1, dialogue topic 2, dialogue topic 3, dialogue topic...
[0184] 504: Determine a reply sentence corresponding to the question sentence based on the multiple first segmentation positions and the question sentence.
[0185] Exemplarily, the multiple dialogue sentences are segmented into multiple dialogue topics based on multiple first segmentation positions, wherein the dialogue topic of the dialogue sentences between adjacent first segmentation positions is one of the multiple dialogue topics. Specifically, the method for segmenting the dialogue topics is similar to the method for segmenting the topics described above, where the dialogue sentences between adjacent first segmentation positions are grouped into the same dialogue topic, thereby obtaining the multiple dialogue topics described above. Similarly, here, the dialogue sentences are simply divided into multiple dialogue topics, but the specific content or corresponding content of each dialogue topic is not clear. Only by knowing the topics of the dialogue sentences between adjacent first segmentation positions, the dialogue sentences between adjacent first segmentation positions can be grouped into the same topic, thereby obtaining the multiple dialogue topics described above.
[0186] Exemplarily, features of each dialogue topic among multiple dialogue topics and features corresponding to the question statement are obtained.
[0187] Exemplarily, for a first dialogue topic, at least one dialogue statement among the multiple dialogue statements belonging to the first dialogue topic is obtained, that is, at least one dialogue statement classified into the first dialogue topic; feature extraction is performed on the at least one statement to obtain features of the first dialogue topic, wherein the first dialogue topic is any one of the multiple dialogue topics.
[0188] Exemplarily, features of each of the at least one conversation sentence can be obtained. For example, each conversation sentence can be input into the aforementioned second model for feature extraction to obtain features corresponding to each conversation sentence. The features of the at least one conversation sentence are then averaged to obtain features of the first conversation topic. Similar to the first conversation topic, features of each of the multiple conversation topics can be obtained.
[0189] Similarly, for the question statement, the features of the question statement are obtained. For example, the question statement can be input into the second model for feature extraction to obtain the features of the question statement.
[0190] Then, based on the features of each conversation topic and the features corresponding to the question sentence, a response sentence corresponding to the question sentence is determined. For example, based on the features of each conversation topic and the features corresponding to the question sentence, multiple conversation topics are matched with the question sentence to obtain a second conversation topic, which can also be understood as the question sentence matching the second conversation topic.
[0191] Specifically, based on the features of each conversation topic and the features corresponding to the question sentence, the similarity between each conversation topic and the question sentence is determined. Based on the similarity between each conversation topic and the question sentence, a second conversation topic is determined, where the second conversation topic is the conversation topic with the greatest similarity among the multiple conversation topics, or the conversation topic with the greatest similarity. This application primarily uses the example of using the conversation topic with the greatest similarity among the multiple conversation topics as the second topic.
[0192] Then, based on the dialogue sentences belonging to the second dialogue topic among the multiple dialogue sentences, that is, the dialogue sentences classified into the second dialogue topic, a reply sentence corresponding to the question sentence is generated.
[0193] Specifically, the dialogue sentence with the second dialogue topic as the relevant knowledge point or the strongly relevant dialogue sentence is input into the large language model, thereby generating a reply sentence for the question sentence.
[0194] For example, Figure 6 and Figure 7 As shown in the figure, after matching the question statement with multiple conversation topics, conversation topic 2 is determined as the second conversation topic. The gray color indicates that conversation topic 2 has the highest similarity, so conversation topic 2 is selected as the second conversation topic. The conversation statement corresponding to conversation topic 2 is input into the large model as a strongly related conversation statement to generate a response statement for the question statement.
[0195] 505: Conducting the first round of dialogue with the user based on the reply statement.
[0196] Alternatively, as Figure 6 As shown, if the conversation is a conversation in intelligent customer service, the reply statement is input into the conversation window, displayed to the user, and the first round of conversation is carried out with the user.
[0197] Alternatively, as Figure 7 As shown, if the conversation is a conversation in an intelligent voice customer service, the reply statement is converted from text to speech to obtain a reply audio corresponding to the reply statement, that is, the reply audio of the first round is obtained, and the reply audio is returned to the user device so that the user device can play the reply audio, thereby conducting the first round of conversation with the user.
[0198] It can be seen that in the embodiment of the present application, during the human-computer dialogue process, the dialogue sentences in the historical dialogue are first segmented into topics to obtain multiple dialogue topics. Due to the high accuracy of the topic segmentation of the present application, it is possible to segment high-precision dialogue topics. Then, the segmented dialogue topics are matched with the question sentences of the current round respectively to determine the dialogue topics that match the question sentences. Since the accuracy of the segmented dialogue topics is relatively high, high-precision matching of the dialogue topics and the question sentences is achieved. Then, the dialogue sentences in the matched dialogue topic are used as dialogue sentences that are strongly associated with the question sentences, so that in long dialogues, the key information and key content corresponding to the current round can be efficiently and accurately extracted, thereby improving the accuracy and quality of the human-computer dialogue and enhancing the user experience.
[0199] See Figure 8 , Figure 8 A flowchart of a method for generating meeting minutes provided in an embodiment of the present application.
[0200] This method is applied to the meeting minutes generation device of this application. The meeting minutes generation device can be the above-mentioned sentence segmentation device or an independent device. This application does not limit the meeting minutes generation device. The method includes but is not limited to the following steps:
[0201] 801: Acquire a conference text sequence, wherein the conference text sequence includes multiple spoken sentences.
[0202] The conference text sequence may be a conference text sequence of a first conference, the first conference is any conference, and the multiple spoken sentences are spoken sentences of participants in the first conference.
[0203] For example, Figure 9 As shown, for the first meeting, the speech audio of the participants of the first meeting is obtained at the first meeting to obtain the conference audio corresponding to the first meeting. The conference audio is then converted into text, and speech sentence 1, speech sentence 2, speech sentence 3, ..., speech sentence i, ..., speech sentence n are arranged in chronological order to form the conference text sequence. Of course, other devices can also convert the conference audio, obtain the conference text sequence, and then transmit it to the meeting minutes generation device. This application mainly uses the example of the conference minutes generation device converting audio into text to illustrate.
[0204] 802: Segment the multiple spoken sentences to obtain multiple second segmentation positions.
[0205] Optionally, the above-mentioned sentence segmentation method can be used to perform sentence segmentation on multiple spoken sentences to obtain multiple second segmentation positions, which will not be described again.
[0206] 803: Generate meeting minutes based on the multiple second segmentation positions and the multiple spoken sentences.
[0207] Exemplarily, based on the multiple second segmentation positions, the multiple speech sentences are segmented into multiple conference topics, wherein the conference topic of the speech sentences located between adjacent second segmentation positions in the multiple speech sentences is one of the multiple conference topics. Specifically, similar to the topic segmentation method of the above-mentioned method embodiment, the topics of the speech sentences between adjacent second segmentation positions are divided into the same conference topic to obtain the above-mentioned multiple conference topics, which will not be described in detail. Similarly, here, multiple speech sentences can only be segmented into multiple conference topics, but it is not clear what the corresponding content or specific content of each conference topic is.
[0208] For example, Figure 9 As shown, multiple speech sentences, i.e., speech sentence 1, speech sentence 2, speech sentence 3, ..., speech sentence i, ..., speech sentence n, can be divided into conference topic 1, conference topic 2, conference topic 3 and conference topic 4. However, at this time, it is not clear what the corresponding content of each conference topic is. It is only known that multiple speech sentences can be divided into four conference topics.
[0209] Exemplarily, the speech sentences corresponding to each conference theme are obtained from the multiple speech sentences, that is, the speech sentences divided into each conference theme are obtained. Figure 9 As shown, the speech sentence corresponding to conference theme 1 is speech sentence 1. Then, based on the speech sentences corresponding to each conference theme, the corresponding content of each conference theme is determined. That is, the speech sentences corresponding to each conference theme are used to generate themes. This means that each conference theme is contentized and concretized to obtain the corresponding content (or specific content) of each conference theme. For example, when contentizing conference theme 1 based on the speech sentences corresponding to conference theme 1, the corresponding content of conference theme 1 is determined to be "food."
[0210] Furthermore, the meeting minutes are generated based on the speech sentences corresponding to each meeting theme and the corresponding content of each meeting theme. Exemplarily, based on the speech sentences corresponding to each meeting theme and the corresponding content of each meeting theme, basic information corresponding to each meeting theme is determined, wherein the basic information of each meeting theme includes: the attendees of the meeting theme, the time period corresponding to the meeting theme, the corresponding content of the meeting theme, etc.
[0211] Finally, the meeting minutes are generated based on the basic information corresponding to each meeting topic. For example, the basic information of multiple meeting topics are combined in chronological order to generate the meeting minutes.
[0212] It should be noted that the above-mentioned meeting minutes can be generated in real time or uniformly after the meeting. Optionally, if it is generated in real time, the meeting audio will be collected in real time, and the meeting audio will be converted into meeting text in real time, and then the converted meeting text will be segmented into topics in real time, and the meeting minutes will be generated in real time. Optionally, if it is generated after the meeting, the meeting audio during the meeting can be collected and cached to obtain the complete meeting audio, and the complete meeting audio can be converted into text to obtain the complete meeting text, and the complete meeting text can be segmented into topics, and the meeting minutes can be generated.
[0213] It can be seen that in the embodiment of the present application, when generating meeting minutes, multiple speech sentences in the meeting are subject-segmented to obtain multiple meeting topics. Due to the high accuracy of topic segmentation in the present application, it is possible to segment high-precision meeting topics. Then, using the highly segmented meeting topics and the speech sentences corresponding to the meeting topics, it is possible to generate high-precision meeting minutes, improve the meeting experience of participants, and reduce the cost and pressure of manually checking meeting minutes.
[0214] See Figure 10 , Figure 10 This is a flow chart of a public opinion analysis method provided in an embodiment of the present application. The method is applied to the public opinion analysis device described above. The public opinion analysis device can be the sentence segmentation device described above, or it can be an independent device. This application does not limit the public opinion analysis device. The method includes but is not limited to the following steps:
[0215] 1001: Obtain a comment sequence of user-generated content, wherein the comment sequence includes multiple comment sentences.
[0216] The user-generated content may be any type of user-generated content, for example, the user-generated content may be posts or comments posted by users, etc. This application does not limit user-generated content.
[0217] Exemplarily, the comment statements for the user-generated content are obtained in chronological order to obtain the multiple comment statements. The multiple comment statements are combined into the comment sequence in chronological order. Optionally, this application regards a comment on the user-generated content as a comment statement. Figure 11 As shown, comment sentence 1, comment sentence 2, comment sentence 3, ..., comment sentence i, ..., comment sentence n can be obtained in chronological order.
[0218] 1002: Segment the multiple comment sentences to obtain multiple third segmentation positions.
[0219] Optionally, the above-mentioned sentence segmentation method can be used to perform sentence segmentation on multiple comment sentences to obtain multiple third segmentation positions, which will not be described again.
[0220] 1003: Perform public opinion analysis on the user-generated content based on the multiple third segmentation positions and the multiple comment statements.
[0221] Exemplarily, based on the multiple third segmentation positions, the multiple comment statements are segmented into multiple public opinion viewpoints, wherein the viewpoint of the comment statements located between adjacent third segmentation positions in the multiple comment statements is one of the multiple public opinion viewpoints. It can be understood that public opinion viewpoints can also be called public opinion topics. Therefore, the topic segmentation method of the above-mentioned method embodiment can be adopted to utilize the multiple third segmentation positions to segment the multiple comment statements into multiple public opinion viewpoints, which will not be described in detail. Optionally, public opinion viewpoints include but are not limited to: support, neutrality, questioning, opposition, etc.
[0222] Similarly, here we can only divide multiple comment statements into multiple public opinion opinions, but it is not clear what the corresponding content or specific content of each public opinion opinion is.
[0223] For example, Figure 11 As shown, the public opinion opinions of multiple comment statements can be divided into public opinion opinion 1, public opinion opinion 2, and public opinion opinion 4. However, at this time, it is not clear what the corresponding content or specific content of each public opinion opinion is, that is, it is not clear what the corresponding content of each public opinion opinion is, but it is known that multiple comment statements can be divided into four public opinion opinions.
[0224] Exemplarily, a comment sentence corresponding to each public opinion point of view from the plurality of comment sentences is obtained; based on the comment sentence corresponding to each public opinion point of view, the corresponding content of each public opinion point of view is determined, that is, the specific content of each public opinion point of view is determined. For example, opinion identification can be performed based on the comment sentence corresponding to each public opinion point of view to obtain the corresponding content of each public opinion point of view.
[0225] Finally, based on the comment statements and corresponding content of each public opinion opinion, a public opinion analysis is performed on the user-generated content. For example, the comment time of each public opinion opinion comment statement is obtained, and the start and end times of each public opinion opinion are determined; based on the start and end times of each public opinion opinion and the corresponding content, a public opinion analysis result for the user content is generated, which is used to characterize the changes in the public opinion opinion of the user-generated content.
[0226] For example, the public opinion 1 of a certain user-generated content is in favor, with the starting time being 10:00 on January 26, 2025, and the ending time being 10:00 on January 27, 2025; the public opinion 2 is neutral, with the starting time being 12:00 on January 27, 2025, and the ending time being 11:00 on January 28, 2025; the public opinion 3 is questioning, with the starting time being 23:00 on January 28, 2025, and the ending time being 10:00 on January 29, 2025; the public opinion 4 is neutral, with the starting time being 12:00 on January 29, 2025, and the ending time being 11:00 on January 30, 2025. Therefore, the public opinion analysis results of the user-generated content are as follows: from 10:00 on January 26, 2025 to 10:00 on January 27, 2025, support the user-generated content; from 12:00 on January 27, 2025 to 11:00 on January 28, 2025, remain neutral to the user-generated content; from 23:00 on January 28, 2025 to 10:00 on January 29, 2025, question the user-generated content; from 12:00 on January 29, 2025 to 11:00 on January 30, 2025, oppose the user-generated content.
[0227] It can be seen that in the embodiment of the present application, when performing public opinion analysis on user-generated content, the comment sequence of the user-generated content is segmented by topic to obtain multiple public opinion viewpoints. Due to the high accuracy of the topic segmentation of the present application, it is possible to segment public opinion viewpoints with high precision. Then, using the public opinion viewpoints segmented with high precision and the comment sentences corresponding to the public opinion viewpoints, it is possible to perform high-precision public opinion analysis on the user-generated content, and then it is possible to output the public opinion trend of the user-generated content with high precision.
[0228] The above is an overall introduction to the topic segmentation method of this application and the application scenarios of topic segmentation. Figure 1 、 Figure 2 The model structure provided describes the model training process of this application. It should be noted that Figure 1 and Figure 2 The model shown is a trained model, and the topic segmentation module in this model structure is a fixed module and does not need to participate in the training process. Only the semantic feature extraction model is obtained through training. For the sake of uniform description, the semantic feature extraction model can also be referred to as the second model, which is obtained by training the first model. The following describes the process of training the first model in this application with reference to the accompanying figures.
[0229] See Figure 12 , Figure 12 This is a flow chart of a model training method provided in an embodiment of the present application. This method is applied to the model training device of the present application. This method includes but is not limited to the following:
[0230] 1201: Obtain a time series data sample, wherein the time series data sample includes multiple training sentences.
[0231] The time series data sample can also be any type of time series data, as long as it is time series data with temporal continuity, that is, data obtained at multiple consecutive time points, it meets the requirements of this application. Therefore, multiple training sentences are sentences at multiple consecutive time points.
[0232] The time series data samples include but are not limited to: dialogue sequence samples, meeting text sequence samples, and comment sequence samples.
[0233] Optionally, the above-mentioned dialogue sequence sample is composed of multiple dialogue sentence samples, and the multiple dialogue sentence samples can be dialogue sentences from any multi-round dialogue. Exemplarily, dialogue sentences from each dialogue round in the multi-round dialogue are obtained, and then the dialogue sentences from each dialogue round are used as dialogue sentence samples. The dialogue sentence samples from each dialogue round are then combined into the dialogue sequence sample in chronological order. The dialogue sentences from each dialogue round include questions and responses.
[0234] Optionally, the conference text sequence sample may be a text sequence sample composed of the speech content of the participants in a conference. For example, the speech sentences (i.e., speech content) of the participants in the conference are obtained, and the speech sentences (i.e., speech content) of the participants are used as samples and the conference text sequence sample is composed in chronological order.
[0235] Optionally, the comment sequence sample is a sample composed of comment sentences of user-generated content. Exemplarily, the comment sentences for the user-generated content are obtained and used as samples, and the comment sentences are combined into the comment sequence sample in chronological order.
[0236] 1202: Input each of the multiple training sentences into the first model for feature extraction to obtain features of each training sentence.
[0237] Exemplarily, each training sentence is input into the first model for semantic feature extraction to obtain the features of each training sentence, that is, the feature vector of each training sentence.
[0238] 1203: Segment the multiple training sentences based on the features of each training sentence to obtain multiple segmentation positions.
[0239] Exemplarily, based on the features of any two training sentences among the multiple training sentences, the semantic similarity of the two training sentences is determined, wherein the method of determining the semantic similarity of the two training sentences is similar to the method of determining the semantic similarity of any two sentences in the above step 303 and is not described again.
[0240] Then, based on the semantic similarity of the two training sentences, the plurality of training sentences are clustered to obtain a second cluster center. The second cluster center is determined based on the semantic similarity of the two training sentences in a manner similar to the determination of the first cluster center in step 303 above, and will not be described again.
[0241] Similarly, the positional similarity of the two training sentences can be determined based on the positions of the two training sentences; the similarity of the two training sentences can be determined based on the semantic similarity and the positional similarity; and the plurality of training sentences can be clustered based on the similarity of the two training sentences to obtain a second cluster center.
[0242] Among them, the explanation about the position of the training sentence can refer to the subsequent explanation about the position of the sentence, and will not be repeated.
[0243] Among them, determining the positional similarity of the two training sentences is similar to the method of determining the positional similarity of the two sentences in the above step 303, and will not be described again; and determining the similarity of the two training sentences is similar to the method of determining the similarity of the two sentences mentioned above, and will not be described again; and the method of determining the second cluster center based on the similarity of the two training sentences is similar to the method of clustering multiple sentences based on the similarity of any two sentences to obtain the first cluster center, and will not be described again.
[0244] Finally, the plurality of segmentation positions are determined based on the second cluster center. The method of determining the plurality of segmentation positions based on the second cluster center is similar to the method of determining the plurality of segmentation positions based on the first cluster center, and will not be described again.
[0245] 1204: For the j-th segmentation position among the multiple segmentation positions Based on the features of the first training sentence, the segmentation position Adjust to get the split position The corresponding segmentation position c j , wherein the first training sentence is the segmentation position c corresponding to the j-1th segmentation position among the multiple segmentation positions j-1 and the j+1th split position The statements between .
[0246] Exemplarily, based on the features of the second training sentence and the features of the third sentence, the semantic similarity between the second sentence and the third sentence is determined to obtain a fifth similarity corresponding to the second training sentence, wherein the second training sentence is the segmentation position c j-1 With the split position The method for determining the fifth similarity is similar to the method for obtaining the first similarity, and will not be described again.
[0247] Exemplarily, based on the fifth similarity corresponding to the second training sentence, a sixth similarity corresponding to the fourth training sentence is determined, wherein the fourth training sentence is the segmentation position c j-1 With the split position The training sentences between the first and second training sentences are different from any training sentence in the second training sentence; based on the fifth similarity and the sixth similarity corresponding to the fourth training sentence, the segmentation position The method of determining the sixth similarity is similar to the method of determining the second similarity, and will not be described again.
[0248] Then, based on the fifth similarity and the sixth similarity corresponding to the fourth training sentence, the segmentation position Make adjustments.
[0249] Exemplarily, the score of the second training sentence is determined based on the fifth similarity and a sixth similarity corresponding to the fourth training sentence.
[0250] Specifically, based on the fifth similarity, traverse the segmentation position c in reverse order. j-1 With the split position In the training sentences between, the sixth similarity corresponding to the fourth training sentence located before the second training sentence is used to obtain the seventh similarity, wherein the seventh similarity is the first sixth similarity greater than the fifth similarity, wherein determining the seventh similarity is similar to the above-mentioned method of determining the third similarity, and will not be described again.
[0251] Specifically, based on the fifth similarity, traverse the segmentation position c in reverse order. j-1 With the split position In the training sentences between, the sixth similarity corresponding to the fourth training sentence located after the second training sentence is obtained, and the eighth similarity is obtained, wherein the eighth similarity is the first sixth similarity greater than the fifth similarity; wherein, determining the eighth similarity is similar to the above-mentioned method of determining the fourth similarity, and no further description is given.
[0252] Then, a score for the second training sentence is determined based on the fifth similarity, the seventh similarity, and the eighth similarity. The method for determining the score for the second training sentence based on the fifth similarity, the seventh similarity, and the eighth similarity is similar to the method for determining the score for the second sentence based on the first similarity, the third similarity, and the fourth similarity, and is not further described.
[0253] Further, based on the score of the second training sentence, the segmentation position Make adjustments.
[0254] Optionally, based on the score of the second training sentence, the segmentation position Adjust the split position based on the second sentence score as above The adjustment is similar and will not be described again. For example, based on the score of the second training sentence, the segmentation position c is determined. j-1 With the split position The score of each training sentence between j-1 With the split position The score of each training sentence between the two is used to determine the maximum score; based on the maximum score, the segmentation position is Adjust to get the split position The corresponding segmentation position c j . Among them, the split position is based on the maximum score Adjust the split position based on the maximum score as above The adjustment process is similar and will not be described again.
[0255] 1205: Based on the segmentation position c j and the plurality of training sentences, training the first model to obtain a second model.
[0256] Exemplary, with split position Similarly, by adjusting the above multiple segmentation positions respectively, segmentation positions c0, c1, c2, ... c j-1 、c j 、……、c k , where k is the number of split positions. Similarly, c0 and c k are the starting position and the ending position of multiple training sentences respectively. Then, based on the segmentation position c j , dividing the plurality of training sentences into a plurality of topics, wherein the plurality of training sentences at the segmentation position c j-1 and the segmentation position c jThe subject of the training sentence between is one of the multiple subjects. Similarly, the segmentation position c0, c1, c2, ... c j-1 、c j 、……、c k If the topics of the training sentences between adjacent segmentation positions are the same, the training sentences between adjacent segmentation positions can be divided into the same topic to obtain the above multiple topics.
[0257] First, the segmentation position c j Just for the split position The segmentation position obtained after adjustment can also be compared with Figure 3 In the corresponding method embodiment, the segmentation position is adjusted multiple times based on the position fluctuation.
[0258] Therefore, based on the segmentation position c j , before performing topic segmentation on the multiple training sentences and obtaining multiple topics, first perform topic segmentation based on the segmentation position. and the segmentation position c j , determine the segmentation position with The corresponding position deviation, which is determined by the segmentation position The corresponding position deviation is the same as the above determination of the segmentation position The corresponding position deviations are similar and will not be described again. Then, based on the position deviations corresponding to each of the multiple segmented positions, a second position deviation is determined. Similarly, the method for determining the second position deviation is similar to the method for calculating the first position deviation and will not be described again.
[0259] Then, based on the second position deviation and the segmentation position c j , performing topic segmentation on the multiple training sentences.
[0260] For example, if the second position deviation is less than or equal to the second threshold, it means that the fluctuation of the segmentation position is relatively small, the segmentation position has tended to be stable, and further adjustment of the segmentation position will not change much. The benefit of further adjustment is relatively small, so the segmentation positions c0, c1, c2, ... c j-1 、c j 、……、c k As the final segmentation position, and based on the segmentation position c j , split the multiple training sentences into the multiple topics, that is, split positions c0, c1, c2, ... c j-1 、c j 、……、c k The training sentences between adjacent segmentation positions in the training sentence are divided into one topic, and the above multiple topics are obtained. Then the training sentences located at the segmentation position c j-1and the segmentation position c j The topics of the training sentences between them are the same and are one of the above-mentioned multiple topics. It can be understood that the division of the multiple training sentences into multiple topics here is essentially to use the final segmentation position determined to divide the training sentences between adjacent segmentation positions (i.e., training sentences with the same topic) into the same topic to obtain the above-mentioned multiple topics, rather than dividing the training sentences into topics like in step 1203.
[0261] Exemplarily, if the second position deviation is greater than the second threshold, based on the features of the fifth training sentence, the segmentation position Adjust to get the split position The corresponding new segmentation position c j Based on the segmentation position c j and the new split position c j , determine a new second position deviation until the new second position deviation is less than or equal to the second threshold, based on the new segmentation position c j , dividing the plurality of training sentences into the plurality of topics, wherein, when the new first position deviation is less than or equal to the first threshold, it indicates that the new segmentation position c adjusted at this time j It has become stable and there is no need to adjust the segmentation position. Then the new segmentation positions c0, c1, c2, ... c j-1 、c j 、……、c k Split multiple training sentences into multiple topics, that is, the new segmentation positions c0, c1, c2, ... c j-1 、c j 、……、c k The training sentences between adjacent segmentation positions in the , are divided into one topic, and the above multiple topics are obtained. Then the training sentences located at the new segmentation position c j-1 and the new split position c j The topics of the training sentences between them are the same and are one of the multiple topics. Similarly, here, the multiple training sentences are divided into multiple topics, which means that the training sentences between adjacent segmentation positions (i.e., the training sentences with the same topic) are divided into the same topic to obtain the above multiple topics. It is not like the topic segmentation of the sentences in step 303. Among them, the fifth training sentence is the j-1th segmentation position among the multiple segmentation positions. The corresponding new segmentation position c j-1 and the j+1th split position The corresponding segmentation position c j+1 The method of determining the new second position deviation is similar to the method of determining the new first position deviation, and will not be described again.
[0262] Of course, during the training process, it is also possible to ignore position deviation and only adjust the segmentation position a second preset number of times. After adjusting the second preset number of times, the latest segmentation position obtained is used as the final segmentation position, and the final segmentation position is used to perform topic segmentation on multiple training sentences to achieve training of the first model. Optionally, the second preset number of times can be 1, 5, 10, or other values, and this application does not limit the second preset number of times.
[0263] Furthermore, for a first topic, based on a plurality of training sentences, a sample set corresponding to the first topic is obtained, wherein the first topic is any one of the plurality of topics.
[0264] Exemplarily, the training sentences that are segmented into the first topic among the multiple training sentences, that is, the training sentences that belong to the first topic, are used as the positive sample set of the first topic.
[0265] For example, Figure 13 As shown, for the first topic being topic 2, u2 and u3 can be used as the positive sample set of the second topic. Then, the negative sample set corresponding to the first topic is obtained from the training sentence corresponding to the second topic, wherein the second topic is a topic different from the first topic among the multiple topics. For example, if the first topic is topic 2, the second topic includes: topic 1, topic 3, ..., topic m-1. Among them, the training sentence corresponding to the second topic is the training sentence segmented under the second topic. For example, if the second topic is topic 1, the training sentence corresponding to topic 1 is u1.
[0266] Exemplarily, based on the ratio of positive to negative samples and the first number of positive samples in the positive sample set, a second number of negative samples is determined, where the first number is the number of training sentences corresponding to the first topic. Then, based on the second number, the negative sample set is obtained from the training sentences corresponding to the second topic.
[0267] Exemplarily, a third number of training sentences corresponding to a third topic is obtained, where the three topics are adjacent topics of the first topic among the multiple topics, and the adjacent topics include adjacent topics located before the first topic and adjacent topics located after the first topic. For example, if the first topic is Topic 2, the third topic includes: Topic 1 and Topic 3.
[0268] Optionally, if the third number is greater than or equal to the second number, a sufficient number of negative samples for the first topic can be obtained only from adjacent topics, and the second number of training sentences can be directly selected from the training data corresponding to the third topic to form the negative sample set of the first topic. Optionally, if the third number is equal to the second number, all the training sentences corresponding to the third topic are selected as the negative sample set of the first topic. Optionally, if the third number is greater than the second number, the second number of training sentences can be randomly selected from the training sentences corresponding to the third topic as the negative sample set of the first topic.
[0269] Optionally, if the third number is less than the second number, it means that a sufficient number of negative samples cannot be obtained from adjacent topics alone. At this time, in addition to obtaining negative samples from adjacent topics, negative samples can also be selected from non-adjacent topics to form a negative sample set of the first subject. The negative sample set is obtained based on the training sentences corresponding to the third topic and the training sentences corresponding to the fourth topic, wherein the fourth topic is a topic among the multiple topics that is different from the first topic and the third topic, and the training sentences corresponding to the fourth topic are the training sentences segmented into the fourth topic among the multiple training sentences. That is, the fourth topic is a non-adjacent topic of the first topic. For example, if the first topic is Topic 2, the fourth topic includes: Topic 4, Topic 5, ..., Topic m-1.
[0270] Exemplarily, a fourth number of training sentences corresponding to the fourth topic is obtained. If the sum of the fourth number and the third number is greater than or equal to the second number, it means that negative samples that meet the quantity requirements can be selected from adjacent topics and non-adjacent topics, then a third number of training sentences are selected from the training sentences corresponding to the third topic, and a fifth number of training sentences are selected from the training sentences corresponding to the fourth topic to obtain the second number of negative samples, wherein the sum of the third number and the fifth number is the second number. That is, all the training sentences corresponding to adjacent topics are selected, and then the remaining training sentences are supplemented from the training sentences corresponding to non-adjacent topics. Similarly, when selecting training sentences from the training sentences corresponding to the fourth topic, the fifth number of training sentences can be randomly selected.
[0271] Exemplarily, if the sum of the fourth number and the third number is less than the second number, the third number of training sentences are selected from the training sentences corresponding to the second topic, and the fourth number of training sentences are selected from the training sentences corresponding to the fourth topic, and the sixth number of training sentences are selected from the second time series data sample to obtain the second number of negative samples, and the second number of negative samples are formed into the negative sample set. The second time series data sample is different from the first time series data sample, and the sum of the third number, the fourth number and the sixth number is the second number. It can be understood that when it is explained that the training sentences corresponding to adjacent topics and non-adjacent topics cannot meet the number requirements of negative samples, a corresponding number of training sentences can be selected from other time series data samples to fill the gap in negative samples.
[0272] It can be seen that when constructing the negative sample set corresponding to each topic, this application will give priority to obtaining negative samples from topics adjacent to the topic, that is, give priority to selecting strong negative samples to construct the negative sample set. Figure 13 As shown, for topic 2, strong negative samples u1 and u4~u i Construct a negative sample set for topic 2. Since the training sentences of adjacent topics are closer to the training sentences of this topic, their semantics will be more similar. Therefore, using such training data to train the model can allow the model to learn that semantically similar sentences belong to different topics. In addition, for the sake of distinction, this application refers to the negative samples selected from adjacent topics as strong negative samples, and the negative samples selected from non-adjacent topics as regular negative samples. This application constructs a negative sample set for each topic by giving priority to selecting strong negative samples. Then, in later applications, even if the sentences are semantically similar, the model can distinguish between those belonging to different topics, thereby improving the robustness of the model and improving the accuracy of the model's segmentation of topics.
[0273] Furthermore, based on the positive sample set and the negative sample set of the first topic, a sample set of the first topic is obtained, that is, the positive sample set and the negative sample set of the first subject are combined into the sample set of the first topic.
[0274] Furthermore, based on the sample set corresponding to the first topic, the first model is trained to obtain a second model.
[0275] Exemplarily, for a first positive sample, a ninth similarity between the first positive sample and the second positive sample, i.e., the semantic similarity between the first positive sample and the second positive sample, is determined based on features of the first positive sample and features of the second positive sample, wherein the first positive sample is any positive sample in the positive sample set, and the second positive sample is a positive sample in the positive sample set that is different from the first positive sample. Then, a tenth similarity between the first positive sample and the first negative sample, i.e., the semantic similarity between the first positive sample and the first negative sample, is determined based on features of the first positive sample and features of the first negative sample.
[0276] Optionally, in one embodiment of the present application, a first loss corresponding to the first positive sample is determined based on the ninth similarity and the tenth similarity.
[0277] For example, the first loss corresponding to the first positive sample can be expressed by formula (5):
[0278] L=max(0,m+sim(h i ,h j )-sim(h i ,h k )) Formula (5);
[0279] Where i represents the i-th positive sample in the positive sample set, that is, any positive sample, that is, the first positive sample; j represents the j-th positive sample in the positive sample set, that is, the second positive sample; k represents the k-th negative sample in the negative sample set, that is, the first negative sample; h i represents the feature of the first positive sample, h j is the feature of the second positive sample, h k is the first negative sample error feature, sim(h i ,h j ) is the ninth similarity, sim(h i ,h k ) is the tenth similarity, L is the first loss, and m is a preset parameter used to control the distinction between positive and negative samples to be at least m.
[0280] It can be seen that in this embodiment, by comparing and learning samples within the same topic with samples within different topics, the positive samples are constrained to be semantically similar, and the positive samples and negative samples are semantically dissimilar, that is, the samples within the same topic are constrained to be semantically similar, and the samples within different topics are semantically dissimilar, so that the similarity of samples within the same topic is greater than the similarity of samples within different topics, so that the features of the extracted training sentences contain the topic information to which the training sentences belong.
[0281] Optionally, in one embodiment of the present application, different weights can be configured in advance for different types of negative samples. Therefore, when calculating the first loss corresponding to the first positive sample, the topic corresponding to the first negative sample, that is, the source of the first negative sample or the type of the first negative sample, can also be obtained, and based on the topic corresponding to the first negative sample, the weight corresponding to the first negative sample is determined. Exemplarily, if the topic corresponding to the first negative sample is the third topic, that is, the type of the first negative sample is a strong negative sample, then the weight corresponding to the first negative sample is determined to be the first preset weight; if the topic corresponding to the first negative sample is not the third topic, that is, the first negative sample is a regular negative sample, then the weight corresponding to the first negative sample is determined to be the second preset weight, wherein the first preset weight is greater than the second preset weight, for example, the first preset weight is 1.2 and the second preset weight is 1. Then, based on the ninth similarity and the tenth similarity, the second loss corresponding to the first positive sample is determined; based on the weight, the second loss is weighted to obtain the first loss corresponding to the first positive sample.
[0282] For example, the first loss corresponding to the first positive sample can be expressed by formula (6):
[0283] L=w k *max(0,m+sim(h i ,h j )-sim(h i ,h k );
[0284] If k is a strong negative sample, w k =w1; if k is a regular negative sample, w k =w2 formula (6);
[0285] Among them, w2 <w1
[0286] Among them, w k is the weight corresponding to the first negative sample, w1 is the first preset weight, and w2 is the second preset weight.
[0287] It can be seen that in this embodiment, relatively large weights are designed for strong negative samples, thereby generating relatively large losses. This will prevent the model from easily completing the learning of strong negative samples, allowing the model to learn strong negative samples more times and fully learn the difference between strong negative samples and positive samples, thereby enhancing the model's ability to distinguish between positive samples and strong negative samples, and further enhancing the model's ability to distinguish between sentences with similar semantics but belonging to different topics, thereby improving the robustness of the model.
[0288] Further, based on the first loss corresponding to the first positive sample, the loss corresponding to the first topic is determined.
[0289] It can be understood that the first loss corresponding to the first positive sample described above is the first loss of the first positive sample under the first negative sample, and the entire negative sample set contains a second number of negative samples. Therefore, by determining the first loss of the first positive sample under the first negative sample, the first loss of the first positive sample under each negative sample can be obtained; based on the first loss of the first positive sample under each negative sample, the third loss corresponding to the first positive sample can be determined. For example, the third loss corresponding to the first positive sample can be obtained by averaging the first losses of the first positive sample under each negative sample.
[0290] Similarly, there are a first number of positive samples in the positive sample set. Therefore, based on the third loss corresponding to the first positive sample, the third loss corresponding to each positive sample in the positive sample set can be determined. The method for determining the third loss corresponding to each positive sample is similar to the method for determining the third loss corresponding to the first positive sample and will not be described again. Then, based on the third loss corresponding to each positive sample, the first loss corresponding to the first topic can be determined. For example, the third loss corresponding to each positive sample can be averaged to obtain the first loss corresponding to the first topic.
[0291] Furthermore, based on the first loss corresponding to the first topic, the first loss corresponding to each of the multiple topics is determined. The method of determining the first loss corresponding to each topic is similar to the method of determining the first loss corresponding to the first topic and is not described again.
[0292] Finally, based on the first loss corresponding to each topic, the first model is trained to obtain the second model. For example, the first losses corresponding to each topic can be averaged to obtain the final loss, and the final loss can be used to reversely update the first model to obtain the second model. Of course, in actual applications, multiple rounds of training of the first model will be performed using multiple time series data samples. This application mainly uses the example of training the first model once with a time series data sample to illustrate.
[0293] It can be seen that in the embodiment of the present application, during the model training process, the features of the training sentences will first be used to globally segment the sentences to obtain multiple segmentation positions. Then, for each segmentation position, the sentences between the adjacent segmentation positions of the segmentation position will be used to locally adjust the segmentation position within the local range formed by the adjacent segmentation positions, thereby eliminating the error during global segmentation and improving the accuracy of sentence segmentation, so that the training sentences belonging to the same topic can be divided into the same topic with high accuracy. Finally, the model is trained using the adjusted segmentation positions and multiple training sentences. Since the segmentation positions are relatively accurate, the accurate segmentation positions and training sentences can be used to construct training samples corresponding to each topic with high accuracy. The second model trained using such training samples has topic perception ability and topic awareness. When the second model is used to segment sentences, sentences belonging to the same topic can be segmented into a group, thereby improving the accuracy of segmentation of the topic of the sentence.
[0294] See Figure 14 , Figure 14 Schematic diagram of a sentence segmentation device provided in an embodiment of the present application. The sentence segmentation device 1400 includes: an acquisition unit 1401 and a processing unit 1402, wherein:
[0295] An acquiring unit 1401 is configured to acquire time series data, wherein the time series data includes a plurality of statements;
[0296] The processing unit 1402 is configured to extract features from each of the plurality of sentences to obtain features of each sentence.
[0297] Segmenting the plurality of sentences based on features of the plurality of sentences to obtain a plurality of segmentation positions;
[0298] For the i-th segmentation position among the multiple segmentation positions Based on the features of the first sentence, the segmentation position Adjust to get the split position The corresponding segmentation position b i , wherein the first sentence is the i-1th segmentation position among the multiple segmentation positions The corresponding segmentation position b i-1 and the i+1th split position The statements between .
[0299] In one embodiment of the present application, in segmenting the multiple sentences based on the features of the multiple sentences to obtain multiple segmentation positions, the processing unit 1402 is specifically configured to:
[0300] Determining semantic similarity between any two sentences from the plurality of sentences based on features of the two sentences;
[0301] Clustering the multiple sentences based on the semantic similarity of the two sentences to obtain a first cluster center;
[0302] Based on the first cluster center, the plurality of segmentation positions are determined.
[0303] In one embodiment of the present application, in terms of clustering the multiple statements based on the semantic similarity of the two statements to obtain a first cluster center, the processing unit 1402 is specifically configured to:
[0304] Determining positional similarity between the two sentences based on the positions of the two sentences;
[0305] Determining the similarity between the two sentences based on the semantic similarity and the position similarity;
[0306] Based on the similarity between the two sentences, the multiple sentences are clustered to obtain the first cluster center.
[0307] In one embodiment of the present application, based on the features of the first sentence, the segmentation position b i In terms of making adjustments, the processing unit 1402 is specifically configured to:
[0308] Based on the features of the second sentence and the features of the third sentence, the semantic similarity between the second sentence and the third sentence is determined to obtain a first similarity corresponding to the second sentence, wherein the second sentence is the segmentation position b i-1 With the split position a statement between , the third statement being an adjacent statement to the second statement;
[0309] Based on the first similarity corresponding to the second sentence, the second similarity corresponding to the fourth sentence is determined, and the fourth sentence is the segmentation position b i-1 With the split position The statement between the two sentences is different from the statement in the second sentence;
[0310] Based on the first similarity and the second similarity corresponding to the fourth sentence, the segmentation position Make adjustments.
[0311] In one embodiment of the present application, based on the first similarity and the second similarity corresponding to the fourth sentence, the segmentation position In terms of making adjustments, the processing unit 1402 is specifically configured to:
[0312] determining a score for the second sentence based on the first similarity and a second similarity corresponding to the fourth sentence;
[0313] Based on the score of the second sentence, the segmentation position Make adjustments.
[0314] In one embodiment of the present application, in determining the score of the second sentence based on the first similarity and the second similarity corresponding to the fourth sentence, the processing unit 1402 is specifically configured to:
[0315] Based on the first similarity, traverse the segmentation position b in reverse order i-1 With the split position In the sentences between, the second similarity corresponding to the fourth sentence located before the second sentence is obtained to obtain a third similarity, wherein the third similarity is the first second similarity greater than the first similarity;
[0316] Based on the first similarity, traverse the segmentation position b in positive order i-1 With the split position In the sentences between, the second similarity corresponding to the fourth sentence located after the second sentence is obtained to obtain a fourth similarity, wherein the fourth similarity is the first second similarity greater than the first similarity;
[0317] A score of the second sentence is determined based on the first similarity, the third similarity, and the fourth similarity.
[0318] In one embodiment of the present application, based on the score of the second sentence, the segmentation position In terms of making adjustments, the processing unit 1402 is specifically configured to:
[0319] Based on the score of the second sentence, determine the segmentation position b i-1 With the split position The score of each statement between
[0320] Based on the segmentation position b i-1 With the split position The score of each statement between and determines the maximum score;
[0321] Based on the maximum score, the segmentation position Make adjustments.
[0322] In one embodiment of the present application, the processing unit 1402 is further configured to:
[0323] Based on the segmentation position b i, dividing the plurality of sentences into a plurality of topics, wherein the plurality of sentences are located at the segmentation position b i-1 and the split position b i The subject of the sentences between is one of the multiple subjects.
[0324] In one embodiment of the present application, based on the segmentation position b i , dividing the plurality of sentences into a plurality of subject aspects, the processing unit 1402 is specifically configured to:
[0325] Based on the segmentation position and the split position b i , determine the segmentation position with Corresponding position deviation;
[0326] determining a first position deviation based on a position deviation corresponding to each of the plurality of segmentation positions;
[0327] Based on the first position deviation and the segmentation position b i , dividing the multiple sentences into the multiple topics.
[0328] In one embodiment of the present application, based on the first position deviation and the segmentation position b i , dividing the plurality of sentences into the plurality of subject aspects, the processing unit 1402 is specifically configured to:
[0329] If the first position deviation is less than or equal to the first threshold, based on the segmentation position b i , dividing the plurality of sentences into the plurality of topics, wherein the plurality of sentences are located at the segmentation position b i-1 and the split position b i The subject of the sentences between is one of the multiple subjects;
[0330] If the first position deviation is greater than the first threshold, based on the characteristics of the fifth sentence, the segmentation position b i Adjust to get the split position The corresponding new segmentation position b i Based on the segmentation position b i and the new split position b i , determine a new first position deviation until the new first position deviation is less than or equal to the first threshold, based on the new segmentation position b i , dividing the plurality of sentences into the plurality of topics, wherein the fifth sentence is the i-1th segmentation position among the plurality of segmentation positions The corresponding new segmentation position b i-1and the i+1th split position The corresponding segmentation position b i+1 The statements between the multiple statements are located at the new segmentation position b i-1 and the new split position b i The subject of the sentences between is one of the multiple subjects.
[0331] See Figure 15 , Figure 15 A schematic diagram of a model training device provided for the implementation of this application. Figure 15 As shown, the model training device 1500 includes: an acquisition unit 1501 and a processing unit 1502, wherein:
[0332] An acquiring unit 1501 is configured to acquire a time series data sample, wherein the time series data sample includes a plurality of training sentences;
[0333] The processing unit 1502 is configured to input each of the plurality of training sentences into a first model for feature extraction to obtain features of each training sentence;
[0334] Segmenting the plurality of training sentences based on a feature of each training sentence to obtain a plurality of segmentation positions;
[0335] For the jth segmentation position among the multiple segmentation positions Based on the features of the first training sentence, the segmentation position Adjust to get the split position The corresponding segmentation position c j , wherein the first training sentence is the segmentation position c corresponding to the j-1th segmentation position among the multiple segmentation positions j-1 and the j+1th split position The sentences between
[0336] Based on the segmentation position c j and the plurality of training sentences, training the first model to obtain a second model.
[0337] In one embodiment of the present application, in terms of segmenting the multiple training sentences based on the features of each training sentence to obtain multiple segmentation positions, the processing unit 1502 is specifically configured to:
[0338] Determining the semantic similarity of any two training sentences from the plurality of training sentences based on features of the two training sentences;
[0339] Clustering the plurality of training sentences based on the semantic similarity of the two training sentences to obtain a second cluster center;
[0340] Based on the second cluster center, the plurality of segmentation positions are determined.
[0341] In one embodiment of the present application, in terms of clustering the plurality of training sentences based on the semantic similarity of the two training sentences to obtain a second cluster center, the processing unit 1502 is specifically configured to:
[0342] Determining positional similarity between the two training sentences based on the positions of the two training sentences;
[0343] Determining the similarity between the two training sentences based on the semantic similarity and the position similarity;
[0344] Based on the similarity between the two training sentences, the multiple training sentences are clustered to obtain a second cluster center.
[0345] In one embodiment of the present application, based on the features of the first training sentence, the segmentation position In terms of making adjustments, the processing unit 1502 is specifically configured to:
[0346] Based on the features of the second training sentence and the features of the third sentence, the semantic similarity between the second sentence and the third sentence is determined to obtain a fifth similarity corresponding to the second training sentence, wherein the second training sentence is the segmentation position c j-1 With the split position Any training sentence between the third training sentence and the second training sentence;
[0347] Based on the fifth similarity corresponding to the second training sentence, a sixth similarity corresponding to the fourth training sentence is determined, wherein the fourth training sentence is the segmentation position c j-1 With the split position The training sentences between the two are different from any training sentence in the second training sentence;
[0348] Based on the fifth similarity and the sixth similarity corresponding to the fourth training sentence, the segmentation position Make adjustments.
[0349] In one embodiment of the present application, based on the fifth similarity and the sixth similarity corresponding to the fourth training sentence, the segmentation position In terms of making adjustments, the processing unit 1502 is specifically configured to:
[0350] determining a score for the second training sentence based on the fifth similarity and a sixth similarity corresponding to the fourth training sentence;
[0351] Based on the score of the second training sentence, the segmentation position Make adjustments.
[0352] In one embodiment of the present application, in determining the score of the second training sentence based on the fifth similarity and the sixth similarity corresponding to the fourth training sentence, the processing unit 1502 is specifically configured to:
[0353] Based on the fifth similarity, traverse the segmentation position c in reverse order j-1 With the split position In the training sentences between, the sixth similarity corresponding to the fourth training sentence located before the second training sentence is obtained to obtain a seventh similarity, wherein the seventh similarity is the first sixth similarity greater than the fifth similarity;
[0354] Based on the fifth similarity, traverse the segmentation position c in reverse order j-1 With the split position In the training sentences between, the sixth similarity corresponding to the fourth training sentence located after the second training sentence is obtained to obtain an eighth similarity, wherein the eighth similarity is the first sixth similarity greater than the fifth similarity;
[0355] A score of the second training sentence is determined based on the fifth similarity, the seventh similarity, and the eighth similarity.
[0356] In one embodiment of the present application, based on the score of the second training sentence, the segmentation position In terms of making adjustments, the processing unit 1502 is specifically configured to:
[0357] Based on the score of the second training sentence, the segmentation position c is determined. j-1 With the split position The score of each training sentence between ;
[0358] Based on the segmentation position c j-1 With the split position The score of each training sentence between and is used to determine the maximum score;
[0359] Based on the maximum score, the segmentation position Make adjustments.
[0360] In one embodiment of the present application, based on the segmentation position c j and the plurality of training statements, training the first model to obtain a second model, the processing unit 1502 is specifically configured to:
[0361] Based on the segmentation position cj , dividing the plurality of training sentences into a plurality of topics, wherein the plurality of training sentences at the segmentation position c j-1 and the segmentation position c j The subject of the training sentence between is one of the multiple subjects;
[0362] For a first topic, based on the multiple training sentences, obtaining a sample set corresponding to the first topic, wherein the first topic is any one of the multiple topics;
[0363] Based on the sample set corresponding to the first topic, the first model is trained to obtain a second model.
[0364] In one embodiment of the present application, in terms of obtaining a sample set corresponding to the first topic based on the multiple training sentences, the processing unit 1502 is specifically configured to:
[0365] Segmenting the training sentences of the plurality of training sentences into the first topic to form a positive sample set of the first topic;
[0366] Obtaining a negative sample set corresponding to the first topic from training sentences corresponding to a second topic, wherein the second topic is a topic different from the first topic among the multiple topics, and the training sentences corresponding to the second topic are training sentences segmented into the second topic among the multiple training sentences;
[0367] Based on the positive sample set and the negative sample set of the first topic, a sample set of the first topic is obtained.
[0368] In one embodiment of the present application, in terms of obtaining a negative sample set corresponding to the first topic from training sentences corresponding to the second topic, the processing unit 1502 is specifically configured to:
[0369] Determining a second number of negative samples based on a ratio of positive samples to negative samples and a first number of positive samples in the positive sample set;
[0370] Based on the second quantity, the negative sample set is obtained from training sentences corresponding to the second topic.
[0371] In one embodiment of the present application, in terms of obtaining the negative sample set from the training sentences corresponding to the second topic based on the second quantity, the processing unit 1502 is specifically configured to:
[0372] Obtaining a third number of training sentences corresponding to a third topic, wherein the third topic is an adjacent topic of the first topic among the multiple topics, and wherein the training sentences corresponding to the third topic are training sentences segmented into the third topic among the multiple training sentences;
[0373] If the third number is greater than or equal to the second number, selecting the second number of training sentences from the training sentences corresponding to the third topic to form the negative sample set;
[0374] If the third number is less than the second number, the negative sample set is obtained based on the training sentences corresponding to the third topic and the training sentences corresponding to the fourth topic, wherein the fourth topic is a topic among the multiple topics that is different from the first topic and the third topic, and the training sentences corresponding to the fourth topic are the training sentences segmented into the fourth topic among the multiple training sentences.
[0375] In one embodiment of the present application, in terms of obtaining the negative sample set based on the training sentences corresponding to the third topic and the training sentences corresponding to the fourth topic, the processing unit 1502 is specifically configured to:
[0376] Obtaining a fourth number of training sentences corresponding to the fourth topic;
[0377] If the sum of the fourth number and the third number is greater than or equal to the second number, selecting a third number of training sentences from the training sentences corresponding to the third topic, and selecting a fifth number of training sentences from the training sentences corresponding to the fourth topic, to obtain the second number of negative samples, and forming the second number of negative samples into the negative sample set;
[0378] If the sum of the fourth number and the third number is less than the second number, then select the third number of training sentences from the training sentences corresponding to the third topic, select the fourth number of training sentences from the training sentences corresponding to the fourth topic, and select the sixth number of training sentences from the second time series data sample to obtain the second number of negative samples, and form the second number of negative samples into the negative sample set.
[0379] In one embodiment of the present application, in terms of training the first model based on the sample set corresponding to the first theme to obtain the second model, the processing unit 1502 is specifically configured to:
[0380] For a first positive sample, determining a ninth similarity between the first positive sample and the second positive sample based on a feature of the first positive sample and a feature of a second positive sample, wherein the first positive sample is any positive sample in the positive sample set, and the second positive sample is a positive sample in the positive sample set that is different from the first positive sample;
[0381] determining, based on a feature of the first positive sample and a feature of the first negative sample, a tenth similarity between the first positive sample and the first negative sample, wherein the first negative sample is any negative sample in the negative sample set;
[0382] Determining a first loss corresponding to the first positive sample based on the ninth similarity and the tenth similarity;
[0383] Determining a first loss corresponding to the first topic based on a first loss corresponding to the first positive sample;
[0384] Determining a first loss corresponding to each of the plurality of topics based on a first loss corresponding to the first topic;
[0385] Based on the first loss corresponding to each topic, the first model is trained to obtain the second model.
[0386] In one embodiment of the present application, in determining the first loss corresponding to the first positive sample based on the ninth similarity and the tenth similarity, the processing unit 1502 is specifically configured to:
[0387] Determining a weight corresponding to the first negative sample based on a topic corresponding to the first negative sample;
[0388] Determining a second loss corresponding to the first positive sample based on the ninth similarity and the tenth similarity;
[0389] Based on the weight, the second loss is weighted to obtain a first loss corresponding to the first positive sample.
[0390] In one embodiment of the present application, in determining the weight corresponding to the first negative sample based on the subject corresponding to the first negative sample, the processing unit 1502 is specifically configured to:
[0391] If the topic corresponding to the first negative sample is the third topic, determining the weight to be a first preset weight;
[0392] If the topic corresponding to the first negative sample is not the third topic, the weight is determined to be a second preset weight, wherein the first preset weight is greater than the second preset weight.
[0393] In one embodiment of the present application, based on the segmentation position c j , dividing the plurality of training sentences into a plurality of subject aspects, the processing unit 1502 is specifically configured to:
[0394] Based on the segmentation position and the segmentation position c j , determine the segmentation position with Corresponding position deviation;
[0395] determining a first position deviation based on a position deviation corresponding to each of the plurality of segmentation positions;
[0396] Based on the first position deviation and the segmentation position c j , dividing the multiple training sentences into the multiple topics.
[0397] In one embodiment of the present application, based on the first position deviation and the segmentation position c j , dividing the plurality of training sentences into the plurality of subject aspects, the processing unit 1502 is specifically configured to:
[0398] If the first position deviation is less than or equal to the second threshold, based on the segmentation position c j , dividing the plurality of training sentences into the plurality of topics, wherein the plurality of training sentences at the division position c j-1 and the segmentation position c j The subject of the training sentence between is one of the multiple subjects;
[0399] If the first position deviation is greater than the second threshold, based on the characteristics of the fifth training sentence, the segmentation position Adjust to get the split position The corresponding new segmentation position c j Based on the segmentation position c j and the new split position c j , determine a new first position deviation until the new first position deviation is less than or equal to the second threshold, based on the new segmentation position c j , dividing the plurality of training sentences into the plurality of topics, wherein the fifth training sentence is the j-1th segmentation position among the plurality of segmentation positions The corresponding new segmentation position c j-1 and the j+1th split position The corresponding segmentation position c j+1 The training sentences between the multiple training sentences are located at the new segmentation position c j-1 and the new split position c j The topic of the training sentence between is one of the multiple topics.
[0400] See Figure 16 , Figure 16 Schematic diagram of a conversation device provided in an embodiment of the present application. Conversation device 1600 includes an acquisition unit 1601 and a processing unit 1602, wherein:
[0401] An acquiring unit 1601 is configured to acquire a question statement of a user in a first round; and acquire a dialogue statement sequence, wherein the dialogue statement sequence includes multiple dialogue statements of a second round, where the second round and the first round belong to the same dialogue and the second round precedes the first round.
[0402] Processing unit 1602 is used to perform sentence segmentation on the multiple conversations using the above-mentioned sentence segmentation method to obtain multiple first segmentation positions; determine the reply sentence corresponding to the question sentence based on the multiple first segmentation positions and the question sentence; and conduct the first round of conversation with the user based on the reply sentence.
[0403] In one embodiment of the present application, in determining a reply statement corresponding to the question statement based on the multiple first segmentation positions and the question statement, the processing unit 1602 is specifically configured to:
[0404] Based on the plurality of first segmentation positions, the plurality of dialogue sentences are segmented into a plurality of dialogue topics, wherein the dialogue topic of a dialogue sentence located between adjacent first segmentation positions in the plurality of dialogue sentences is one of the plurality of dialogue topics;
[0405] For a first conversation topic, obtaining at least one conversation sentence belonging to the first conversation topic from the plurality of conversation sentences, wherein the first conversation topic is any one of the plurality of conversation topics;
[0406] Feature extraction is performed on the at least one sentence to obtain features of the first conversation topic.
[0407] Performing feature extraction on the question statement to obtain features of the question statement;
[0408] The reply statement is determined based on the features corresponding to each conversation topic and the features of the question statement.
[0409] In one embodiment of the present application, in determining the reply statement based on the features corresponding to each conversation topic and the features of the question statement, the processing unit 1602 is specifically configured to:
[0410] Determining the similarity between each conversation topic and the question statement based on the features corresponding to each conversation topic and the features corresponding to the question statement;
[0411] determining a second dialogue topic from the plurality of dialogue topics based on a similarity between each dialogue topic and the question statement;
[0412] The reply sentence is generated based on the dialogue sentences of the plurality of dialogue sentences belonging to the second dialogue topic.
[0413] See Figure 17 , Figure 17 Schematic diagram of a meeting minutes generation device provided in an embodiment of the present application. Meeting minutes generation device 1700 includes: an acquisition unit 1701 and a processing unit 1702, wherein:
[0414] An acquiring unit 1701 is configured to acquire a conference text sequence, wherein the conference text sequence includes a plurality of spoken sentences;
[0415] The processing unit 1702 is configured to perform sentence segmentation on the plurality of spoken sentences using the sentence segmentation method to obtain a plurality of second segmentation positions.
[0416] A meeting summary is generated based on the multiple second segmentation positions and the multiple spoken sentences.
[0417] In one embodiment of the present application, in generating the meeting minutes based on the multiple second segmentation positions and the multiple spoken sentences, the processing unit 1702 is specifically configured to:
[0418] Based on the plurality of second segmentation positions, the plurality of spoken sentences are segmented into a plurality of conference topics, wherein the conference topic of the spoken sentences located between adjacent second segmentation positions in the plurality of spoken sentences is one of the plurality of conference topics;
[0419] Obtaining a speech sentence corresponding to each conference topic from a plurality of speech sentences;
[0420] Determine the corresponding content of each conference topic based on the speech sentences corresponding to each conference topic;
[0421] The meeting minutes are generated based on the speech sentences corresponding to each meeting topic and the corresponding content of each meeting topic.
[0422] See Figure 18 , Figure 18 Schematic diagram of a public opinion analysis device provided in an embodiment of the present application. The public opinion analysis device 1800 includes: an acquisition unit 1801 and a processing unit 1802, wherein:
[0423] An acquisition unit 1801 is configured to acquire a comment sequence of user-generated content, wherein the comment sequence includes a plurality of comment statements;
[0424] The processing unit 1802 is configured to segment the plurality of comment sentences using the segmentation method to obtain a plurality of third segmentation positions.
[0425] Based on the multiple third segmentation positions and the multiple comment statements, public opinion analysis is performed on the user-generated content.
[0426] In one embodiment of the present application, in performing public opinion analysis on the user-generated content based on the multiple third segmentation positions and the multiple comment statements, the processing unit 1802 is specifically configured to:
[0427] Based on the plurality of third segmentation positions, the plurality of comment statements are segmented into a plurality of public opinion opinions, wherein the public opinion opinion of the comment statements located between adjacent third segmentation positions in the plurality of comment statements is one of the plurality of public opinion opinions;
[0428] Obtaining a comment statement corresponding to each public opinion point of view from the plurality of comment statements;
[0429] Based on the comment sentences corresponding to each public opinion point of view, determine the corresponding content of each public opinion point of view;
[0430] Based on the comment sentences and corresponding content corresponding to each public opinion point of view, public opinion analysis is performed on the user-generated content.
[0431] See Figure 19 , Figure 19 This is a schematic diagram of an electronic device provided in an embodiment of the present application. Figure 19 As shown, electronic device 1900 includes a transceiver 1901, a processor 1902, and a memory 1903. These are connected via a bus 1904. Memory 1903 is used to store computer programs and data and can transmit data stored in memory 1903 to processor 1902. Optionally, the electronic device can be the aforementioned sentence segmentation device 1400, model training device 1500, dialogue device 1600, meeting minutes generation device 1700, or public opinion analysis device 1800.
[0432] Exemplarily, if the electronic device is the above-mentioned sentence segmentation device 1400, the processor 1902 is configured to read the computer program in the memory 1903 and perform the following operations:
[0433] Acquiring time series data, wherein the time series data includes a plurality of statements;
[0434] Performing feature extraction on each of the multiple sentences to obtain features of each sentence;
[0435] Segmenting the plurality of sentences based on features of the plurality of sentences to obtain a plurality of segmentation positions;
[0436] For the i-th segmentation position among the multiple segmentation positions Based on the features of the first sentence, the segmentation position Adjust to get the split position The corresponding segmentation position b i, wherein the first sentence is the i-1th segmentation position among the multiple segmentation positions The corresponding segmentation position b i-1 and the i+1th split position The statements between .
[0437] Specifically, the transceiver 1901 may be Figure 14 The acquisition unit 1401 of the sentence segmentation device 1400 of the embodiment described above, the processor 1902 may be Figure 14 The processing unit 1402 of the sentence segmentation device 1400 of the embodiment.
[0438] Exemplarily, if the electronic device is the above-mentioned model training device 1500, the processor 1902 is configured to read the computer program in the memory 1903 and perform the following operations:
[0439] Acquire a time series data sample, wherein the time series data sample includes a plurality of training sentences;
[0440] Inputting each of the plurality of training sentences into a first model for feature extraction to obtain features of each training sentence;
[0441] Segmenting the plurality of training sentences based on a feature of each training sentence to obtain a plurality of segmentation positions;
[0442] For the jth segmentation position among the multiple segmentation positions Based on the features of the first training sentence, the segmentation position Adjust to get the split position The corresponding segmentation position c j , wherein the first training sentence is the segmentation position c corresponding to the j-1th segmentation position among the multiple segmentation positions j-1 and the j+1th split position The sentences between
[0443] Based on the segmentation position c j and the plurality of training sentences, training the first model to obtain a second model.
[0444] Specifically, the transceiver 1901 may be Figure 15 The acquisition unit 1501 of the model training device 1500 of the embodiment described above, the processor 1902 may be Figure 15 The processing unit 1502 of the model training device 1500 of the described embodiment.
[0445] Exemplarily, if the electronic device is the aforementioned conversation device 1600, the processor 1902 is configured to read the computer program in the memory 1903 and perform the following operations:
[0446] Obtaining a question statement of the user in a first round; obtaining a dialogue statement sequence, wherein the dialogue statement sequence includes multiple dialogue statements of a second round, where the second round and the first round belong to the same dialogue and the second round occurs before the first round;
[0447] The multiple conversations are subjected to sentence segmentation using the sentence segmentation method to obtain multiple first segmentation positions; based on the multiple first segmentation positions and the question sentence, a reply sentence corresponding to the question sentence is determined; and the first round of conversation is conducted with the user based on the reply sentence.
[0448] Specifically, the transceiver 1901 may be Figure 16 The acquisition unit 1601 of the dialogue device 1600 of the embodiment described above, the processor 1902 may be Figure 16 The processing unit 1602 of the dialogue device 1600 of the embodiment.
[0449] For example, if the electronic device is the aforementioned meeting minutes generating device 1700, the processor 1902 is configured to read the computer program in the memory 1903 and perform the following operations:
[0450] Acquire a conference text sequence, wherein the conference text sequence includes a plurality of spoken sentences;
[0451] Segment the multiple spoken sentences using the sentence segmentation method to obtain multiple second segmentation positions;
[0452] A meeting summary is generated based on the multiple second segmentation positions and the multiple spoken sentences.
[0453] Specifically, the transceiver 1901 may be Figure 17 The acquisition unit 1701 of the meeting minutes generation device 1700 of the embodiment described above, the processor 1902 may be Figure 17 The processing unit 1702 of the meeting minutes generating device 1700 of the embodiment.
[0454] For example, if the electronic device is the public opinion analysis device 1800 described above, the processor 1902 is configured to read the computer program in the memory 1903 and perform the following operations:
[0455] Obtaining a comment sequence of user-generated content, wherein the comment sequence includes a plurality of comment sentences;
[0456] Segment the plurality of comment sentences using the sentence segmentation method to obtain a plurality of third segmentation positions;
[0457] Based on the multiple third segmentation positions and the multiple comment statements, public opinion analysis is performed on the user-generated content.
[0458] Specifically, the transceiver 1901 may be Figure 18 The acquisition unit 1801 of the public opinion analysis device 1800 of the embodiment described above, the processor 1902 may be Figure 18 The processing unit 1802 of the public opinion analysis device 1800 of the embodiment.
[0459] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement part or all of the steps of any one of the sentence segmentation methods, model training methods, dialogue methods, meeting minutes generation methods, or public opinion analysis methods described in the above method embodiments.
[0460] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute part or all of the steps of any one of the sentence segmentation methods, model training methods, dialogue methods, meeting minutes generation methods, or public opinion analysis methods described in the above method embodiments.
[0461] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all optional embodiments, and the actions and modules involved are not necessarily required by this application.
[0462] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0463] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0464] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0465] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of software program modules.
[0466] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0467] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program. The program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0468] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A sentence segmentation method, characterized in that: include: Acquiring time series data, wherein the time series data includes a plurality of statements; Performing feature extraction on each of the multiple sentences to obtain features of each sentence; Segmenting the plurality of sentences based on features of the plurality of sentences to obtain a plurality of segmentation positions; For the i-th segmentation position among the multiple segmentation positions Based on the features of the first sentence, the segmentation position Adjust to get the split position The corresponding segmentation position b i , wherein the first sentence is the i-1th segmentation position among the multiple segmentation positions The corresponding segmentation position b i-1 and the i+1th split position The statements between .
2. The method according to claim 1, characterized in that The step of segmenting the plurality of sentences based on the features of the plurality of sentences to obtain a plurality of segmentation positions includes: Determining semantic similarity between any two sentences from the plurality of sentences based on features of the two sentences; Clustering the multiple sentences based on the semantic similarity of the two sentences to obtain a first cluster center; Based on the first cluster center, the plurality of segmentation positions are determined.
3. The method according to claim 2, characterized in that Clustering the multiple statements based on the semantic similarity of the two statements to obtain a first cluster center includes: Determining positional similarity between the two sentences based on the positions of the two sentences; Determining the similarity between the two sentences based on the semantic similarity and the position similarity; Based on the similarity between the two sentences, the multiple sentences are clustered to obtain the first cluster center.
4. The method according to any one of claims 1 to 3, characterized in that The feature of the first sentence is used to segment the position b. i Make adjustments, including: Based on the features of the second sentence and the features of the third sentence, the semantic similarity between the second sentence and the third sentence is determined to obtain a first similarity corresponding to the second sentence, wherein the second sentence is the segmentation position b i-1 With the split position a statement between the second statement and the third statement, the third statement being an adjacent statement to the second statement; Based on the first similarity corresponding to the second sentence, the second similarity corresponding to the fourth sentence is determined, and the fourth sentence is the segmentation position b i-1 With the split position The statement between the two sentences is different from the statement in the second sentence; Based on the first similarity and the second similarity corresponding to the fourth sentence, the segmentation position Make adjustments.
5. The method according to claim 4, characterized in that The segmentation position is determined based on the first similarity and the second similarity corresponding to the fourth sentence. Make adjustments, including: determining a score for the second sentence based on the first similarity and a second similarity corresponding to the fourth sentence; Based on the score of the second sentence, the segmentation position Make adjustments.
6. The method according to claim 5, characterized in that The determining a score of the second sentence based on the first similarity and a second similarity corresponding to the fourth sentence includes: Based on the first similarity, traverse the segmentation position b in reverse order i-1 With the split position In the sentences between, the second similarity corresponding to the fourth sentence located before the second sentence is obtained to obtain a third similarity, wherein the third similarity is the first second similarity greater than the first similarity; Based on the first similarity, traverse the segmentation position b in positive order i-1 With the split position In the sentences between, the second similarity corresponding to the fourth sentence located after the second sentence is obtained to obtain a fourth similarity, wherein the fourth similarity is the first second similarity greater than the first similarity; A score of the second sentence is determined based on the first similarity, the third similarity, and the fourth similarity.
7. The method according to claim 5 or 6, characterized in that The scoring of the second sentence is based on the segmentation position Make adjustments, including: Based on the score of the second sentence, determine the segmentation position b i-1 With the split position The score of each statement between Based on the segmentation position b i-1 With the split position The score of each statement between and determines the maximum score; Based on the maximum score, the segmentation position Make adjustments.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Based on the segmentation position b i , dividing the plurality of sentences into a plurality of topics, wherein the plurality of sentences are located at the segmentation position b i-1 and the split position b i The subject of the sentences between is one of the multiple subjects.
9. The method according to claim 8, characterized in that The segmentation position b i , dividing the multiple sentences into multiple topics, including: Based on the segmentation position and the split position b i , determine the segmentation position with Corresponding position deviation; determining a first position deviation based on a position deviation corresponding to each of the plurality of segmentation positions; Based on the first position deviation and the segmentation position b i , dividing the multiple sentences into the multiple topics.
10. The method according to claim 8, characterized in that The first position deviation and the segmentation position b i , dividing the plurality of sentences into the plurality of topics, including: If the first position deviation is less than or equal to the first threshold, based on the segmentation position b i , dividing the plurality of sentences into the plurality of topics, wherein the plurality of sentences are located at the segmentation position b i-1 and the split position b i The subject of the sentences between is one of the multiple subjects; If the first position deviation is greater than the first threshold, based on the characteristics of the fifth sentence, the segmentation position b i Adjust to get the split position The corresponding new segmentation position b i Based on the segmentation position b i and the new split position b i , determine a new first position deviation until the new first position deviation is less than or equal to the first threshold, based on the new segmentation position b i , dividing the plurality of sentences into the plurality of topics, wherein the fifth sentence is the i-1th segmentation position among the plurality of segmentation positions The corresponding new segmentation position b i-1 and the i+1th split position The corresponding segmentation position b i+1 The statements between the multiple statements are located at the new segmentation position b i-1 and the new split position b i The subject of the sentences between is one of the multiple subjects.
11. A conversation method, characterized in that: include: Get the user's question statement in the first round; Acquire a dialogue sentence sequence, where the dialogue sentence sequence includes a plurality of dialogue sentences of a second round, where the second round and the first round belong to the same dialogue, and the second round precedes the first round; Segmenting the multiple conversations using the method according to any one of claims 1 to 10 to obtain multiple first segmentation positions; Determining a reply sentence corresponding to the question sentence based on the plurality of first segmentation positions and the question sentence; The first round of dialogue is conducted with the user based on the reply statement.
12. The method according to claim 11, characterized in that The determining, based on the plurality of first segmentation positions and the question sentence, a reply sentence corresponding to the question sentence includes: Based on the plurality of first segmentation positions, the plurality of dialogue sentences are segmented into a plurality of dialogue topics, wherein the dialogue topic of a dialogue sentence located between adjacent first segmentation positions in the plurality of dialogue sentences is one of the plurality of dialogue topics; For a first conversation topic, obtaining at least one conversation sentence belonging to the first conversation topic from the plurality of conversation sentences, wherein the first conversation topic is any one of the plurality of conversation topics; performing feature extraction on the at least one sentence to obtain features of the first conversation topic; Performing feature extraction on the question statement to obtain features of the question statement; The reply statement is determined based on the features corresponding to each conversation topic and the features of the question statement.
13. The method according to claim 12, characterized in that The determining the reply statement based on the features corresponding to each conversation topic and the features of the question statement includes: Determining the similarity between each conversation topic and the question statement based on the features corresponding to each conversation topic and the features corresponding to the question statement; determining a second dialogue topic from the plurality of dialogue topics based on a similarity between each dialogue topic and the question statement; The reply sentence is generated based on the dialogue sentences of the plurality of dialogue sentences belonging to the second dialogue topic.
14. A method for generating meeting minutes, characterized in that: include: Acquire a conference text sequence, wherein the conference text sequence includes a plurality of spoken sentences; Segmenting the plurality of spoken sentences using the method according to any one of claims 1 to 10 to obtain a plurality of second segmentation positions; A meeting summary is generated based on the multiple second segmentation positions and the multiple spoken sentences.
15. The method according to claim 14, characterized in that Generating meeting minutes based on the plurality of second segmentation positions and the plurality of spoken sentences includes: Based on the plurality of second segmentation positions, the plurality of spoken sentences are segmented into a plurality of conference topics, wherein the conference topic of the spoken sentences located between adjacent second segmentation positions in the plurality of spoken sentences is one of the plurality of conference topics; Obtaining a speech sentence corresponding to each conference topic from a plurality of speech sentences; Determine the corresponding content of each conference topic based on the speech sentences corresponding to each conference topic; The meeting minutes are generated based on the speech sentences corresponding to each meeting topic and the corresponding content of each meeting topic.
16. A method for analyzing public opinion, characterized in that: include: Obtaining a comment sequence of user-generated content, wherein the comment sequence includes a plurality of comment sentences; Segmenting the plurality of comment sentences using the method according to any one of claims 1 to 10 to obtain a plurality of third segmentation positions; Based on the multiple third segmentation positions and the multiple comment statements, public opinion analysis is performed on the user-generated content.
17. The method according to claim 16, characterized in that The performing public opinion analysis on the user-generated content based on the plurality of third segmentation positions and the plurality of comment statements includes: Based on the plurality of third segmentation positions, the plurality of comment statements are segmented into a plurality of public opinion opinions, wherein the public opinion opinion of the comment statements located between adjacent third segmentation positions in the plurality of comment statements is one of the plurality of public opinion opinions; Obtaining a comment statement corresponding to each public opinion point of view from the plurality of comment statements; Based on the comment sentences corresponding to each public opinion point of view, determine the corresponding content of each public opinion point of view; Based on the comment sentences and corresponding content corresponding to each public opinion point of view, public opinion analysis is performed on the user-generated content.
18. An electronic device, characterized in that: include: A processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 17.
19. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 17.
20. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 17 is implemented.