A method, device, medium and program product for identifying a target statement

By first extracting candidate fragments, and then combining target statement recognition model and context information for identification, the problem of insufficient efficiency and accuracy of statement extraction in the prior art is solved, and more efficient and accurate statement extraction is achieved.

CN118296146BActive Publication Date: 2025-06-27DOCUMENT & INFORMATION CENT OF CHINESE ACAD OF SCI
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410456031.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-16
Publication Date
2025-06-27
Estimated Expiration
2044-04-16

AI Technical Summary

Technical Problem

The prior art uses sentences as isolated units in statement extraction, resulting in high recognition time and calculation costs, and the accuracy of extraction is reduced due to the huge difference in the ratio of target statements and non-target statements.

Method used

By first extracting candidate fragments, then extracting target statements from candidate fragments, narrowing the extraction scope, and using the target statement recognition model to combine context information for identification.

Benefits of technology

It improves the accuracy and efficiency of statement extraction, reduces calculation costs, and improves the extraction speed while ensuring accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118296146B_ABST
    Figure CN118296146B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a method, device, medium, and program product for identifying a target statement. The method includes: extracting at least one candidate segment from a document to be identified, where the at least one candidate segment includes features related to the target statement; inputting the at least one candidate segment into a target statement recognition model, and recognizing the target statement included in the at least one candidate segment through the target statement recognition model. Through some embodiments of the present application, the target statement can be extracted from the document to be identified, and by first extracting candidate segments and then extracting the target statement from the candidate segments, the accuracy of statement extraction can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of sentence extraction, and in particular, to a method, device, medium and program product for identifying target sentences. Background Art

[0002] Sentence extraction is an important branch in the field of natural language processing and also an important step for analyzing the entire document. In related technologies, most of the recognition methods based on deep learning treat sentences as isolated units and extract target sentences without discrimination from various positions in the full text of the paper. This not only increases the time cost and computational cost of recognition, but also the ratio of target sentences to non-target sentences in the full text of the document is very disparate, which will also reduce the accuracy of sentence extraction.

[0003] Therefore, how to improve the accuracy of sentence extraction has become a problem to be solved. Summary of the Invention

[0004] The embodiments of the present application provide a method, device, medium and program product for identifying target sentences. By some embodiments of the present application, it is at least possible to first extract candidate fragments and then extract target sentences from the candidate fragments, thereby ensuring the accuracy of sentence extraction.

[0005] In a first aspect, the present application provides a method for identifying target sentences. The method includes: extracting at least one candidate fragment from the document to be recognized, where the at least one candidate fragment includes features related to the target sentence; inputting the at least one candidate fragment into a target sentence recognition model, and recognizing the target sentence included in the at least one candidate fragment through the target sentence recognition model.

[0006] Therefore, different from the technical solution of directly searching for target sentences in the full text in related technologies, the embodiments of the present application can narrow the range of extracting target sentences by first extracting candidate fragments and then extracting target sentences from the candidate fragments, extract in the fragments where target sentences may appear, which can improve the extraction efficiency and at the same time ensure the accuracy of sentence extraction.

[0007] In combination with the first aspect, in an implementation manner of the present application, each candidate segment includes N sentences, and the N sentences include a sentence to be classified and N-1 context sentences, and the one sentence to be classified is any one of the N sentences; the inputting the at least one candidate segment into the target statement recognition model, and recognizing the target statement included in the at least one candidate segment through the target statement recognition model includes: inputting the sentence to be classified and the N-1 context sentences of each candidate segment into the target statement recognition model; based on the target statement recognition model and the N-1 context sentences, recognizing the sentence to be classified that belongs to the target statement.

[0008] Therefore, in the embodiment of the present application, by inputting the sentence to be classified and the context sentences in the segment into the model together, the context information can be considered during the model calculation process, thereby further improving the accuracy of extracting the target statement.

[0009] In combination with the first aspect, in an implementation manner of the present application, the target statement recognition model includes a representation layer, an encoding layer, and an output layer; the based on the target statement recognition model and the N-1 context sentences, recognizing the sentence to be classified that belongs to the target statement includes: performing representation calculations in multiple dimensions on the N-1 context sentences and the sentence to be classified in the representation layer respectively to obtain representation statements; inputting each representation statement into the encoding layer for encoding calculation to obtain corresponding encoded statements; inputting the encoded statements into the output layer for classification to recognize the sentence to be classified that belongs to the target statement.

[0010] In combination with the first aspect, in an implementation manner of the present application, the inputting the encoded statements into the output layer for classification to recognize the sentence to be classified that belongs to the target statement includes: inputting the encoding representing the overall semantics of the N-1 context sentences and the encoding of the sentence to be classified into the output layer, and combining the encoding representing the overall semantics of the N-1 context sentences, recognizing the sentence to be classified that belongs to the target statement.

[0011] Therefore, in the embodiment of the present application, by jointly calculating the context sentences and the sentence to be classified in the representation layer and the encoding layer, the features of the context sentences can be learned, and then the output layer classifies the sentence to be classified according to the features of the context sentences to determine whether it is the target statement, ensuring that the distribution characteristics and language environment of the target statement in the literature are considered during the classification process, thereby improving the accuracy of statement extraction.

[0012] In combination with the first aspect, in an implementation manner of the present application, extracting at least one candidate segment from the document to be recognized includes: scanning the full text of the document to be recognized through a window with a preset number of sentences to obtain a plurality of segments; based on the feature words of each segment among the plurality of segments, selecting the at least one candidate segment from the plurality of segments, where the feature words are used to characterize the features related to the description manner of the target sentence.

[0013] In combination with the first aspect, in an implementation manner of the present application, based on the feature words of each segment among the plurality of segments, selecting the at least one candidate segment from the plurality of segments includes: determining the number of types of feature words included in each segment; determining the segment with the number of types of feature words greater than a preset threshold as the at least one candidate segment.

[0014] In combination with the first aspect, in an implementation manner of the present application, the types of the feature words include: subject, predicate, attributive, and adverbial.

[0015] Therefore, by selecting corresponding candidate segments according to the feature words in the embodiments of the present application, the range of sentence extraction can be narrowed, thereby improving the speed and accuracy.

[0016] In a second aspect, the present application provides a device for recognizing a target sentence, and the device includes:

[0017] A segment extraction module configured to extract at least one candidate segment from the document to be recognized, where the at least one candidate segment includes features related to the target sentence;

[0018] A sentence recognition module configured to input the at least one candidate segment into a target sentence recognition model, and recognize the target sentence included in the at least one candidate segment through the target sentence recognition model.

[0019] In combination with the second aspect, in an implementation manner of the present application, each candidate segment includes N sentences, and among the N sentences, there is a sentence to be classified and N - 1 context sentences, and the sentence to be classified is any one of the N sentences; the sentence recognition module is configured to: input the sentence to be classified and the N - 1 context sentences of each candidate segment into the target sentence recognition model; based on the target sentence recognition model and the N - 1 context sentences, recognize the sentence to be classified that belongs to the target sentence.

[0020] In combination with the second aspect, in an implementation manner of the present application, the target statement recognition model includes a characterization layer, an encoding layer, and an output layer; the statement recognition module is configured to: perform characterization calculations in multiple dimensions on the N-1 context sentences and the sentence to be classified in the characterization layer to obtain characterized statements; input each characterized statement into the encoding layer for encoding calculation to obtain corresponding encoded statements; input the encoded statements into the output layer for classification to identify the sentence to be classified that belongs to the target statement.

[0021] In combination with the second aspect, in an implementation manner of the present application, the statement recognition module is configured to: input the encoding representing the overall semantics of the N-1 context sentences and the encoding of the sentence to be classified into the output layer, and in combination with the encoding representing the overall semantics of the N-1 context sentences, identify the sentence to be classified that belongs to the target statement.

[0022] In combination with the second aspect, in an implementation manner of the present application, the fragment extraction module is configured to: scan the full text of the document to be recognized through a window with a preset number of sentences to obtain multiple fragments; based on the feature words of each fragment in the multiple fragments, select the at least one candidate fragment from the multiple fragments, where the feature words are used to characterize the features related to the description manner of the target statement.

[0023] In combination with the second aspect, in an implementation manner of the present application, the fragment extraction module is configured to: determine the number of types of feature words included in each fragment; determine the fragment with the number of types of feature words greater than a preset threshold as the at least one candidate fragment.

[0024] In combination with the second aspect, in an implementation manner of the present application, the types of the feature words include: subject, predicate, attributive, and adverbial.

[0025] In a third aspect, the present application provides an electronic device, including: a processor, a memory, and a bus; the processor is connected to the memory through the bus, and the memory stores a computer program, and when the computer program is executed by the processor, the method described in any embodiment of the first aspect can be implemented.

[0026] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed, the method described in any embodiment of the first aspect can be implemented.

[0027] In a fifth aspect, the present application provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed, the method described in any embodiment of the first aspect can be implemented. Description of the Drawings

[0028] Figure 1 A schematic diagram of the composition of a scenario for identifying a target statement shown in an embodiment of the present application;

[0029] Figure 2 One of the method flowcharts for identifying a target statement shown in an embodiment of the present application;

[0030] Figure 3 Another method flowchart for identifying a target statement shown in an embodiment of the present application;

[0031] Figure 4 A schematic diagram of the structure of a target statement recognition model shown in an embodiment of the present application;

[0032] Figure 5 A schematic diagram of the composition of a device for identifying a target statement shown in an embodiment of the present application;

[0033] Figure 6 A schematic diagram of the composition of an electronic device shown in an embodiment of the present application. Detailed implementation manners

[0034] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Usually, the components of the embodiments of the present application described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present application provided in the accompanying drawings here is not intended to limit the scope of the present application claimed, but only represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present application.

[0035] The embodiments of the present application can be applied to the scenario of extracting target statements in documents. Specifically, the document can be a paper, and the target statement can be an innovative sentence therein. The corresponding scenario can be: extracting innovative sentences from a paper. It can be understood that the documents in the present application can be paper documents, patent documents, blog content, etc. The present application does not limit the type of the document. The target statements in the present application can be innovative sentences, research content sentences, or conclusion sentences. The present application does not limit the type of the target statement.

[0036] In scientific and technological papers, the sentences that describe the innovative aspects of research work are called innovative sentences. Through refined and accurate expressions, they present the innovative ideas and core breakthroughs of researchers in the text. Therefore, identifying and understanding innovative sentences has become an important way to grasp the innovative ideas of papers and an important research direction in the field of library and information science. In existing domestic and foreign research, the identification of innovative sentences in papers is also called the identification of contribution sentences or highlight sentences in papers. These studies can be roughly divided into rule-based identification methods, machine learning-based identification methods, and deep learning-based identification methods according to the methods. Among them, the deep learning-based method has become the mainstream of innovative sentence identification due to its high accuracy. This study will also identify innovative sentences based on deep learning.

[0037] Taking the target sentence as an innovative sentence as an example, the following will describe in detail the method steps of identifying innovative sentences based on deep learning in the embodiments of the present application with reference to the accompanying drawings.

[0038] Figure 1 A schematic diagram of the composition of a scenario for identifying a target sentence in some embodiments of the present application is provided. This scenario includes a client 110 and a server 120. Specifically, the user selects the document to be identified in the client 110, and then the client 110 inputs the document to be identified into the server 120. After receiving the document to be identified, the server 120 extracts the target sentence in the document to be identified and then returns the target sentence to the client for display.

[0039] The following will exemplarily describe a method for identifying a target sentence provided in some embodiments of the present application taking the server as an example. It can be understood that the execution subject of the present application can be any electronic device capable of executing this method, and the above server is only an example, and the present application does not limit this.

[0040] At least to solve the problems in the background technology, such as Figure 2 As shown, some embodiments of the present application provide a method for identifying a target sentence, and this method includes:

[0041] S210, extracting at least one candidate segment from the document to be identified.

[0042] It should be noted that at least one candidate segment (for example, an innovative segment) includes features related to the target sentence (for example, an innovative sentence).

[0043] That is to say, since the innovative segments have relatively similar structural features, that is, the background and motivation of the innovation are described in the above text of the innovative sentence, while the effect of the innovation is described in the following text, and these sentences have unique word and sentence patterns, therefore, in this application, the innovative segments are located based on the feature words by sliding the frame, scanning the full text of the document to be recognized by sliding the frame, and using the feature word list to score the scanned window, that is, scanning the target text with a window of a fixed size, and scoring the text within the window according to the feature word list to select the innovative segments (that is, at least one candidate segment).

[0044] In an implementation manner of S210, in S2101, scan the full text of the document to be recognized with a window of a preset number of sentences to obtain multiple segments.

[0045] The preset number of sentences included in the sliding frame can be adjusted according to the actual situation, and it can be that a sliding frame includes 3 sentences. That is, scan the full text of the document to be recognized with a sliding frame including 3 sentences, so as to split the document to be recognized into multiple segments. This can avoid ignoring individual sentences without obvious features due to too small a window, and can reduce sentence redundancy to a certain extent.

[0046] It can be understood that the feature words are used to represent the features related to the description method of the target sentence, and the types of feature words include: subject, predicate, attributive, and adverbial.

[0047] Before executing S2102, it is necessary to first establish a feature word list, such as Figure 3 shown, after annotating the documents in the document library, obtain segment sample data, for example, innovative segment samples, and then summarize the feature words from the segment sample data. Among them, the feature words can be classified according to the subject, predicate, attributive, and adverbial. For example, the feature words and their corresponding types are shown in Table 1:

[0048] Table 1 Feature Word List

[0049]

[0050]

[0051] That is to say, the establishment of the feature word list is a process of selecting and summarizing representative and distinguishable words from the innovative segment samples to represent the main features of the innovative sentences. The feature word list is divided into four parts: subject, predicate (proposed), adverbial, and attributive. Then, part of the innovative segment samples are annotated, and the corresponding word frequencies are counted. After screening, the final feature word list is obtained.

[0052] S2102, based on the feature words of each segment among the multiple segments, select at least one candidate segment from the multiple segments.

[0053] Specifically, first, determine the number of types of feature words included in each segment. Then, identify the segments in which the number of types of feature words is greater than a preset threshold as at least one candidate segment.

[0054] That is to say, after scanning out multiple segments through a sliding window, find the feature words that appear in each segment among the multiple segments, and determine the corresponding types for each feature word. Then, count the number of types of feature words that appear in each segment, and identify the segments in which the number of types of feature words is greater than the preset threshold as candidate segments.

[0055] Namely, match each segment with a feature word list to find the feature words that appear in the feature list. Then, score each window according to the types of feature words in the feature word list. This application formulates a step-by-step scoring table, scores according to the number of types of feature words, and believes that only features of more than two types can be recognized as candidate segments. The step-by-step scoring table is shown in Table 2:

[0056] Table 2 Step-by-step scoring table

[0057]

[0058]

[0059] This application sets a score threshold, adds the windows above the threshold to the candidate segments, and merges and de-duplicates the candidate segments to maintain the coherence of the language segments. Regarding the threshold setting, through a large number of experiments, it is found that setting it to 3 has the best effect, that is, a sentence in the window needs to have features of three or more types, or at least two sentences need to have features of two or more types. Therefore, the threshold is set to 3.

[0060] S220, input at least one candidate segment into the target sentence recognition model, and recognize the target sentence included in the at least one candidate segment through the target sentence recognition model.

[0061] It should be noted that each candidate segment includes N sentences. Among the N sentences, there is a sentence to be classified and N - 1 context sentences, and a sentence to be classified can be any one of the N sentences.

[0062] For example, a candidate segment includes three sentences, namely Sentence A, Sentence B, and Sentence C. Any one of these sentences needs to be a sentence to be classified to determine whether this sentence is the target sentence. Then, the remaining two sentences are the context sentences. For example, among Sentence A, Sentence B, and Sentence C, when Sentence A is the sentence to be classified, the context sentences are Sentence B and Sentence C. Similarly, when Sentence B is the sentence to be classified, the context sentences are Sentence A and Sentence C. Similarly, when Sentence C is the sentence to be classified, the context sentences are Sentence A and Sentence B. Thus, each sentence in each candidate segment needs to be calculated to determine whether it is the target sentence, so as to improve the accuracy of target sentence extraction.

[0063] It can be understood that the target sentence recognition model may have a maximum input length. For example, 512 characters. Then, the number of context sentences needs to be specified to meet the input requirements of the target sentence recognition model.

[0064] In one implementation of S220, in S2201, the sentence to be classified and N - 1 context sentences of each candidate segment are input into the target sentence recognition model.

[0065] That is to say, according to the above method, the determined sentence to be classified and its corresponding context sentences in each candidate segment are input into the target sentence recognition model for target sentence recognition. For example, for innovative sentence recognition.

[0066] In S2202, based on the target sentence recognition model and N - 1 context sentences, the sentence to be classified that belongs to the target sentence is recognized.

[0067] In one implementation of S2202, the target sentence recognition model is a neural network model including a fully connected layer. After inputting N - 1 context sentences and the sentence to be classified into the target sentence recognition model, feature learning is performed using the fully connected layer, and then a classification operation is carried out to determine whether the current sentence to be classified belongs to the target sentence. For example, belonging to the target sentence can be represented by 1, and not belonging to the target sentence can be represented by 0.

[0068] In another implementation of S2202, the innovative sentence recognition problem essentially belongs to the category of text classification tasks. Its goal is to accurately classify a given sentence as an innovative sentence or a non - innovative sentence. Among many text classification models, the BERT (Bidirectional Encoder Representations from Transformers) model has achieved outstanding results with its massive pre - trained language knowledge and powerful representation learning ability. There have been a large number of studies on text classification based on the BERT model. Therefore, this application will also build a target sentence recognition model based on the BERT model.

[0069] Using the BERT model for text classification has formed an inherent pattern, that is, a single sentence to be classified is input, and the BERT model will output the category of the sentence. In this model, sentences are treated as isolated units, ignoring the language environment in which they are located. However, contextual information can maintain the semantic integrity of sentences and plays an important role in enhancing text comprehension and judging the subject of text. If the contextual information of the sentence is taken into consideration and a target sentence recognition model that incorporates contextual features is constructed, on the one hand, the model can more accurately determine whether the current sentence is an innovative sentence through the additional information provided by the context. On the other hand, there are differences in grammatical structure and vocabulary usage between innovative sentences and ordinary sentences. The existence of context (the previous and next sentences) can constitute a reference baseline, which is conducive to the model identifying the uniqueness of the current sentence.

[0070] Based on the above ideas, this application will integrate the BERT model (Context-BERT) with contextual features to perform innovative sentence recognition.

[0071] Related Technology In the BERT model, the input layer receives the preprocessed text data to be classified, usually a single sentence or a sentence pair. In order to input the sentence to be classified and its context into the model, such as Figure 4 As shown, the target sentence recognition model in the present application changes the number of sentences in the input layer to 3, and connects the third sentence with the connector "[SEP]", forming an input format of "[CLS] previous context [SEP] sentence to be classified [SEP] following context". It can be understood that, in the candidate segment, except for the current sentence to be classified, the remaining two sentences are the previous context or the following context.

[0072] Specifically, the target sentence recognition model includes a representation layer, an encoding layer, and an output layer. The specific steps for recognizing the target sentence are as follows:

[0073] First, N-1 context sentences and sentences to be classified are represented in multiple dimensions at the representation layer to obtain representation sentences.

[0074] The representation layer mainly represents the N-1 context sentences and the sentence to be classified input to the model in different dimensions. The BERT model mainly has three representation forms: Token Embeddings, Segment Embeddings, and Position Embeddings. To highlight the difference between the sentence to be classified and its context, this application changes the segment representation. The segment representation is set to distinguish different sentences input to the BERT model. Since the BERT model in the related art can input at most two sentences, the segment representation encodes the first sentence as 0 and the second sentence as 1. After the target sentence recognition model in this application changes the input to N sentences, the segment representation of the sentence to be classified is correspondingly set to 1, and the segment representations of the N-1 context sentences are set to 0. For example, when 3 sentences are input, the segment representations of the upper and lower context sentences are correspondingly set to 0, and the segment representation of the sentence to be classified is set to 1, so as to achieve the purpose of distinguishing the three input sentences and specially representing the sentence to be classified in the middle position.

[0075] Then, each represented sentence is input to the encoding layer for encoding calculation to obtain the corresponding encoded sentence.

[0076] As Figure 4 shown, the encoding layer uses the encoders of 12 layers of Transformer to encode the input sentence vectors. The self-attention mechanism of Transformer can well capture the correlation and dependence between sentences, enabling the model to deeply learn the features of the innovative sentence and the surrounding environment of the innovative sentence, so as to more comprehensively understand the semantic meaning of the innovative sentence.

[0077] Finally, the encoded sentence is input to the output layer for classification to identify the sentence to be classified that belongs to the target sentence.

[0078] Specifically, the encoding representing the overall semantics of the N-1 context sentences and the encoding of the sentence to be classified are input to the output layer, and in combination with the encoding representing the overall semantics of the N-1 context sentences, the sentence to be classified that belongs to the target sentence is identified.

[0079] The output layer maps the results output by the deep neural network to predicted categories. Due to the self-attention mechanism of the Transformer layer, the character [CLS] already contains all the information of the entire input sentence. Therefore, the BERT model usually uses [CLS] for classification. However, the classification object of this application is only the sentence to be classified in the input sentence. Therefore, this application uses the sum vector of the last layer Transformer vector corresponding to the sentence to be classified and the [CLS] vector for classification, so that the model can focus on the sentence to be classified and obtain sufficient context information.

[0080] Optionally, all the encodings corresponding to N-1 context sentences and the encoding of the sentence to be classified can also be input into the output layer, and in combination with the encoding of the overall semantics of the N-1 context sentences, the sentence to be classified belonging to the target sentence can be identified.

[0081] In another implementation manner of S220, the sentence to be classified can be directly recognized through a neural network model to obtain its classification.

[0082] Therefore, the Context-BERT model that fuses context features proposed in this application fully utilizes context information by improving the input layer, representation layer, and output layer of the BERT model to improve the recognition effect of the model on innovative sentences.

[0083] In summary, as a specific embodiment of this application, as Figure 3 shown, before identifying the target sentence, first label the fragment sample data in the literature library, then summarize the feature words based on the fragment sample data, and label the target sentence sample data, and use the target sentence sample data to train the target sentence recognition model.

[0084] After starting the recognition, scan the literature to be extracted through a sliding window to obtain multiple fragments, then score the multiple fragments using the feature words to obtain at least one candidate fragment. For example, the at least one candidate fragment includes candidate fragment A and candidate fragment B. Finally, use the trained target sentence recognition model to separately identify candidate fragment A and candidate fragment B to determine whether the target sentence is included therein.

[0085] Therefore, the present application proposes a method for identifying innovative sentences based on innovative fragments and context information, which mainly includes two parts: locating innovative fragments by setting a sliding window to scan the full text and locating the regions where innovative points exist and are enriched according to feature words; and classifying innovative sentences by training a Context-BERT deep learning model (i.e., the target sentence recognition model) to automatically identify innovative sentences in the innovative fragments. Thus, the effect of innovative sentence recognition is effectively improved, the core innovative content of the literature is highlighted, it is convenient for readers to quickly understand and grasp the innovative points of the literature, and evidence-based support is provided for the innovative points.

[0086] The above describes an implementation manner of a method for identifying a target sentence. The following will describe an apparatus for identifying a target sentence.

[0087] As Figure 5 shown, some embodiments of the present application provide an apparatus 500 for identifying a target sentence, and the apparatus includes: a fragment extraction module 510 and a sentence recognition module 520.

[0088] The fragment extraction module 510 is configured to extract at least one candidate fragment from the literature to be identified, where the at least one candidate fragment includes features related to the target sentence;

[0089] The sentence recognition module 520 is configured to input the at least one candidate fragment into the target sentence recognition model, and identify the target sentence included in the at least one candidate fragment through the target sentence recognition model.

[0090] In an implementation manner of the present application, each candidate fragment includes N sentences, and among the N sentences, there is a sentence to be classified and N - 1 context sentences, and the sentence to be classified is any one of the N sentences; the sentence recognition module 520 is configured to: input the sentence to be classified and the N - 1 context sentences of each candidate fragment into the target sentence recognition model; and based on the target sentence recognition model and the N - 1 context sentences, identify the sentence to be classified that belongs to the target sentence.

[0091] In an implementation manner of the present application, the target sentence recognition model includes a representation layer, an encoding layer, and an output layer; the sentence recognition module 520 is configured to: perform multi-dimensional representation calculations on the N - 1 context sentences and the sentence to be classified respectively in the representation layer to obtain representation sentences; input each representation sentence into the encoding layer for encoding calculation to obtain corresponding encoded sentences; and input the encoded sentences into the output layer for classification to identify the sentence to be classified that belongs to the target sentence.

[0092] In an embodiment of the present application, the statement recognition module 520 is configured to: input the encoding representing the overall semantics of the N - 1 context sentences and the encoding of the sentence to be classified into the output layer, and in combination with the encoding of the overall semantics of the N - 1 context sentences, identify the sentence to be classified that belongs to the target statement.

[0093] In an embodiment of the present application, the segment extraction module 510 is configured to: scan the full text of the document to be recognized through a window with a preset number of sentences to obtain a plurality of segments; based on the feature words of each segment in the plurality of segments, select the at least one candidate segment from the plurality of segments, where the feature words are used to characterize the features related to the description mode of the target statement.

[0094] In an embodiment of the present application, the segment extraction module 510 is configured to: determine the number of types of feature words included in each segment; determine the segment with the number of types of feature words greater than a preset threshold as the at least one candidate segment.

[0095] In an embodiment of the present application, the types of the feature words include: subject, predicate, attributive, and adverbial.

[0096] In an embodiment of the present application, Figure 5 the illustrated module can implement Figures 1 to 4 each process in the method embodiment. Figure 5 The operations and / or functions of each module in Figures 1 to 4 are respectively for implementing the corresponding processes in the method embodiment in . For details, reference may be made to the description in the above method embodiment. To avoid repetition, detailed description is appropriately omitted here.

[0097] As Figure 6 shown, an embodiment of the present application provides an electronic device 600, including: a processor 610, a memory 620, and a bus 630. The processor is connected to the memory through the bus. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, they are used to implement the method according to any one of the above all embodiments. For details, reference may be made to the description in the above method embodiment. To avoid repetition, detailed description is appropriately omitted here.

[0098] Among them, the bus is used to implement direct connection and communication between these components. Among them, in the embodiments of the present application, the processor may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0099] The memory may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the methods described in the above embodiments can be executed.

[0100] It can be understood that Figure 6 The structure shown is only schematic, and it may also include more or fewer components than those shown in Figure 6 or have a different configuration from that shown in Figure 6 . Figure 6 Each component shown in can be implemented by hardware, software or a combination thereof.

[0101] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the server, the method described in any one of the above all embodiments is implemented. For details, reference can be made to the description in the above method embodiments. To avoid repetition, the detailed description is appropriately omitted here.

[0102] The above are only the preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various modifications and variations can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application. It should be noted that similar reference numerals and letters indicate similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.

[0103] As mentioned above, the above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, and all should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for identifying a target sentence, characterized in that: The method comprises: Extract at least one candidate segment from the document to be identified, wherein the at least one candidate segment includes features related to the target sentence; each candidate segment includes N sentences, the N sentences include a sentence to be classified and N-1 context sentences, the sentence to be classified is any one of the N sentences; feature words are used to represent features related to the description method of the target sentence, and the types of the feature words include: subject, predicate, attributive and adverbial; Inputting the at least one candidate segment into a target sentence recognition model, and recognizing the target sentence included in the at least one candidate segment through the target sentence recognition model; the target sentence recognition model is a model that incorporates context features after taking into account the context information of the sentence; In the process of identifying the target sentence, any one of the N sentences needs to become a sentence to be classified once, and it is confirmed whether any one of the sentences is a target sentence when it is used as the sentence to be classified; the target sentence recognition model includes a representation layer, a coding layer and an output layer; in the process of identifying the target sentence, the N-1 context sentences and the sentence to be classified are respectively represented and calculated in multiple dimensions in the representation layer to obtain a representation sentence; each representation sentence is input into the coding layer for coding calculation to obtain a corresponding coding sentence; the coding sentence is input into the output layer for classification to identify the sentence to be classified belonging to the target sentence; The step of extracting at least one candidate segment from the document to be identified includes: Scanning the full text of the document to be identified through a window of a preset number of sentences to obtain multiple segments; selecting at least one candidate segment from the multiple segments based on feature words of each segment in the multiple segments, wherein the feature words are used to characterize features related to the description method of the target sentence; the feature words are determined from a feature word list, and the feature word list selects and summarizes representative and distinguishing words from the innovative segment samples; The score of each window corresponding to each candidate segment is higher than the score threshold, and the feature word type in each candidate segment is higher than the preset threshold; the score of each window is obtained by scoring each window according to the feature word type in the feature word table.

2. The method according to claim 1, characterized in that The step of inputting the at least one candidate segment into a target sentence recognition model and identifying the target sentence included in the at least one candidate segment by the target sentence recognition model comprises: Inputting the to-be-classified sentences and the N-1 context sentences of each candidate segment into the target sentence recognition model; Based on the target sentence recognition model and the N-1 context sentences, sentences to be classified belonging to the target sentence are identified.

3. The method according to claim 2, characterized in that The step of inputting the encoded sentence into the output layer for classification and identifying sentences to be classified belonging to the target sentence includes: The encodings representing the overall semantics of the N-1 context sentences and the encodings of the sentences to be classified are input into the output layer, and the sentences to be classified belonging to the target sentence are identified by combining the encodings of the overall semantics of the N-1 context sentences.

4. The method according to claim 1, characterized in that The selecting the at least one candidate segment from the multiple segments based on the feature words of each segment in the multiple segments includes: Determining the number of types of feature words included in each of the segments; A segment whose number of types of characteristic words is greater than a preset threshold is determined as the at least one candidate segment.

5. An electronic device, characterized in that: include: processor, memory, and bus; The processor is connected to the memory via the bus, the memory stores a computer program, and the computer program, when executed by the processor, can implement the method as claimed in any one of claims 1 to 4.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed, can implement the method as claimed in any one of claims 1 to 4.

7. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed, the method according to any one of claims 1 to 4 can be implemented.

Citation Information

Patent Citations

  • Conference record processing method and device, equipment and storage medium

    CN115270728A

  • Tax knowledge base construction method and device, equipment and medium

    CN115600601A

  • Text entity recognition method and device, equipment and medium

    CN115688781A